SchemaCrawler - Commandline Example
Description
The command example demonstrates the use of SchemaCrawler from the shell command-line.
How to Run
- Make sure that java is on your PATH
- Start the test database server by following instructions in the
_testdb/README.html
file - Start a command shell in the SchemaCrawler distribution directory, that is, the
_schemacrawler/bin
directory. - Run
schemacrawler.cmd --help
(orschemacrawler.sh --help
on Unix), to give you a list of available command-line options - To start with, run
schemacrawler.cmd --server=hsqldb --database=schemacrawler --password= --info-level=minimum --command=list
(useschemacrawler.sh
instead ofschemacrawler.cmd
on Unix) - Run using a SQLite database with
schemacrawler.cmd --server=sqlite --database=../_testdb/sc.db --password= --info-level=minimum --command=list
(useschemacrawler.sh
instead ofschemacrawler.cmd
on Unix)
How to Experiment
- Take a look at the SchemaCrawler grep example, in the grep example directory.
- Take a look at the SchemaCrawler lint example, in the lint example directory.
- Take a look at the SchemaCrawler offline snapshot example, in the offline example directory.
- Take a look at the SchemaCrawler Interactive Shell example, in the interactive example directory.
- Try using different SchemaCrawler command-line options.
- Try modifying
config/schemacrawler.config.properties
with different options. - Try running an arbitrary query, with a query command
"--command=SELECT * FROM PUBLIC.BOOKS.AUTHORS"
. (The quotes are required.) - Redirect the output of SchemaCrawler into a file, by adding
> file.txt
to the command-line. - Try defining a new database connection, using your favorite database and driver. Use the
-url
command-line option.