solidDB Help : solidDB reference : Command line options : solidDB SQL Editor (solsql) command line syntax
  
solidDB SQL Editor (solsql) command line syntax
Start solidDB SQL Editor (solsql) with the command solsql, followed by argument options. For information about using solsql, see solidDB SQL Editor (solsql).
The syntax for starting solsql is:
solsql [options] [network_name] username [password]
where
network_name is the network name of a solidDB server that you are connected to, see Network listening names (Com.Listen). The given network name must be enclosed in quotation marks. Logical data source names can also be used with the solidDB tools.
If you are connecting to a solidDB grid, include grid in the network name, for example:
solsql "grid tcp myhost1 1964" dba dba
For more information, see Connecting to a grid.
username is required to identify the user and to determine the authorization level of the user authorization. Without appropriate rights, command execution is denied.
password is the password associated with username. The password is mandatory, if the password is not read from a file (defined with option -x pwdfile: filename), or optional, if the password is read from a file.
If the username and password are specified at the command line, the network_name must also be specified.
If the name of the SQL script file is specified at the command line (except with the -f option), the network_name, username, and password must also be specified.
options are described in the following table:
 
Option syntax
Description
-a
Autocommits every statement
-c dir
Changes working directory
-e sql-string
Executes the specified SQL string.
If you use this option, you can use only the -a option (autocommit) to commit work.
-f filename
Executes SQL strings from the specified file.
Uses this option to execute SQL statements programmatically from a script.
-o filename
Writes result set to the specified file
-O filename
Appends result set to the specified file
-S schema_name
Uses only the specified schema
-C catalog_name
Uses only the specified catalog
-t
Prints execution time per command
-tt
Prints the time of prepare, execute, and fetch operations per command
-2
Creates two connections to the database.
You can switch between the two connections with the command switch.
-u
In Unicode databases (General.InternalCharEncoding=UTF8), expect the data in character and wide character data type columns to be encoded in UTF-8.
In partial Unicode databases (General.InternalCharEncoding=Raw), expect the data in wide character data type columns to be encoded in UTF-8. Data in character data type columns is not converted.
See Using solidDB tools with Unicode for more information.
-m
In Unicode databases (General.InternalCharEncoding=UTF8), expect the data in character and wide character data type columns to be encoded in the console locale/codepage, despite the settings in the server-side and client-side character data binding parameters.
In partial Unicode databases (General.InternalCharEncoding=Raw), expect the data in wide character data type columns to be encoded in the console locale/codepage, despite the settings in the server-side and client-side character data binding parameters. Data in character data type columns is not converted.
See Using solidDB tools with Unicode for more information.
-M locale_name
In Unicode databases (General.InternalCharEncoding=UTF8), expect the data in character and wide character data type columns to be encoded in the specified locale/codepage.
In partial Unicode databases (General.InternalCharEncoding=Raw), expect the data in wide character data type columns to be encoded in the specified locale/codepage. Data in character data type columns is not converted.
The format of locale_name depends on the operating system.
For example, in Linux environments, the locale name for the code page GB18030 in Chinese/China is zh_CN.gb18030.
In Windows environments, the locale name for Latin1 code page in Finnish/Finland is fin_fin.1252.
See Using solidDB tools with Unicode for more information.
-h
-?
Displays command usage
-x onlyresults
Prints only the rows of the result set.
The SQL statement for which the rows are printed must be given using the -e sql-string option.
solsql -x onlyresults -e "SELECT * FROM customerid" "tcp 2315" dba dba
-x pwdfile: filename
Reads password from the file specified with filename
-x stoponerror
Forces a shutdown of solsql immediately when an error is detected
-x returnerroronexit
Displays return codes for SQL errors and user raised procedure errors. The possible return codes are:
Code 60: the execution of an SQL statement fails
Code 61: a procedure call returns an error
If several SQL statements or procedure calls fail during the execution of an SQL script, the returned code is that of the first failure.
-x outputsql
Prints out the executed SQL commands instead of only printing out the results of each operation
Go up to
Command line options