Forum: Installation

Post: Installing sqlcmd

Installing sqlcmd
henning
Aug 8, 2011
Hi,
what is the proper way to get sqlcmd installed as an independent tool?
Currently I think the best way is to evoke it inside its root directory, under tools, there is a relative path in the shell script.
What are the copy, edit and path modifications that would have me have it at my fingertips anywhere, just calling sqlcmd from any directory?
Thanks,
Henning
Check out the sqlcmd bash script source
sebc
Aug 8, 2011
The sqlcmd tool is actually a bash script with the following command:


java -cp ../../voltdb/*:../../lib/* org.voltdb.utils.SQLCommand $@



So essentially, you need the VoltDB client library and the JLine jar, and that's it :)

The help does use the README file though, so you'll probably want to keep this along for the ride. One very simple way to go about this is to copy the Jars from the VoltDB client library and the Jline jar from 'lib' into the sqlcmd folder, change the bash script accordingly and then just copy it around wherever you need it.

Seb