All commands, except QUIT, must end with a semicolon at the command line.
You can cancel any query that does not update data by pressing CTRL+C.
The HTTP Query API does not support transactions. To use transactions, connect to the Ocient System with the JDBC driver or the pyocient module.
The Connector supports transactions and performs the commit and rollback actions automatically. When you use the Spark Connector, you do not need to issue COMMIT or ROLLBACK commands.
CANCEL
Cancels the current query that is still running on the system. SyntaxShell
COMMIT
Commits the current transaction and permanently saves all changes made after the transaction started. This command applies only when you disable autocommit with SET AUTOCOMMIT. When autocommit is enabled, COMMIT has no effect. SyntaxShell
commit() method on the JDBC Connection object.
CONNECT
Connects to a SQL Node. For details on the connection steps, see Connect Using JDBC. SyntaxShell
The
<url> parameter must follow this format:jdbc:ocient://node_address1:port1[,node_address2:port2[,...]]/database_name[;property=value[;...]]If you do not specify the
username and password, then the database uses the default credentials specified at startup.
Additional JDBC URL Parameters
The JDBC URL can include these optional parameters in the key-value format
property=value. Separate each parameter pair by semicolons.
URL parameters are case-insensitive.
To authenticate using Single Sign-On, set the
handshake parameter to SSO and leave the user and password parameters empty. For example: jdbc:ocient://DNSName:Port[,IP2:Port2,...]/databaseName;handshake=SSO;user=;password=;The JDBC driver also supports system properties that apply globally across all connections. To set these properties, use the
-D flag at JVM startup. For details, see JVM System Properties.DESCRIBE TABLE
Lists the columns of the specified table and its associated data types. SyntaxShell
DESCRIBE VIEW
Returns the query text used to create the specified view. SyntaxShell
EXTRACT
Extracts a result set in delimited files to a specified location. For details about using this command, see Data Extract Tool. SyntaxSQL
GET JDBC VERSION
Returns the JDBC version of the driver. SyntaxShell
GET SCHEMA
Retrieves the default name schema for tables. SyntaxShell
KILL
Issues a hard kill command to the virtual machine to terminate a query running on the system. Use only ifCANCEL fails.
Syntax
Shell
LIST ALL QUERIES
List all the currently executing queries on the database. This is the equivalent of executingSELECT * FROM sys.queries.
Syntax
Shell
LIST INDEXES
Lists the indexes on the specified table and its columns. SyntaxShell
LIST SYSTEM TABLES
Lists all system catalog tables in the database. SyntaxShell
LIST TABLES
Lists all tables (in all schemata) in the database. SyntaxShell
LIST VIEWS
Lists all views (in all schemata) in the database. SyntaxShell
OUTPUT GIS KML
Outputs the next query in KML format to the specified filename. This flag affects only the next query. This syntax prints out all GIS types to the KML file, and non-GIS types are added to the description of elements in the same row. You can upload this KML file to certain visualization tools. SyntaxShell
OUTPUT NEXT QUERY
Output the next query in CSV format to the specified filename. This flag only affects the next query. All subsequent queries print out their results. AddAPPEND to add output to the specified file instead of overwriting it.
Syntax
Shell
PERFORMANCE
Enables different levels of query result output for measuring benchmarks by using different performance options. SyntaxShell
PERFORMANCE ON mode has been removed as of JDBC version 3.0.QUIT
Closes the command-line interface. SyntaxShell
REPORT LOG ON
Enables -based metrics collection and redirects reporting events to the configured appenders.The
REPORT LOG ON command requires JDBC driver version 2.88 or later.com.ocient.util.ReportLogger. For details about configuring Log4j, see the Log4j documentation.
The default Log4j configuration routes report logs to the RollingFileAppender. The default configuration includes these settings:
Properties
fileName="logs/${sys:ocient.jdbc.sessionId:-unknown}/report.log"filePattern="logs/${sys:ocient.jdbc.sessionId:-unknown}/%d{yyyy-MM-dd}-%i-report.log.gz"
TimeBasedTriggeringPolicySizeBasedTriggeringPolicy (100MB)
ocient-jdbc4 jar file by using an archive utility like unzip. For example:
Shell
Shell
REPORT LOG OFF
Disables file-based metrics collection.The
REPORT LOG OFF command requires JDBC driver version 2.88 or later.Shell
ROLLBACK
Rolls back the current transaction and discards all changes made after the transaction started. This command applies only when you disable autocommit with SET AUTOCOMMIT. When autocommit is enabled, ROLLBACK has no effect. SyntaxShell
rollback() method on the JDBC Connection object.
SELECT
Retrieves the appropriate result set of a SQLSELECT statement.
Syntax
Shell
SET AUTOCOMMIT
Enables or disables the autocommit mode for the connection. When autocommit is enabled, the database commits each statement immediately. This mode is the default. When autocommit is disabled, the database groups statements into a transaction that you complete with the COMMIT or ROLLBACK commands. When you change autocommit fromOFF to ON, the database commits any pending transactions.
Syntax
Shell
ON or OFF, respectively. When you enter the ON value, the database commits each statement immediately. This value is the default. When you enter the OFF value, the database groups subsequent statements into a transaction until you enter the COMMIT or ROLLBACK command.
SET MAXROWS
Sets the maximum number of rows allowed in a result set. Applies only to the statement object that executed the command. SyntaxShell
SET ADJUSTFACTOR
Adjusts the query priority by a specified percentage amount at every interval set by the SET ADJUSTTIME command.The
SET ADJUSTFACTOR command requires JDBC driver version 2.52 or later.Shell
SET ADJUSTTIME
Modifies how frequently the query priority is adjusted during the course of execution.The
SET ADJUSTTIME command requires JDBC driver version 2.52 or later.Shell
SET MAXTEMPDISK
Sets the maximum percentage of temporary disk used by queries. Applies only to the statement object that executed the command. SyntaxShell
SET MAXTIME
Sets the maximum query time. Applies only to the statement object that executed the command. SyntaxShell
SET PARALLELISM
Sets a limit on the number of cores on each CPU that can be allocated to running the query. Applies only to the statement object that executed the command. Theparallelism value limits a query to running on the specified number of cores on each CPU.
Syntax
Shell
SET PRIORITY
Sets the scheduling priority to use for queries. Applies only to the statement object that executed the command. SyntaxShell
SET SCHEMA
Changes the default schema for tables. Applies only to the statement object that executed the command. SyntaxShell
SET SERVICECLASS
Limits a query to using the specified service class. Applies only to the statement object that executed the command. SyntaxShell
SOURCE
Reads and executes commands found in the specified file. SyntaxShell
TIMING
Enables or disables reporting the execution time of each query. SyntaxShell

