Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Readme updated;

  • Loading branch information...
commit 45c14ac2523b115fea117c06ac39df1c440c96ed 1 parent c0f8a67
@scravy authored
Showing with 56 additions and 1 deletion.
  1. +56 −1
@@ -3,7 +3,7 @@ mssql
This is a Java Command Line client for accessing MSSQL Databases using the JTDS JDBC driver.
- Usage: java -jar mssql.jar MSSQL [OPTIONS...] [COMMANDS...]
+ Usage: java -jar mssql.jar [OPTIONS...] [COMMANDS...]
-o --out Name of the file to redirect output to.
-u --user Username to connect with.
@@ -17,4 +17,59 @@ This is a Java Command Line client for accessing MSSQL Databases using the JTDS
This will override all previously set credentials.
-f --file Read configuration from the specified file.
+Once you fired up a terminal you can invoke mssql like explained above,
+for example:
+ java -jar mssql.jar -f
+where `` contains the credentials to you MSSQL database:
+ hostname =
+ database = DATABASE
+ username = USERNAME
+ password = PASSWORD
+You can also give the password on the command line or just specify the `-p`
+command line switch without supplying a password - mssql will ask for it on
+the console then.
+For simply looking around and investigating a database mssql offers a few
+special commands that look like their mysql equivalents:
+ DESCRIBE table;
+You can also dump a schema in XML using
+ DUMP regex;
+For example
+ DUMP .+
+to obtain the structure of the whole database.
+Commands can also be specified on the command line, thus
+ java -jar mssql.jar -f 'DUMP .+' > struct.xml
+will dump the structure of your database into `struct.xml`.
+Any other query works too:
+ java -jar mssql.jar -f 'SELECT TOP 10 * FROM [mytable]'
+If commands are ommitted on the command line, mssql will run in interactive
+mode and offer a terminal for communicating with the database server.
+Result sets are printed one row per line, columns separated by tabs.
+`-U` can be used to specify your own JDBC connection url. By default the following is
+being used:
+ jdbc:jtds:sqlserver://%s:%s;ssl=require;databaseName=%s;user=%s;password=%s

0 comments on commit 45c14ac

Please sign in to comment.
Something went wrong with that request. Please try again.