Configuring NuoDB SQL


nuosql { --help | --h | --version }
nuosql dbName[,dbName]... [ option ]...


The mandatory and optional nuosql parameters are described below.

Mandatory Parameters


Specification of at least one database name is required. You must specify this option on the nuosql command line. That is, you cannot specify this option in the nuosql configuration file (see Using the NuoDB SQL Configuration File).

In a production environment, specify one database name in the following format. The specifying of host and port are optional.

On Windows, the specification of a host is mandatory.

For example:


In a development environment, it might be helpful to specify more than one database name or specify the same database name and vary the host and/or port. If you specify more than one database name, nuosql tries to use the first specification to connect. If that succeeds then the other specifications are not tried. If the first specification fails then nuosql tries the second specification, and so on. To specify more than one database name, insert a comma as a delimiter. For example:


In a production environment, multiple specifications are not recommended. Instead, you should take advantage of load balancing that NuoDB can do for you. See Balancing Database Load Across Hosts.

--user user_name

Required if --config is not specified. This is the SQL username to use for the connection to the database. It can be the DBA username or any other username created (see CREATE USER).

--password password

Required if --config is not specified. This is the password for the user specified in the --user option.

Optional Parameters

--config file_name

The nuosql command, by default, reads a configuration file named .nuosql.config, located in the user’s HOME directory, if it exists. You can specify this option to override the default path and filename. See Using the NuoDB SQL Configuration File for more information.

--connection-property x=y [--connection-property xn=yn]…​

Specifies properties for the nuosql client connection to the server. You can specify multiple connection properties on one command line. See Connection Properties for a list of supported properties.


Use a direct TE connection instead of via a connection provided by an Admin Process (AP). If this option is specified, the database name argument must include the port number of the TE, database_name@host:port. See Examples with NuoDB SQL.

--file file_name

Specifies the name of a batch file that contains one or more SQL statements to be executed by the nuosql command. The file_name may also include the path. Using this option, nuosql connects to the specified database, executes the SQL statements contained in the batch file and exits. Each SQL statement can span multiple lines, but must be terminated with a semicolon. Errors generated by SQL statements in the batch file are ignored and execution continues with the next SQL statement. This option is similar to redirecting standard input to the nuosql command. However, using the --file option does not change `nuosql’s command history (see Using Command Line History in NuoDB SQL). See Batch Processing with NuoDB SQL for an example of this usage.

--help | -h

Display a help message. Provides this list of options for the command and a brief description of each option.

--history file_name

The nuosql command, by default, writes all SQL commands that are executed to a file named .nuosql.history, which is located in the user’s HOME directory. You can use this option to override the default path and filename. The history file is used for command line history processing in nuosql (see Using Command Line History in NuoDB SQL)
This option and command line history in general is not currently supported on Windows.

--init file_name

The nuosql command, by default, reads an initialization file named .nuosql.init, located in the user’s HOME directory, if it exists. This option can be used to override this default path and filename. This allows the user to specify a SQL command file to be executed every time nuosql starts up. After connecting to the database and executing all the commands in the init file, nuosql displays the usual command line prompt and waits for additional commands to be entered interactively.

--log file_name

Specifies the name of a file to which logging will be redirected. Used in conjunction with --verbose below.


When running nuosql interactively, every SQL statement must end with a semicolon ( ; ). With this option, nuosql will not require a semicolon command terminator. Instead, nuosql will execute each line as a separate SQL command.

--pager cmd

Specifies a command through which to pipe all query output. See Paginating NuoDB SQL Output.

--schema schema_name

This is the schema that will be active when nuosql first connects to the database. Users can change to another schema by using the USE command (see USE) or by creating a new schema (see CREATE SCHEMA). If the --schema command line option is not provided, the nuosql session initial schema is USER. Any DDL commands issued to create new database objects will be owned by the USER schema.


The default when using the --file option is to not show a SQL prompt before and after executing SQL commands. This option will show the prompt, similar to running the nuosql command line tool interactively. This prompt will not be written to the history file. This option can be useful when reading commands from a file and redirecting output to another file.

--prompt custom_prompt

This optional parameter enables you change the default SQL prompt to any given string. This option is useful when multiple environments are available. After customizing the prompt in this way, you have a visual reminder of the environment you are connected to, rather than having the same generic prompt for all nuosql connections.

--timer [on | off | full ]

Report elapsed time for each SQL statement to execute. The off mode is default. The on mode reports the elapsed time taken by the nuosql client. The full mode reports the elapsed time taken by the nuosql client and additionally for non-DDL SQL statements, reports the elapsed time spent by the server (Transaction Engine) to process the command.

--verbose [debug | info | warn | i18n ]

Report details in each level of logging or, for internationalization, the category of logging. As an example: --verbose i18n means log all debug, info, or warn level logging regarding nuosql internationalization. By default, logging is sent to stdout. Alternatively, logging can be redirected to a file using the --log option above.


Displays the version of the broker to which nuosql is connected.


Specifies that columns in rows should be displayed vertically, rather than horizontally. See Displaying NuoDB SQL Output Vertically.