2.2 Jdbc Client
The textual client using the JDBC protocol
comes with several options to fine-tune the
interaction with the database server. A synopsis of the calling
arguments is given below
java -jar ${prefix}/share/MonetDB/lib/jdbcclient.jar \
[-h host[:port]] [-p port] \
[-f file] [-u user] [-l language] [-b [database]] \
[-d [table]] [-e] [-X<opt>]
or using long option equivalents –host –port –file –user –language
–dump –echo –database.
Arguments may be written directly after the option like -p50000.
If no host and port are given, localhost and 50000
are assumed. An .monetdb
file may exist in the user's home directory. This file can contain
preferences to use each time the program is started. Options given on the
command line override the preferences file. The .monetdb file syntax is
<option>=<value> where option is one of the options host, port, file, mode
debug, or password. Note that the last one is perilous and therefore not
available as command line option.
If no input file is given using the -f flag, an interactive session is
started on the terminal.
NOTE
The JDBC protocol does not support the SQL DEBUG <query>,
PROFILE <query>, and TRACE <query> options. Use the mclient tool instead.
OPTIONS
-h --host- The hostname of the host that runs the MonetDB database. A port
number can be supplied by use of a colon, i.e. -h somehost:12345.
-p --port- The port number to connect to.
-f --file- A file name to use either for reading or writing. The file will
be used for writing when dump mode is used (-d –dump).
In read mode, the file can also be an URL pointing to a plain
text file that is optionally gzip compressed.
-u --user- The username to use when connecting to the database.
-d --database- Try to connect to the given database (only makes sense if
connecting to a DatabasePool, M5 or equivalent process).
-l --language- Use the given language, for example 'xquery'.
--help- This screen.
--version- Display driver version and exit.
-e --echo- Also outputs the contents of the input file, if any.
-q --quiet- Suppress printing the welcome header.
-D --dump- Dumps the given table(s), or the complete database if none given.
EXTRA OPTIONS
-Xdebug- Writes a transmission log to disk for debugging purposes. If a
file name is given, it is used, otherwise a file called
monet<timestamp>.log is created. A given file will never be
overwritten; instead a unique variation of the file is used.
-Xembedded- Uses an "embedded" server instance. The argument to this option
should be in the form of path/to/mserver:dbname[:dbfarm[:dbinit]].
-Xhash- Use the given hash algorithm during challenge response. Supported
algorithm names: SHA1, MD5, plain.
-Xoutput- The output mode when dumping. Default is sql, xml may be used for
an experimental XML output.
-Xbatching- Indicates that a batch should be used instead of direct
communication with the server for each statement. If a number is
given, it is used as batch size. I.e. 8000 would execute the
contents on the batch after each 8000 read rows. Batching can
greatly speedup the process of restoring a database dump.
|