dbishell@sourceforge
dbishell
dbishell is a database client built on top of the Perl DBI: as such, it supports [or at least, I hope it does] every database supported by the Perl DBI/DBD layers: As of this date, it offers the following:
  • Context sensetive tab completion
  • Command history [per database type]
  • 'describe' syntax, incl. for DB engines that don't offer this as a built-in
  • input output [data] and error [info] streams can be logged to files
  • dbishell provides variables [you can turn these off]
  • subshells and shell commands
  • get and set environment variables
  • get and set DBI connect attributes [AutoCommit, LongTruncOk etc]
  • Some control over the output format
  • Oracle, MySQL and Sybase specific drivers
  • A generic 'default' driver that provides basic functionality for pretty much any DB engine
  • Ability to execute scripts stored in files
  • Syntax for binding 'out' variables for SQL procedures [ Probably only works for Oracle at this point ]
  • Init scripts. (read at connect time)
  • SQL Server driver [sort of] [still a bit funky wrt ODBC/TDS/stored procs/inout param incompatibilities. You'll have to provide your own chicken, candles and pentagram, and make the appropriate sacrifices to ODBC, the black goat of the networks with a thousand incompatibilities, the render of souls, the breaker of specifications, to get this working. The point I am trying to get across here, is You Are On Your Own with this one. I've fought it to a standstill once, but I don't have the energy or the will to face it again]
  • Paging of output [uses less by default, but you can specify some other pager if you like]
  • Edit multi-line commands in an external editor: seems to work reasonably well w. emacsclient
  • Help on SQL syntax and functions [needs more work]
What's coming soon [1 - 3 centuries, what with the day job and all]:
  • A Config file or files containing setup info [which scripts to execute for which drivers at which hook points, symbolic names for DBI DSNs, etc]
  • msql driver
  • Postgres driver [currently broken]
  • DB2 driver [depends on whether I can get my hands on a running installation of DB2]
Longer Term and 'Maybes':
  • Context sensetive help...
  • Multiple dispatch [dispatch the same SQL query to multiple DBs simultaneously]
  • A shiny GTK interface... have begun work
So where is all this stuff? Ok, I'll bite: how do I make it work?
  • Prerequisites:
    • DBI
    • At least one DBD driver [technically not a requirement, but you won't get far without a database shell if you have no database to talk to...]
    • The client libraries for the db or db's you wish to talk to. Your vendor should supply these, although their docs can be spectacularly uncommunicative about how to set up a client only machine - it's almost as if they can't quite understand why you'd want to communicate with your db from a remote client.
    • GNU Readline
    • Term::ReadLine:: Gnu or Perl
    • Term::ReadKey
    • Perl 5.004 or later [not yet tested with 5.6, although as long as you turn threading OFF you should be fine. Did I mention that you should turn threading off? You should turn threading off]
  • Installation
    • tar -xzvf dbishell_<VERSION>.tar.gz
    • cd dbishell-<VERSION>/
    • make install
    • [ You will be asked 3 questions here: Where your perl binary lives is the only one that's really important]
    • Assuming you answered /opt/foo to the second question:
    • Then: [Assuming it all seemed to work Ok] Something like one of these:
    • /opt/foo/bin/dbishell --driver Oracle --dsn 'host=foo.bar.org;sid=frogstar' --user=zaphod
    • /opt/foo/bin/dbishell --driver mysql --dsn 'hostname=foo.bar.org;database=frogstar' --user=zaphod
    • /opt/foo/bin/dbishell --driver Sybase --dsn 'interfaces=/home/adent/.sybase/sybase_interfaces_file;server=foo.bar.org' --user=zaphod
    • /opt/foo/bin/dbishell
    • You can type 'help' within dbishell for a quick and dirty run down of how it all works. I'm going to do a better help file. Honest. The README should contain the same info as the help message.
You Suck - What else is there?
  • PIQT
  • dSQL
  • dbimon
  • dbish
  • ... and various other things that are either database specific or not based on the perl DBI
vivek@users.sourceforge.net
Last modified: Thu Feb 22 12:32:17 GMT 2001