Commands Supported by the Ocient JDBC CLI Program
Commands are not case-sensitive.
For DDL statements, see Data Definition Language (DDL) Statement Reference.
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.
CANCEL
Cancels the current query that is still running on the system.
Syntax
CONNECT
Connects to a SQL Node. For details on the connection steps, see Connect Using JDBC.
Syntax
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.
JDBC URL parameters
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=;
DESCRIBE TABLE
Lists the columns of the specified table and its associated data types.
Syntax
DESCRIBE VIEW
Returns the query text used to create the specified view.
Syntax
EXTRACT
Extracts a result set in delimited files to a specified location. For details about using this command, see Data Extract Tool.
Syntax
GET JDBC VERSION
Returns the JDBC version of the driver.
Syntax
GET SCHEMA
Retrieves the default name schema for tables.
Syntax
KILL
Issues a hard kill command to the virtual machine to terminate a query running on the system. Use only if CANCEL fails.
Syntax
LIST ALL QUERIES
List all the currently executing queries on the database. This is the equivalent of executing SELECT * FROM sys.queries.
Syntax
LIST INDEXES
Lists the indexes on the specified table and its columns.
Syntax
LIST SYSTEM TABLES
Lists all system catalog tables in the database.
Syntax
LIST TABLES
Lists all tables (in all schemata) in the database.
Syntax
LIST VIEWS
Lists all views (in all schemata) in the database.
Syntax
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.
Syntax
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.
Add APPEND to add output to the specified file instead of overwriting it.
Syntax
PERFORMANCE
Enables different levels of query result output for measuring benchmarks by using different performance options.
Syntax
PERFORMANCE ON mode has been removed as of JDBC version 3.0.
QUIT
Closes the command-line interface.
Syntax
REPORT LOG ON
Enables Apache® Log4J 2™ -based metrics collection and redirects reporting events to the configured appenders.
The REPORT LOG ON command requires JDBC driver version 2.88 or later.
The Log4j configuration determines the destination for report logs. The Ocient logger name is 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
Rollover Policies
TimeBasedTriggeringPolicySizeBasedTriggeringPolicy (100MB)
You can retrieve the default configuration from the ocient-jdbc4 jar file by using an archive utility like unzip. For example:
Syntax
REPORT LOG OFF
Disables file-based metrics collection.
The REPORT LOG OFF command requires JDBC driver version 2.88 or later.
Syntax
SELECT
Retrieves the appropriate result set of a SQL SELECT statement.
Syntax
SET MAXROWS
Sets the maximum number of rows allowed in a result set. Applies only to the statement object that executed the command.
Syntax
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.
Syntax
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.
Syntax
SET MAXTEMPDISK
Sets the maximum percentage of temporary disk used by queries. Applies only to the statement object that executed the command.
Syntax
SET MAXTIME
Sets the maximum query time. Applies only to the statement object that executed the command.
Syntax
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.
The parallelism value limits a query to running on the specified number of cores on each CPU.
Syntax
SET PRIORITY
Sets the scheduling priority to use for queries. Applies only to the statement object that executed the command.
Syntax
SET SCHEMA
Changes the default schema for tables. Applies only to the statement object that executed the command.
Syntax
SET SERVICECLASS
Limits a query to using the specified service class. Applies only to the statement object that executed the command.
Syntax
SOURCE
Reads and executes commands found in the specified file.
Syntax
TIMING
Enables or disables reporting the execution time of each query.
Syntax

