The shell is run interactively or used to run single commands. The general usage to start the shell is:
java -jar KVHOME/lib/sql.jar -helper-hosts <host:port[,host:port]*> -store <storeName> [-username <user>] [-security <security-file-path>] [-timeout <timeout ms>] [-consistency <NONE_REQUIRED(default) | ABSOLUTE | NONE_REQUIRED_NO_MASTER>] [-durability <COMMIT_SYNC(default) | COMMIT_NO_SYNC | COMMIT_WRITE_NO_SYNC>] [single command and arguments]
Configures the read consistency used for this session.
Configures the write durability used for this session.
Specifies a comma-separated list of hosts and ports.
Specifies the name of the store.
Configures the request timeout used for this session.
Specifies the username to login as.
For example, you can start the shell like this:
java -jar KVHOME/lib/sql.jar -helper-hosts node01:5000 -store kvstore sql->
The above command assumes that a store "kvstore" is running at port 5000. You can now execute queries. In the next part of the book, you will find and introduction to
SQL for Oracle NoSQL Database and how to create these query statements.
If you want to import records from a file in either JSON or CSV format, you can use the import command. For more information see import.
If you want to run a script file, you can use the "load" command. For more information see load.
For a complete list of the utility commands accessed through
"java -jar" <kvhome>/lib/sql.jar <command>" see Shell Utility Commands