Configuring NuoDB SQL
The mandatory and optional
nuosql parameters are described below.
Specification of at least one database name is required. You must specify this option on the
nuosqlcommand line. That is, you cannot specify this option in the
nuosqlconfiguration file (see Using the NuoDB SQL Configuration File).
In a production environment, specify one database name in the following format. The specifying of
On Windows, the specification of a host is mandatory.
test test@localhost firstname.lastname@example.org:48004
In a development environment, it might be helpful to specify more than one database name or specify the same database name and vary the
port. If you specify more than one database name,
nuosqltries to use the first specification to connect. If that succeeds then the other specifications are not tried. If the first specification fails then
nuosqltries 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.
--configis 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).
--configis not specified. This is the password for the user specified in the
nuosqlcommand, by default, reads a configuration file named
.nuosql.config, located in the user’s
HOMEdirectory, 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
nuosqlclient 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.
Specifies the name of a batch file that contains one or more SQL statements to be executed by the
file_namemay also include the path. Using this option,
nuosqlconnects 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
nuosqlcommand. However, using the
--fileoption 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.
nuosqlcommand, by default, writes all SQL commands that are executed to a file named
.nuosql.history, which is located in the user’s
HOMEdirectory. 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.
nuosqlcommand, by default, reads an initialization file named
.nuosql.init, located in the user’s
HOMEdirectory, 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
nuosqlstarts up. After connecting to the database and executing all the commands in the init file,
nuosqldisplays the usual command line prompt and waits for additional commands to be entered interactively.
Specifies the name of a file to which logging will be redirected. Used in conjunction with
nuosqlinteractively, every SQL statement must end with a semicolon ( ; ). With this option,
nuosqlwill not require a semicolon command terminator. Instead,
nuosqlwill execute each line as a separate SQL command.
Specifies a command through which to pipe all query output. See Paginating NuoDB SQL Output.
This is the schema that will be active when
nuosqlfirst connects to the database. Users can change to another schema by using the
USEcommand (see USE) or by creating a new schema (see CREATE SCHEMA). If the
--schemacommand line option is not provided, the
nuosqlsession initial schema is
USER. Any DDL commands issued to create new database objects will be owned by the
The default when using the
--fileoption is to not show a
SQLprompt before and after executing SQL commands. This option will show the prompt, similar to running the
nuosqlcommand 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.
This optional parameter enables you change the default
SQLprompt 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
--timer [on | off | full ]
Report elapsed time for each SQL statement to execute. The
offmode is default. The
onmode reports the elapsed time taken by the
fullmode reports the elapsed time taken by the
nuosqlclient 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 i18nmeans log all
warnlevel logging regarding
nuosqlinternationalization. By default, logging is sent to
stdout. Alternatively, logging can be redirected to a file using the
Displays the version of the broker to which
Specifies that columns in rows should be displayed vertically, rather than horizontally. See Displaying NuoDB SQL Output Vertically.