OmniSciDB supports JDBC connections.
You can connect securely to a JDBC session by defining the database URL (a colon-separated connection string with optional query string) and the keys/values in
You can define key values separated by colons in the main part of the connection string , or as key/value pairs separated by an ampersand (&) in an optional query string following the ? character.
jdbc:omnisci:<host_name>must be defined in the main part of the connection string.
Valid keys in the connection URL are the same as those in the properties object. If defined in the main part of the connection string, they must appear in the following order:
host_name- Name of the host. Must be defined in the main part of the connection string.
port_num- Port number
db_name- Name of the database.
For more information, see OmniSci server configuration.
- To connect using a secure connection through binary mode, the OmniSci server must be running with an encrypted main port open.
- Use binary TLS mode to explicitly connect using SSL with the default Java trust stores.
- To connect using HTTPS, the OmniSci web server must be running with HTTPS enabled.
- To create an encrypted connection with no server validation, use
HTTPS_INSECURE. Note: Using
HTTPS_INSECUREis not recommended in a production environment.
trust_store_path- The path to a Java trust store holding the OmniSci server public certificate.
password- The password to the trust store.
pkiauth: true | false- Enable PKI authentication. If
- The client X509 public certificate is supplied to the server for verification. Use the
sslcertparameter to supply a file containing the certificate.
userparameter and the
passwordparameters are ignored and should be blank.
certificate-path- Path to the certificate and private key file, in PKCS12 format.
key-path- Path to the SSL key.
sslkey_password password- Password for the SSL key defined in
max_rows- The maximum number of rows to return.
You can use the following connection URLs to connect to an OmniSci database called
max_rowsset to 10000.
If duplicate information is supplied in different sources of connection information, sources have priority as follows:
- 1.The main part of the URL.
- 2.The query portion of the URL.
- 3.The Properties object.
In the following connection URL, the database
test_DBwould be used, and if logging is turned on, the driver would issue a warning:
The fields in the "main" colon-separated portion of the URL are interpreted strictly in the order defined in the list of keys:
port_num, followed by
db_name, and so on. All of these fields can be specified in this portion of the connection string; however to specify a
max_rowsfield this way, all the preceding values must also be specified. Empty fields are not allowed. In this case, consider using a Properties object or a the query string portion of the URL.
You can also provide all options and parameters for a JDBC connection in a Java properties file; for example:
Clear all warnings reported for this connection object. After calling
Disconnect the JDBC client session and frees associated resources.
Get a new, empty Statement object.
Get the Connection object current catalog name.
Get the first warning reported by calls on this Connection object.
Get the closed status of this Connection object:
Get the connection status:
Create a PreparedStatement object. OmniSciDB makes no distinction between prepared and directly executed statements and queries.
Get the driver determination of whether or not it can open a connection to the URL.
Make a database connection to the specified URL.
Get the driver major version number.
Get the driver minor version number.
Get the parent Logger of all Loggers used by this driver.
Get driver property information.
Test if this driver is a JDBC-compliant driver.
Execute a SELECT query.
Execute an INSERT or DROP statement.
Get the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
Get the maximum number of rows that a ResultSet object produced by this Statement object can contain.
Get a new DatabaseMetaData object.
Set the limit for the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
Set the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number. Default is 100,000 rows. If you do not specify a