John Humphreys
John Humphreys

Reputation: 39314

Utility for communicating with a database over an ODBC driver in Linux shell

Here's my situation:

My Question

Is there some program/utility I can use on Linux that can send commands to a database using any ODBC driver (including ones I specify)?


Note: I'm basically looking for a Linux version of the SQLCMD utility that ships with SQL Server. I'd be happy with any program that could use just the basic database functions supported by all ODBC drivers though.

Upvotes: 1

Views: 771

Answers (2)

Vikram
Vikram

Reputation: 4192

You could use Dbvisualizer : http://www.dbvis.com/download/

  1. Free version that can be downloaded and you can do basic SQL commands
  2. Available on Linux
  3. Has a command line interface (maybe not all versions)
  4. Adding your own driver : From your question I understand that you have your own custom ODBC driver that you want to use instead of Microsoft sqljdbc4.jar (Correct me if I am wrong). As shown in link below, you can actually point to any driver file. http://www.dbvis.com/doc/8.0/doc/ug/getConnected/getConnected.html DBvisualizer does some basic validation(driver classes etc.) before it imports that driver file you pointed it to

What I still do not understand is how you can force SQL Server to believe that it is using sqljdbc.jar when it is using your custom driver?

Upvotes: 2

iruvar
iruvar

Reputation: 23374

FreeTDS provides connectivity from Linux to MS SQL Server. It comes with a set of command-line tools and also an ODBC driver that can be used to established client program connectivity via unixodbc. Something along the lines of client->unixODBC->freeTDS->SQL Server

Upvotes: 2

Related Questions