HCL OneDB JDBC Driver properties

The following table lists most of the HCL OneDB™ properties supported by the client JDBC driver. For server-side JDBC, use property settings in the database URL rather than setting properties, because the properties would apply to all programs running in the database server. For more information about properties, see Specify Connection Properties.

For a list of properties that provide globalization features, see Globalization and date formats. For a list of properties useful for troubleshooting, see Tuning and troubleshooting
HCL OneDB JDBC properties Default Value Description
appendIsamCodeToSqlException false When set to true, the APPENDISAM property appends the ISAM Error code and message (if present) to the SQL Exception message, which is shown when .toString() or .getMessage() of an SQL Exception is called. The exception message is shown in the following format:
<SQL ERROR MESSAGE> (<SQLCODE>)
ISAM error: <ISAM MESSAGE>(<ISAM CODE>)
autoCaseSchema false
autoFreeCursors false When set to true, specifies that the Statement.close() method does not require a network round trip to free the database server cursor resources if the cursor has already been closed in the database server.

The database server automatically frees the cursor resources after the cursor is closed, either explicitly by the ResultSet.close() method or implicitly through the optOFC property. After the cursor resources have been freed, the cursor can no longer be referenced. For more information, see The Auto Free feature.

batchInsertPreprocessing false When set to true, enables more efficient bulk inserts on data inserted with JDBC API calls for batched inserts. For more information, see Perform bulk inserts.
certificateVerification true Validate the certificates used for the encrypted connection
CLIENT_LOCALE The locale + encoding of the characters the client application wants to receive from the JDBC driver.
commitBeforeIsolationChange false

Whether you want the driver to automatically commit the current transaction if it detects you are trying to change the transaction isolation level for the session.

connectionCleanerDelay 15000

Number of milliseconds for the cleaner thread to wait until it looks for more JDBC resources to clean up.

Set to 0 or -1 to disable the cleaner thread

customNLSMap Allows new mappings to be defined between NLS and Java development kit locales and code sets.

For more information, see User-defined locales.

database The database the connection should be established against.
DB_LOCALE The locale + encoding of the database you are connecting to.
DBANSIWARN false When set to true, checks for HCL OneDB extensions to ANSI-standard syntax
defaultCursorHoldability 2 Indicate the default cursor holdability See {@link ResultSet#HOLD_CURSORS_OVER_COMMIT}.
delimident false When set to true, specifies that strings set off by double quotation marks are delimited identifiers
udtCache true When set to true, caches the data type information for opaque, distinct, or row data types.

When a Struct or SQLData object inserts data into a column and getSQLTypeName() returns the type name, the driver uses the cached information instead of querying the database server.

encrypt false When set to true, enables the connection to use SSL/TLS encryption for communication to the server.
encryptionProtocols TLSv1.2,TLSv1.1,TLSv1

Override the encryption protocols presented to the server using a comma separated list of valid JDK protocols that are also supported by your database server

GL_DATETIME
host Specifies the host name or IP address to connect to.
invalidAutoCommitThrowError Throws an exception if you disable autocommit (enabling transactions) on a non-logged database
lobBufferSize 16384 Size of buffer used to retrieve large objects from the server
lobCodesetConversionMemory -1

The amount of memory used for conversion of character codesets when processing large objects before using temporary files for caching.

If set to a number greater than or equal to 0, automates code-set conversion for TEXT and CLOB data types between client and database locales. The value of this variable determines whether code-set conversion is done in memory in or in temporary files. If set to 0, code-set conversion uses temporary files. If set to a value greater than 0, code-set conversion occurs in the memory of the client computer, and the value represents the number of bytes of memory allocated for the conversion. For more information, see Convert with the IFX_CODESETLOB environment variable.

lobReadonly false Whether BLOB/CLOB objects are forced to be readonly
lockTimeout -1

How long (in seconds) to wait on a lock on a server.

-1 Wait Forever
0 Do not wait
> 0 Wait X seconds
loginRetries 0 Number of times retry establishing a connection to the server
loginTimeout 15 Initial wait time in seconds to connect to the server
metadataReplicationColumn false Indicate to the server and DatabaseMetaData queries to use the ifx_replcheck column.
metadataUppercaseValues false Uppercase values from ResultSetMetaData queries
optOFC false When set to true, the ResultSet.close() method does not require a network round trip if all the qualifying rows have already been retrieved in the clients tuple buffer. The database server automatically closes the cursor after all the rows have been retrieved. HCL OneDB JDBC Driver might not have additional rows in the clients tuple buffer before the next ResultSet.next() method is called. Therefore, unless HCL OneDB JDBC Driver has received all the rows from the database server, the ResultSet.close() method might still require a network round trip when OPTOFC is set to true.
padVarchar false Simulate a CHAR column from a VARCHAR by padding the end of VARCHAR columns to the size of the column.
password Specifies the password that corresponds to the USER value set.
port 9088 Specifies the port number to connect to the database server with
preparedStatementCacheSize 0
protocolTraceFile File path to generate a protocol level trace file for support teams. Only enable the trace file when directed by a technical support representative.
queryBufferSize 4096 Overrides the default setting for the size of the fetch buffer for all data except large objects.
removeLobTempFilesOnRSClose false

Remove temporary files used with large objects when the ResultSet is closed.

If true when a ResultSet is closed, the temporary files are removed, and any references to BLOB/CLOB objects that reference those files will no longer function.

If false, then the temporary files can persist until the connection is closed.

replaceUnmappableCharacterSequences false

What to do if a character is not mappable from the database encoding to the client encoding.

true - replace the character with the charsets default replacement string

false - throw an error to indicate unmappable characters are present

secondaryServerName Server name for looking up a secondary server from a SQLHOST file
secondarySwitch false When set to true, secondary server properties are used to connect to the secondary server if the primary server is unavailable.
secondaryHost Host or IP address of the secondary server
secondaryPort Port of the secondary server
serverName Specifies which database server a connection is made to by a client application when looking up via a SQLHOSTS file
sessionVariables HCL OneDB server allows the setting of many variables at the session (Connection) level. Instead of executing a SET ENVIRONMENT SQL statement for each settion variable that needs set, you can specify a comma separated list of session variables. You end the list with a semi-colon as you would any other connection property

Below is an example of mixing in a number of session variables along with normal connection properties.

user=myuser;sessionVariables=AUTOLOCATE = '1',EXTDIRECTIVES=OFF , force_ddl_exec='OFF';password=mypassword

See SET ENVIRONMENT statement for the list of session variables you can set.

SQLH_LOC Path to a client SQLHOST file which contains entries on servers the driver can connect to.
SQLH_TYPE When set to FILE, specifies that database information (such as host-name, port-number, user, and password) is specified in an sqlhosts file.

When set to LDAP, specifies that this information is specified in an LDAP server. For more information, see Dynamically reading the HCL OneDB sqlhosts file.

socketTimeout 0 - Wait forever How long to wait in milliseconds for a response on the TCP socket
socketKeepAlive false Enable keep alive on the TCP socket connection
serverName 0
tempDir Specifies where temporary files for handling smart large objects are created. You must supply an absolute path name.
transactionIsolationLevel Defines the degree of concurrency among processes that attempt to access the same rows simultaneously.

Possible values:

0 Equivalent to TRANSACTION_NONE
1 Dirty Read (equivalent to TRANSACTION_READ_UNCOMMITTED)
2 Committed Read (equivalent to TRANSACTION_READ_COMMITTED
3 Cursor Stability (equivalent to TRANSACTION_READ_COMMITTED)
4 Repeatable Read (equivalent to TRANSACTION_REPEATABLE_READ)
5 Committed Read LAST COMMITTED (equivalent to TRANSACTION_LAST_COMMITTED)
8 Equivalent to TRANSACTION_SERIALIZABLE

Specifying U after the mode means retain update locks. For example, a value could be: 2U (equivalent to SET ISOLATION TO COMMITTED READ RETAIN UPDATE LOCKS

trimTrailingSpaces false Removes trailing spaces from character columns queried from the database server
trustStore Specifies the location of the truststore to load by the JDBC driver.
trustStorePassword Specifies the password to the truststore that is being loaded by the JDBC driver.
trustedContext false When set to true, a trusted connection request is sent from client. Either a successful trusted connection is established or the following error is returned from the server: SQL Exception : -28021(Trusted Connection request rejected.)
uppercaseMetaDataRSColumnNames false Return UPPERCASE column names in the link DatabaseMetaData ResultSet column names.
user The user which you want to authenticate to the database server with.

For a detailed description of a particular property, see HCL OneDB Guide to SQL: Reference.

Code example lockTimeout property

Connection conn = DriverManager.getConnection ( "jdbc:onedb://localhost:9080/stores_demo;user=rdtest;password=my_passwd;lockTimeout=15");

Code example transactionIsolationLevel property

Connection conn = DriverManager.getConnection( "jdbc:onedb://localhost:9088;
user=rdtest;password=my_passwd;transactionIsolationLevel=1U");
Important: The isolation property can be set in the URL only when it is an explicit connection to a database.