Launch the CLI

To launch the Db2® JSON CLI, run the db2nosql script. The script uses the specified connection information to establish a connection to the Db2 database that is used as the JSON data store. If you do not specify connection parameters, the script prompts you for the required values.

Command syntax

Read syntax diagramSkip visual syntax diagramdb2nosql options

Command parameters

--url url
Specifies a URL for connecting to the database.
--user user_ID
Specifies a user ID for connecting to the database.
--password password
Specifies a password for connecting to the database. JRE version 1.6 masks a typed password. However, JRE version 1.5 does not.
--file file_name
Specifies a JavaScript file that contains a list of one-line JavaScript commands that are used as input on the command line.
--enable [true | false]
Specifies whether JSON artifacts are to be created. If the value is true, the --enable parameter creates all the necessary artifacts for JSON in the database. If the value is false, the SQL statements that create JSON artifacts are shown as output but are not issued.
--disable [true | false]
Specifies whether JSON artifacts are to be deleted. If the value is true, the --disable parameter deletes the artifacts that were created for JSON in the database. If the value is false, the SQL statements that delete JSON artifacts are shown as output but are not issued.
--schema schema_name
Specifies the optional schema name that represents the JSON namespace. If you specify this parameter, the schema name is used as the qualifier for the collection name. The JSON namespace is conceptually similar to a MongoDB database.
quiet
Limits the verbosity of the output.

Usage notes

  • The CLI requires a JRE of version 1.5 or later.
  • Using the eval and file commands together is not supported.