7 Oracle Driver : Connection Properties

Connection Properties
This section lists the JDBC connection properties supported by the Oracle driver and describes each property. The properties have the form:
property=value
You can use these connection properties with either the JDBC Driver Manager or DataDirect Connect Series for JDBC data sources unless otherwise noted.
NOTES:
■
All connection property names are case-insensitive. For example, Password is the same as password. Required properties are noted as such.
■
AccountingInfo
Description
Accounting information to be stored in the database. This property sets the CLIENT_INFO column of the V$SESSION table in the database.
Valid Values
string
where string is the accounting information.
NOTE: Your database may impose character length restrictions on the value. If the value exceeds a restriction, the driver truncates it.
Default
empty string
Data Type
String
See Also
“Using Client Information”
Action
Description
The current action (Select, Insert, Update, or Delete, for example) within the current module. This property sets the ACTION column of the V$SESSION table in the database and is used for database administration/monitoring purposes.
Valid Values
string
where string is the current action.
NOTE: Your database may impose character length restrictions on the value. If the value exceeds a restriction, the driver truncates it.
Default
empty string
Data Type
String
See Also
“Using Client Information”
AlternateServers
Description
A list of alternate database servers that is used to failover new or lost connections, depending on the failover method selected. See the FailoverMode property for information about choosing a failover method.
If using a tnsnames.ora file to retrieve connection information, do not specify this property. See “Using tnsnames.ora Files” for more information.
Valid Values
(servername1[:port1][;property=value[;...]][,servername2[:port2]
[;property=value[;...]]]...)
The server name (servername1, servername2, and so on) is required for each alternate server entry. Port number (port1, port2, and so on) and connection properties (property=value) are optional for each alternate server entry. If the port is unspecified, the port number of the primary server is used. If the port number of the primary server is unspecified, the default port number of 1521 is used.
Optional connection properties are ServiceName and SID.
NOTE: If using failover with an Oracle RAC, the primary server must be a primary node and any alternate server must be a secondary node.
Example
The following URL contains alternate server entries for server2 and server3. The alternate server entries contain the optional ServiceName property. Similarly, you can use the optional SID property instead.
jdbc:datadirect:oracle://server1:1521;ServiceName=TEST;
AlternateServers=(server2:1521;ServiceName=TEST2,server3:1521;
ServiceName=TEST3)
Default
None
Data type
String
See Also
“Configuring Failover”
ApplicationName
Description
The name of the application to be stored in the database. This property sets the dbms_session value and the PROGRAM column of the V$SESSION table in the database. These values are used for database administration/monitoring purposes.
Valid Values
string
where string is the name of the application.
NOTE: Your database may impose character length restrictions on the value. If the value exceeds a restriction, the driver truncates it.
If a value for this property is not specified, the driver sets the PROGRAM value of V$SESSION to the name of the main class.
Default
empty string
Data Type
String
See Also
“Using Client Information”
AuthenticationMethod
Description
Determines which authentication method the driver uses when establishing a connection.
Valid Values
auto | kerberos | kerberosUIDPassword | ntlm | client | userIDPassword
If set to auto, the driver uses user ID/password, Kerberos, or NTLM authentication when establishing a connection. The driver selects an authentication method based on a combination of criteria, such as whether the application provides a user ID, the driver is running on a Windows platform, and the driver can load the DLL required for NTLM authentication. See “Using the AuthenticationMethod Property” for more information about using this value.
If set to kerberos, the driver uses Kerberos authentication. The driver ignores any user ID or password specified.
If set to kerberosUIDPassword, the driver first uses Kerberos to authenticate the user. Next, the driver reauthenticates the user using user ID/password authentication. If a user ID and password are not specified, the driver throws an exception. If either Kerberos or user ID/password authentication fails, the connection attempt fails and the driver throws an exception.
If set to ntlm, the driver uses NTLM authentication if the DLL required for NTLM authentication can be loaded. If the driver cannot load the DLL, the driver throws an exception. The driver ignores any user ID or password specified. This value is supported for Windows clients only.
If set to client, the driver uses the user ID of the user logged onto the system on which the driver is running to authenticate the user to the database. The Oracle database server relies on the client to authenticate the user and does not provide additional authentication. The driver ignores any user ID or password specified. This value requires the remote_os_authent parameter on the database server to be set to true.
If set to userIdPassword, the driver uses user ID/password authentication. If a user ID and password are not specified, the driver throws an exception.
NOTES:
■
The values type2 and none are deprecated, but are recognized for backward compatibility. Use the ntlm and userIdPassword values, respectively, instead.
■
The User property provides the user ID. The Password property provides the password.
■
If NewPassword is specified, its value is used only if user ID/password authentication is enabled explicitly (AuthenticationMethod=userIdPassword) or implicitly (AuthenticationMethod=auto and a user ID and password is supplied); otherwise, the driver throws an exception.
Default
auto
Data Type
String
See Also
“Authentication”
BatchPerformanceWorkaround
Description
Determines the method that is used to execute batch operations.
Valid Values
true | false
If set to true, the driver uses the native Oracle batch mechanism. The native batch mechanism does not return individual update counts for each statement or parameter set in the batch. For this reason, the driver returns a value of SUCCESS_NO_INFO (-2) for each entry in the returned update count array. If an application can accept not receiving update count information, setting this property to true can significantly improve performance.
If set to false, the driver uses the JDBC 3.0-compliant batch mechanism.
Default
false
Data Type
boolean
See Also
“Batch Inserts and Updates”
“Performance Considerations”
BulkLoadBatchSize
Description
Provides a suggestion to the driver for the number of rows to load to the database at a time when bulk loading data. Performance can be improved by increasing the number of rows the driver loads at a time because fewer network round trips are required. Be aware that increasing the number of rows that are loaded also causes the driver to consume more memory on the client.
NOTES:
■
This property suggests the number of rows regardless of which bulk load method is used: using a DDBulkLoad object or using bulk load for batch inserts.
■
The DDBulkObject.setBatchSize() method overrides the value that is set by this property. Refer to Chapter 2 “JDBC Extensions” in the DataDirect Connect Series for JDBC Reference for a description of the method.
Valid Values
x
where x is a positive integer that represents a number of rows.
Default
2048
Data Type
long
See Also
“Using DataDirect Bulk Load”
BulkLoadOptions
Description
Enables bulk load protocol options for batch inserts that the driver can take advantage of when the EnableBulkLoad property is set to a value of true.
This property only applies to connections to Oracle 11g R2 and higher database servers.
Valid Values
0 | 128
If set to 0 or unspecified, the bulk load operation continues even if a value that can cause an index to be invalidated is loaded.
If set to 128, the NoIndexErrors option stops a bulk load operation when a value that would cause an index to be invalidated is loaded. For example, if a value is loaded that violates a unique or non-null constraint, the driver stops the bulk load operation and discards all data being loaded, including any data that was loaded prior to the problem value.
Default
None
Data Type
int
See Also
“Using DataDirect Bulk Load”
CatalogOptions
Description
Determines which type of metadata information is included in result sets when an application calls DatabaseMetaData methods.
Valid Values
0 | 1 | 2 | 3 | 6 | 8 | 10
If set to 0, result sets do not contain remarks or synonyms.
If set to 1, result sets contain remarks information that is returned from the following DatabaseMetaData methods: getColumns() and getTables().
If set to 2, result sets contain synonyms that are returned from the following DatabaseMetaData methods: getColumns(), getExportedKeys(), getFunctionColumns(), getFunctions(), getImportedKeys(), getIndexInfo(), getPrimaryKeys(), getProcedureColumns(), and getProcedures().
If set to 3, result sets contain both remarks and synonyms (as described for values 1 and 2).
If set to 6, a hint is provided to the driver to emulate getColumns() calls using the ResultSetMetaData object instead of querying database catalogs for column information. Result sets contain synonyms, but no remarks. Using emulation can improve performance because the SQL statement that is formulated by the emulation is less complex than the SQL statement that is formulated using getColumns(). The argument to getColumns() must evaluate to a single table. If it does not, because of a wildcard or null value, for example, the driver reverts to the default behavior for getColumns() calls.
If set to 8, result sets contain accurate metadata information for VARRAY, TABLE, and OBJECT data when the following DatabaseMetaData methods are called: getColumns(), getProcedureColumns(), and getFunctionColumns(). Setting this value can negatively impact performance.
If set to 10, results sets contain accurate metadata information for VARRAY, TABLE, and OBJECT data (as described for value 8) and synonyms for other data types (as described for value 2).
Default
2
Data Type
int
See Also
“Performance Considerations”
ClientHostName
Description
The host name of the client machine to be stored in the database. This property sets the MACHINE column in the V$SESSION table in the database. This value is used for database administration/monitoring purposes.
Valid Values
string
where string is the host name of the client machine.
NOTE: Your database may impose character length restrictions on the value. If the value exceeds a restriction, the driver truncates it.
If a value for this property is not specified, the driver uses the current machine name and IP address in the following format:
machine_name/IP_address
Default
empty string
Data Type
String
See Also
“Using Client Information”
ClientID
Description
Identifying information about the client to be stored in the database. This property sets the CLIENT_IDENTIFIER column in the V$SESSION table and is used for database administration/monitoring purposes.
This property only applies to connections to Oracle 10g R2 and higher database servers.
Valid Values
string
where string is additional information about the client.
NOTE: Your database may impose character length restrictions on the value. If the value exceeds a restriction, the driver truncates it.
If a value for this property is not specified, the driver sets the CLIENT_IDENTIFIER value of V$SESSION to the name of the main class.
Default
empty string
Data Type
String
See Also
“Using Client Information”
ClientUser
Description
The user ID to be stored in the database. This property sets the OSUSER column in the V$SESSION table. This value is used for database administration/monitoring purposes.
Valid Values
string
where string is a valid user ID.
NOTE: Your database may impose character length restrictions on the value. If the value exceeds a restriction, the driver truncates it.
Default
empty string
Data Type
String
See Also
“Using Client Information”
CodePageOverride
Description
The code page to be used by the driver to convert Character data. The specified code page overrides the default database code page or column collation. All Character data that is returned from or written to the database is converted using the specified code page. This option has no effect on how the driver converts character data to the national character set.
By default, the driver automatically determines which code page to use to convert Character data. Use this property only if you need to change the driver’s default behavior.
Valid Values
utf8 | sjis | enhanced_sjis | enhanced_sjis_oracle | ms932 | euc_jp_solaris
If set to utf8, the driver uses the UTF-8 code page to send data to the Oracle server as Unicode. The UTF-8 code page converts data from the Java String format UTF-16 to UTF-8. If you specify this value, the driver forces the value of the WireProtocolMode property to 2.
If set to sjis, the driver uses the SHIFT-JIS code page to convert character data to the JA16SJIS character set.
If set to enhanced_sjis, the driver uses the ENHANCED_SJIS code page to convert character data from the Java String format UTF-16 to SJIS as defined by the ICU character conversion library. In addition, it maps the following MS-932 characters to the corresponding SJIS encoding for those characters:
This value is provided for backward compatibility. Only use this value when the Oracle database character set is SHIFT_JIS.
If set to enhanced_sjis_oracle, the driver uses the ENHANCED_SJIS_ORACLE code page to convert Character data from the Java String format UTF-16 to Oracle’s definition of SJIS. When the driver connects to an Oracle database with a JA16SJIS character set, the driver uses this code page by default. The ENHANCED_SJIS_ORACLE code page is a super set of the MS932 code page. Only use this value when the Oracle database character set is SHIFT_JIS.
If set to ms932, the driver uses the Microsoft MS932 code page to convert Character data from the Java String format UTF-16 to SJIS. This value is provided for backward compatibility because earlier versions of the driver used the MS932 code page when converting Character data to JA16SJIS. Only use this value when the Oracle database character set is SHIFT_JIS.
If set to euc_jp_solaris, the driver uses the EUC_JP_Solaris code page to convert Character data to the EUC_JP character set.
Default
None
Data Type
String
CommitBehavior
Description
Determines the redo log behavior. Typically, redo changes that are generated by update transactions are written to disk immediately when an transaction is committed, and the session waits for the disk write to complete before returning control to the application. For Oracle 10g R2 and higher databases, the log writer can write the redo changes to disk in its own time instead of immediately and return control to the application before the disk write is complete instead of waiting. This property controls this behavior by setting the value of the Oracle COMMIT_WRITE session parameter.
Not waiting for redo log changes to be written to disk improves performance for applications that have both of the following characteristics:
■
■
Applications where data integrity is not critical. For example, most banking applications cannot tolerate data loss in the event that the server has a problem writing the redo log changes to disk or fails during the process, but many logging applications for diagnostic purposes can.
Valid Values
serverDefault | waitImmediate | waitBatch | noWaitImmediate | noWaitBatch
If set to serverDefault, the driver uses the redo log behavior that is set by the database server.
If set to waitImmediate, the commit operation does not return control to the application until redo changes are written to disk. Redo changes are written to disk immediately. Use this value if your application processes multiple update transactions one at a time.
If set to waitBatch, the commit operation does not return control to the application until redo changes are written to disk. The write task may be deferred by the server until additional transactions are ready to be written to disk. Use this value if your application processes multiple update transactions simultaneously. Using this value when an application performs only a few transactions decreases performance.
If set to noWaitImmediate, redo changes are written to disk immediately, but the commit operation returns control to the application without waiting for this operation to complete. Use this value if your application processes multiple update transactions one at time and data integrity is not critical.
If set to noWaitBatch, the redo write task may be deferred by the server until additional transactions are ready to be written to disk, but the commit operation returns control to the application without waiting for this operation to complete. Use this value if your application processes multiple update transactions simultaneously and data integrity is not critical.
Default
serverDefault
Data Type
String
See Also
“Performance Considerations”
ConnectionRetryCount
Description
The number of times the driver retries connection attempts to the primary database server, and if specified, alternate servers until a successful connection is established.
NOTE: If an application sets a login timeout value (for example, using DataSource.loginTimeout or DriverManager.loginTimeout), and the login timeout expires, the driver ceases connection attempts.
Valid Values
0 | x
where x is a positive integer that represents the number of retries.
If set to 0, the driver does not try to reconnect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established during the retry attempts, the driver returns an exception that is generated by the last database server to which it tried to connect.
NOTE: The ConnectionRetryDelay property specifies the wait interval, in seconds, to occur between retry attempts.
Example
If this property is set to 2 and alternate servers are specified using the AlternateServers property, the driver retries the list of servers (primary and alternate) twice after the initial retry attempt.
Default
5
Data Type
int
See Also
“Configuring Failover”
ConnectionRetryDelay
Description
The number of seconds the driver waits between connection retry attempts when ConnectionRetryCount is set to a positive integer.
Valid Values
0 | x
where x is a number of seconds.
If set to 0, the driver does not delay between retries.
If set to x, the driver waits between connection retry attempts the specified number of seconds.
Example
If ConnectionRetryCount is set to 2, this property is set to 3, and alternate servers are specified using the AlternateServers property, the driver retries the list of servers (primary and alternate) twice after the initial retry attempt. The driver waits 3 seconds between retry attempts.
Default
1 (second)
Data Type
int
See Also
“Configuring Failover”
ConvertNull
Description
Controls how data conversions are handled for null values.
Valid Values
0 | 1
If set to 0, the driver does not perform the data type check if the value of the column is null. This allows null values to be returned even though a conversion between the requested type and the column type is undefined.
If set to 1, the driver checks the data type being requested against the data type of the table column storing the data. If a conversion between the requested type and column type is not defined, the driver generates an "unsupported data conversion" exception regardless of the data type of the column value.
Default
1
Data Type
int
Database
Description
An alias for the DatabaseName property.
DatabaseName
Description
The SID or service name that refers to the instance of the Oracle database that is running on the database server. This property is mutually exclusive with the ServiceName and SID properties.
Valid Values
string
where string is the name of an Oracle instance.
Default
None
Data Type
String
Alias
Database property. If both the Database and DatabaseName properties are specified in a connection URL, the last property positioned in the connection URL is used. For example, if your application specifies the following connection URL, the value of the Database connection property would be used instead of the value of the DatabaseName connection property.
jdbc:datadirect:oracle://server1:1521;DatabaseName=ORCL;Database=ORCL_acct;
User=test;Password=secret
EditionName
Description
The name of the Oracle edition the driver uses when establishing a connection. Oracle 11gR2 and higher allows your database administrator to create multiple editions of schema objects so that your application can still use those objects while the database is being upgraded. This property is only valid for Oracle 11g R2 and higher databases and tells the driver which edition of the schema objects to use.
The driver uses the default edition in the following cases:
■
When the specified edition is not a valid edition. The driver generates a warning indicating that it was unable to set the current edition to the specified edition.
■
If failover is enabled using the FailoverMode property and a connection fails over to another database server, the driver connects to the alternate server using the same edition that was used for the failed connection. The driver does not track changes to the current edition made using the ALTER SESSION SQL statement. To change the edition for the new connection, set this property or use the setAttribute("editionName", propValue) method of the ExtConnection interface.
Valid Values
string
where string is the name of a valid Oracle edition.
Default
None
Data Type
String
EnableBulkLoad
Description
Specifies whether the driver uses the native bulk load protocols in the database instead of the batch mechanism for batch inserts. Bulk load bypasses the data parsing usually done by the database, providing an additional performance gain over batch operations. This property allows existing applications with batch inserts to take advantage of bulk load without requiring changes to the application code.
Valid Values
true | false
If set to true, the driver uses the native bulk load protocols for batch inserts.
NOTE: If set to true, any value set for BatchPerformanceWorkaround is ignored.
If set to false, the driver uses the batch mechanism for batch inserts.
Default
false
Data Type
boolean
See Also
“Using DataDirect Bulk Load”
“Performance Considerations”
EnableCancelTimeout
Description
Determines whether a cancel request that is sent as the result of a query timing out is subject to the same query timeout value as the statement it cancels.
Valid Values
true | false
If set to true, the cancel request times out using the same timeout value, in seconds, that is set for the statement it cancels. For example, if your application calls Statement.setQueryTimeout(5) on a statement and that statement is cancelled because its timeout value was exceeded, a cancel request is sent that also will time out if its execution exceeds 5 seconds. If the cancel request times out, because the server is down, for example, the driver throws an exception indicating that the cancel request was timed out and the connection is no longer valid.
If set to false, the cancel request does not time out.
Default
false
Data Type
boolean
EnableServerResultCache
Description
Determines whether the driver enables Oracle’s server-side resultset caching feature, which stores the result set in database memory so that it can be reused. Server-side resultset caching can improve performance if your application executes the same query multiple times.
This property only applies to connections to Oracle 11g database servers that support server-side resultset caching.
Valid Values
true | false
If set to true, the driver enables server-side resultset caching.
If set to false, the driver does not enable server-side resultset caching.
Default
false
Data Type
boolean
See Also
“Performance Considerations”
EncryptionMethod
Description
Determines whether data is encrypted and decrypted when transmitted over the network between the driver and database server.
NOTE: Connection hangs can occur when the driver is configured for SSL and the database server does not support SSL. You may want to set a login timeout using the LoginTimeout property to avoid problems when connecting to a server that does not support SSL.
Valid Values
noEncryption | SSL
If set to noEncryption, data is not encrypted or decrypted.
If set to SSL, data is encrypted using SSL. If the database server does not support SSL, the connection fails and the driver throws an exception.
When SSL is enabled, the following properties also apply:
HostNameInCertificate
KeyStore (for SSL client authentication)
KeyStorePassword (for SSL client authentication)
KeyPassword (for SSL client authentication)
TrustStore
TrustStorePassword
ValidateServerCertificate
Default
noEncryption
Data Type
String
See Also
“Data Encryption”
“Using tnsnames.ora Files”
“Performance Considerations”
FailoverGranularity
Description
Determines whether the driver fails the entire failover process or continues with the process if exceptions occur while trying to reestablish a lost connection. This property is ignored if FailoverMode=connect.
Valid Values
nonAtomic | atomic | atomicWithRepositioning
If set to nonAtomic, the driver continues with the failover process and posts any exceptions on the statement on which they occur.
If set to atomic, the driver fails the entire failover process if an exception is generated as the result of restoring the state of the connection. If an exception is generated as a result of restoring the state of work in progress, the driver continues with the failover process, but generates an exception warning that the Select statement must be reissued.
If set to atomicWithRepositioning, the driver fails the entire failover process if any exception is generated as the result of restoring the state of the connection or the state of work in progress.
Default
nonAtomic
Data Type
String
See Also
“Configuring Failover”
FailoverMode
Description
Specifies the type of failover method the driver uses.
If using a tnsnames.ora file to retrieve connection information, do not specify this property. See “Using tnsnames.ora Files” for more information.
Valid Values
connect | extended | select
If set to connect, the driver provides failover protection for new connections only.
If set to extended, the driver provides failover protection for new and lost connections, but not any work in progress.
If set to select, the driver provides failover protection for new and lost connections. In addition, it preserves the state of work that is performed by the last Select statement that is executed on the Statement object.
NOTES:
■
The AlternateServers property specifies one or multiple alternate servers for failover and is required for all failover methods. To turn off failover, do not specify a value for the AlternateServers property.
■
The FailoverGranularity property determines which action the driver takes if exceptions occur during the failover process.
■
The FailoverPreconnect property specifies whether the driver tries to connect to multiple database servers (primary and alternate) at the same time.
Default
connect
Data Type
String
See Also
“Configuring Failover”
FailoverPreconnect
Description
Specifies whether the driver tries to connect to the primary and an alternate server at the same time. This property is ignored if FailoverMode=connect.
Valid Values
true | false
If set to true, the driver tries to connect to the primary and an alternate server at the same time. This can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to succeed.
If set to false, the driver tries to connect to an alternate server only when failover is caused by an unsuccessful connection attempt or a lost connection. This value provides the best performance, but your application typically experiences a short wait while the failover connection is attempted.
NOTE: The AlternateServers property specifies one or multiple alternate servers for failover.
Default
false
Data Type
boolean
See Also
“Configuring Failover”
FetchTSWTZasTimestamp
Description
Determines whether column values with the TIMESTAMP WITH TIME ZONE data type are returned as a JDBC CHAR or TIMESTAMP data type.
This property only applies to connections to Oracle9i and higher.
Valid Values
true | false
If set to true, column values with the TIMESTAMP WITH TIME ZONE data type are returned as a JDBC TIMESTAMP data type.
If set to false, column values with the TIMESTAMP WITH TIME ZONE data type are returned as a JDBC VARCHAR data type.
Default
false
Data Type
boolean
See Also
“TIMESTAMP WITH TIME ZONE Data Type”
HostNameInCertificate
Description
Specifies a host name for certificate validation when SSL encryption is enabled (EncryptionMethod=SSL) and validation is enabled (ValidateServerCertificate=true). This property is optional and provides additional security against man-in-the-middle (MITM) attacks by ensuring that the server that the driver is connecting to is the server that was requested.
NOTES:
■
■
If SSL encryption and validation is enabled and this property is unspecified, the driver uses the server name that is specified in the connection URL or data source of the connection to validate the certificate.
Valid Values
host_name | #SERVERNAME#
where host_name is a valid host name.
If host_name is specified, the driver compares the specified host name to the DNSName value of the SubjectAlternativeName in the certificate. If a DNSName value does not exist in the SubjectAlternativeName or if the certificate does not have a SubjectAlternativeName, the driver compares the host name with the Common Name (CN) part of the certificate’s Subject name. If the values do not match, the connection fails and the driver throws an exception.
If #SERVERNAME# is specified, the driver compares the server name that is specified in the connection URL or data source of the connection to the DNSName value of the SubjectAlternativeName in the certificate. If a DNSName value does not exist in the SubjectAlternativeName or if the certificate does not have a SubjectAlternativeName, the driver compares the host name to the CN part of the certificate’s Subject name. If the values do not match, the connection fails and the driver throws an exception. If multiple CN parts are present, the driver validates the host name against each CN part. If any one validation succeeds, a connection is established.
Default
empty string
Data Type
String
ImportStatementPool
Description
Specifies the path and file name of the file to be used to load the contents of the statement pool. When this property is specified, statements are imported into the statement pool from the specified file.
If the driver cannot locate the specified file when establishing the connection, the connection fails and the driver throws an exception.
Valid Values
string
where string is the path and file name of the file to be used to load the contents of the statement pool.
Default
empty string
Data Type
String
See Also
“Using Statement Pooling”
Chapter 10 “Statement Pool Monitor” in the DataDirect Connect Series for JDBC Reference
“Performance Considerations”
InitialColumnBufferSize
Description
Specifies the initial size (in bytes) of the buffer in which the driver places column values when they are retrieved. This option sets the initial size only; the buffer will adjust dynamically as needed to accommodate larger values. For optimal memory usage, the size of the buffer only needs to be as large as the data it holds.
Valid Values
-1 | 0 | x
where x is an integer from 1 to 2147483648.
If set to -1 or 0, the driver automatically determines an initial column buffer size that is based on the width of the column being bound.
If set to x, the driver adjusts the buffer to the specified size.
Example
If the driver retrieves data from a CHAR(4000) column and that data is typically no more than 75 bytes in size, reducing the initial column buffer size to 75 bytes (InitialColumnBufferSize=75) will conserve memory on the client or application server.
Default
-1
Data Type
String
InitializationString
Description
Specifies one or multiple SQL commands to be executed by the driver after it has established the connection to the database and has performed all initialization for the connection. If the execution of a SQL command fails, the connection attempt also fails and the driver throws an exception indicating which SQL command or commands failed.
Valid Values
string
where string is one or multiple SQL commands.
Multiple commands must be separated by semicolons. In addition, if this property is specified in a connection URL, the entire value must be enclosed in parentheses when multiple commands are specified.
Example
jdbc:datadirect:oracle://server1:1521;ServiceName=ORCL;
InitializationString=(command1;command2)
Default
None
Data Type
String
InsensitiveResultSetBufferSize
Description
Determines the amount of memory that is used by the driver to cache insensitive result set data.
Valid Values
-1 | 0 | x
where x is a positive integer that represents the size of the memory buffer.
If set to -1, the driver caches insensitive result set data in memory. If the size of the result set exceeds available memory, an OutOfMemoryException is generated. With no need to write result set data to disk, the driver processes the data efficiently.
If set to 0, the driver caches insensitive result set data in memory, up to a maximum of 2 GB. If the size of the result set data exceeds available memory, the driver pages the result set data to disk. Because result set data may be written to disk, the driver may have to reformat the data to write it correctly to disk.
If set to x, the driver caches insensitive result set data in memory and uses this value to set the size (in KB) of the memory buffer for caching insensitive result set data. If the size of the result set data exceeds available memory, the driver pages the result set data to disk. Because the result set data may be written to disk, the driver may have to reformat the data to write it correctly to disk. Specifying a buffer size that is a power of 2 results in efficient memory use.
Default
2048
Data Type
int
See Also
“Performance Considerations”
JavaDoubleToString
Description
Determines which algorithm the driver uses when converting a double or float value to a string value. By default, the driver uses its own internal conversion algorithm, which improves performance.
Valid Values
true | false
If set to true, the driver uses the JVM algorithm when converting a double or float value to a string value. If your application cannot accept rounding differences and you are willing to sacrifice performance, set this value to true to use the JVM conversion algorithm.
If set to false, the driver uses its own internal algorithm when converting a double or float value to a string value. This value improves performance, but slight rounding differences within the allowable error of the double and float data types can occur when compared to the same conversion using the JVM algorithm.
Default
false
Data Type
boolean
JDBCBehavior
Description
Determines how the driver describes database data types that map to the following JDBC 4.0 data types: NCHAR, NVARCHAR, NLONGVARCHAR, NCLOB, and SQLXML.
This property is applicable only when the application is using Java SE 6 or higher.
Valid Values
0 | 1
If set to 0, the driver describes the data types as JDBC 4.0 data types when using Java SE 6 or higher.
If set to 1, the driver describes the data types using JDBC 3.0-equivalent data types, regardless of JVM. This allows your application to continue using JDBC 3.0 types in a Java SE 6 or higher environment.
Default
1
Data Type
int
KeyPassword
Description
Specifies the password that is used to access the individual keys in the keystore file when SSL is enabled (EncryptionMethod=SSL) and SSL client authentication is enabled on the database server. This property is useful when individual keys in the keystore file have a different password than the keystore file.
Valid Values
string
where string is a valid password.
Default
None
Data Type
String
KeyStore
Description
Specifies the directory of the keystore file to be used when SSL is enabled (EncryptionMethod=SSL) and SSL client authentication is enabled on the database server. The keystore file contains the certificates that the client sends to the server in response to the server’s certificate request.
This value overrides the directory of the keystore file that is specified by the javax.net.ssl.keyStore Java system property. If this property is not specified, the keystore directory is specified by the javax.net.ssl.keyStore Java system property.
NOTE: The keystore and truststore files can be the same file.
Valid Values
string
where string is a valid directory of a keystore file.
Default
None
Data Type
String
KeyStorePassword
Description
Specifies the password that is used to access the keystore file when SSL is enabled (EncryptionMethod=SSL) and SSL client authentication is enabled on the database server. The keystore file contains the certificates that the client sends to the server in response to the server’s certificate request.
This value overrides the password of the keystore file that is specified by the javax.net.ssl.keyStorePassword Java system property. If this property is not specified, the keystore password is specified by the javax.net.ssl.keyStorePassword Java system property.
NOTE: The keystore and truststore files can be the same file.
Valid Values
string
where string is a valid password.
Default
None
Data Type
String
LoadBalancing
Description
Determines whether the driver uses client load balancing in its attempts to connect to the database servers (primary and alternate). You can specify one or multiple alternate servers by setting the AlternateServers property.
If using a tnsnames.ora file to retrieve connection information, do not specify this property. See “Using tnsnames.ora Files” for more information.
Valid Values
true | false
If set to true, the driver uses client load balancing and attempts to connect to the database servers (primary and alternate) in random order. The driver randomly selects from the list of primary and alternate servers which server to connect to first. If that connection fails, the driver again randomly selects from this list of servers until all servers in the list have been tried or a connection is successfully established.
If set to false, the driver does not use client load balancing and connects to each server based on their sequential order (primary server first, then, alternate servers in the order they are specified).
Default
false
Data Type
boolean
See Also
“Configuring Failover”
LoadLibraryPath
Description
Specifies the directory for the DLL for NTLM authentication. The driver looks for the DLL in the specified directory.
NOTE: When you install the driver, the NTLM authentication DLLs are installed in the install_dir/lib subdirectory, where install_dir is the product installation directory.
Valid Values
string
where string is the fully qualified path of the directory that contains the DLL for NTLM authentication.
If unspecified, the driver looks for the DLL in a directory that is on the Windows system path defined by the PATH environment variable.
If set to string, the driver looks in the specified directory for the DLL. Use this value if you install the driver in a directory that is not on the Windows system path.
Example
If you installed the driver in a directory named "DataDirect" that is not on the Windows system path, you can use this property to specify the directory containing the NTLM authentication DLL as shown in the following URL.
jdbc:datadirect:oracle://server3:1521;ServiceName=ORCL;
LoadLibraryPath=C:\DataDirect\lib;User=test;Password=secret
Default
None
Data Type
String
See Also
“Configuring NTLM Authentication”
LoginTimeout
Description
The amount of time, in seconds, that the driver waits for a connection to be established before timing out the connection request.
Valid Values
0 | x
where x is a positive integer that represents a number of seconds.
If set to 0, the driver does not time out a connection request.
If set to x, the driver waits for the specified number of seconds before returning control to the application and throwing a timeout exception.
Default
0
Data Type
int
MaxPooledStatements
Description
The maximum number of pooled prepared statements for this connection. Setting MaxPooledStatements to an integer greater than zero (0) enables the driver’s internal prepared statement pooling, which is useful when the driver is not running from within an application server or another application that provides its own prepared statement pooling.
Valid Values
0 | x
where x is a positive integer that represents a number of prepared statements.
If set to 0, the driver’s internal prepared statement pooling is not enabled.
If set to x, the driver enables the DataDirect Statement Pool Monitor and uses the specified value to cache a certain number of prepared statements created by an application. For example, if the value of this property is set to 20, the driver caches the last 20 prepared statements that are created by the application. If the value set for this property is greater than the number of prepared statements that are used by the application, all prepared statements that are created by the application are cached. Because CallableStatement is a sub-class of PreparedStatement, CallableStatements also are cached.
Default
0
Data Type
int
Alias
MaxStatements property
See Also
“Using Statement Pooling”
Chapter 10 “Statement Pool Monitor” in the DataDirect Connect Series for JDBC Reference
“Performance Considerations”
MaxStatements
Description
An alias for the MaxPooledStatements property.
Module
Description
The module name to be stored in the database. This property sets the MODULE column in the V$SESSION table and is used for database administration purposes.
Valid Values
string
where string is a the name of a stored procedure or the name of the application.
NOTE: Your database may impose character length restrictions on the value. If the value exceeds a restriction, the driver truncates it.
If a value is not specified for this property, the driver uses the same value specified by the ApplicationName property.
Default
empty string
Data Type
String
See Also
“Using Client Information”
NewPassword
Description
Changes a user’s password when a connection is established. This property can be used to comply with corporate security policies that require a regularly occurring password change or to ensure access to the database if Oracle has let the user’s password expire. If specified and the connection fails, the password is unchanged.
This value is used only if user ID/password authentication is enabled explicitly (AuthenticationMethod=userIdPassword) or implicitly (AuthenticationMethod=auto and a user ID and password is supplied); otherwise, the driver throws an exception.
NOTE: The current password also must be specified using the Password property. The driver allows you to use the same value for the current password and the new password, but be aware that your Oracle server security settings may not allow this use.
Valid Values
string
where string is a valid password.
Example
The following connection URL specifies the current password (secret1) using the Password connection option, and then specifies the new password (secret2) using the NewPassword connection option:
jdbc:datadirect:oracle://server1:1521;ServiceName=ORCL;User=test;
Password=secret1;NewPassword=secret2
Similarly, the same connection information specified using a JDBC data source would look like this:
OracleDataSource mds = new OracleDataSource();
mds.setDescription("My OracleDataSource");
mds.setServerName("server1");
mds.setPortNumber(1521);
mds.setServiceName("ORCL");
mds.setUser("test");
mds.setPassword("secret1");
mds.setNewPassword=("secret2");
...
Default
None
Data Type
String
Password
Description
A password that is used to connect to your Oracle database. A password is required if user ID/password authentication is enabled on your database. Contact your system administrator to obtain your password.
Valid Values
string
where string is a valid password. The password is case-insensitive.
Default
None
Data Type
String
See Also
“NewPassword”
PortNumber
Description
The TCP port of the Oracle listener running on the Oracle database server.
This property is supported only for data source connections.
If using a tnsnames.ora file to provide connection information, do not specify this property. See “Using tnsnames.ora Files” for information about specifying a port number for the Oracle listener using a tnsnames.ora file.
Valid Values
port
where port is the port number.
Default
1521
Data Type
int
ProgramID
Description
The driver and version information on the client to be stored in the database. This property sets the PROCESS column in the V$SESSION table. This value is used for database administration/monitoring purposes.
Valid Values
string
where string is a value that identifies the product and version of the driver on the client.
If a value for this property is not specified, the value defaults to null.
Example
DDJ04200
Default
empty string
Data Type
String
See Also
“Using Client Information”
QueryTimeout
Description
Sets the default query timeout (in seconds) for all statements created by a connection.
Valid Values
-1 | 0 | x
where x is a number of seconds.
If set to -1, the query timeout functionality is disabled. The driver silently ignores calls to the Statement.setQueryTimeout() method.
If set to 0, the default query timeout is infinite (the query does not time out).
If set to x, the driver uses the value as the default timeout for any statement that is created by the connection. To override the default timeout value that is set by this property, call the Statement.setQueryTimeout() method to set a timeout value for a particular statement.
Default
0
Data Type
int
ReportRecycleBin
Description
Determines whether the driver returns items that are in the Oracle Recycle Bin for the getTables(), getColumns(), and getTablePrivileges() methods. For Oracle 10g R1 and higher, when a table is dropped, it is not actually removed from the database, but is placed in the recycle bin. By default, the driver returns items in the Oracle Recycle Bin.
Valid Values
true | false
If set to true, the driver fetches items contained in the Oracle Recycle Bin.
If set to false, the driver does not return items contained in the Oracle Recycle Bin. Functionally, this means that the driver filters out results whose table name begins with BIN$.
Default
true
Data Type
boolean
ResultSetMetaDataOptions
Description
Determines whether the driver returns table name information in the ResultSet metadata for Select statements.
Valid Values
0 | 1
If set to 0 and the ResultSetMetaData.getTableName() method is called, the driver does not perform additional processing to determine the correct table name for each column in the result set. The getTableName() method may return an empty string for each column in the result set.
If set to 1 and the ResultSetMetaData.getTableName() method is called, the driver performs additional processing to determine the correct table name for each column in the result set. The driver returns schema name and catalog name information when the ResultSetMetaData.getSchemaName() and ResultSetMetaData.getCatalogName() methods are called if the driver can determine that information.
Default
0
Data Type
int
See Also
“Performance Considerations”
SDUSize
Description
Specifies the Session Data Unit (SDU) that the driver requests when connecting to the server. The SDU is equivalent to the maximum packet size (size of database protocol packets sent across the network). This property serves only as a suggestion to the database server. The actual SDU that is used is negotiated with the database server.
This property is mutually exclusive with the TNSNamesFile and TNSServerName properties. The driver generates an exception if SDUSize is specified in conjunction with either of these properties.
Valid Values
x
where x is an integer from 512 and 32767.
If set to x, the driver sets the SDU to the specified size. For optimal performance, set this option to the maximum SDU size configured on the database server.
NOTE: If your application sends queries that only retrieve small result sets, you may want to use an SDU size smaller than the maximum SDU size configured on the database server. If a result set that contains only one or two rows of data does not completely fill a larger packet, performance will not improve by setting the value to the maximum SDU size.
Default
8192 (default SDU size for Oracle 11g servers)
Data Type
int
See Also
“Performance Considerations”
SendFloatParametersAsString
Description
Determines whether FLOAT, BINARY_FLOAT, and BINARY_DOUBLE parameters are sent to the database server as a string or as a floating point number.
Valid Values
true | false
If set to true, the driver sends FLOAT, BINARY_FLOAT, and BINARY_DOUBLE parameters to the database server as string values.
NOTE: Numbers larger than 1.0E127 or smaller than 1.0E-130 cannot be converted to Oracle’s number format for Oracle8i and Oracle9i databases using floating point numbers. When a number larger than 1.0E127 or smaller than 1.0E-130 is encountered, the driver throws an exception. If your application uses numbers in this range against an Oracle8i or Oracle9i database, set this property to true.
If set to false, the driver sends FLOAT, BINARY_FLOAT, and BINARY_DOUBLE parameters to the database server as floating point numbers. When Oracle overloaded stored procedures are used, this value ensures that the database server can determine the correct stored procedure to call based on the parameter’s data type.
Default
false
Data Type
boolean
ServerName
Description
Specifies either the IP address in IPv4 or IPv6 format, or the server name (if your network supports named servers) of the primary database server. See “Using IP Addresses” for more information about using IP addresses.
This property is supported only for data source connections.
If using a tnsnames.ora file to provide connection information, do not specify this property. See “Using tnsnames.ora Files” for information about specifying a server name using a tnsnames.ora file.
Valid Values
string
where string is a valid IP address or server name.
Example
122.23.15.12 or OracleAppServer
Default
None
Data Type
String
ServerType
Description
Specifies whether the connection is established using a shared or dedicated server process (UNIX) or thread (Windows).
If using a tnsnames.ora file to provide connection information, do not specify this property. See “Using tnsnames.ora Files” for information about specifying the server type using a tnsnames.ora file.
Valid Values
shared | dedicated
If set to shared, the server process to be used is retrieved from a pool. The socket connection between the client and server is made to a dispatcher process on the server. This setting allows there to be fewer processes than the number of connections, reducing the need for server resources. Use this value when a server must handle many users with fewer server resources.
If set to dedicated, a server process is created to service only that connection. When that connection ends, so does the process (UNIX) or thread (Windows). The socket connection is made directly between the application and the dedicated server process or thread. When connecting to UNIX servers, a dedicated server process can provide significant performance improvement, but uses more resources on the server. When connecting to Windows servers, the server resource penalty is insignificant. Use this value if you have a batch environment with low numbers of users.
If unspecified, the driver uses the server type set on the server.
Default
None
Data Type
String
See Also
“Performance Considerations”
ServiceName
Description
The database service name that specifies the database that is used for the connection. This property is mutually exclusive with the SID property. The service name is a string that is the global database name—a name that typically comprises the database name and domain name.
This property is useful to specify connections to an Oracle Real Application Cluster (RAC) system rather than a specific Oracle instance because the nodes in a RAC system share a common service name.
If using a tnsnames.ora file to provide connection information, do not specify this property. See “Using tnsnames.ora Files” for information about specifying the database service name using a tnsnames.ora file.
Valid Values
string
where string is a valid service name.
Example
sales.us.acme.com
Default
None
Data Type
String
SID
Description
The Oracle System Identifier (SID) that refers to the instance of the Oracle database running on the server. This property is mutually exclusive with the ServiceName property.
If using a tnsnames.ora file to provide connection information, do not specify this property. See “Using tnsnames.ora Files” for information about specifying an Oracle SID using a tnsnames.ora file.
Valid Values
string
where string is a valid SID.
Default
ORCL
Data Type
String
SpyAttributes
Description
Enables DataDirect Spy to log detailed information about calls that are issued by the driver on behalf of the application. DataDirect Spy is not enabled by default.
Valid Values
(spy_attribute[;spy_attribute]...)
where spy_attribute is any valid DataDirect Spy attribute. Refer to Chapter 8 “Tracking JDBC Calls with DataDirect Spy™” in the DataDirect Connect Series for JDBC Reference for a list of supported attributes.
NOTE: If coding a path on Windows to the log file in a Java string, the backslash character (\) must be preceded by the Java escape character, a backslash. For example: log=(file)C:\\temp\\spy.log.
Example
The following value instructs the driver to log all JDBC activity to a file using a maximum of 80 characters for each line.
(log=(file)/tmp/spy.log;linelimit=80)
Default
None
Data Type
String
StringParamsMustMatchCharColumns
Description
Determines whether the driver uses ORA_CHAR or ORA_VARCHAR bindings for string parameters in a Where clause. Using ORA_VARCHAR bindings can improve performance, but may cause matching problems for CHAR columns.
Valid Values
true | false
If set to true, the driver uses ORA_CHAR bindings.
If set to false, the driver uses ORA_VARCHAR bindings, which can improve performance. Use this value if your application does not match string parameters against CHAR columns. For example, in the following code, if col1 is defined as a CHAR(10) and the column name has the string 'abc' in it, the match will fail.
ps = con.prepareStatement("SELECT * FROM employees WHERE col1=?");
ps.setString(1, "abc");
rs = ps.executeQuery();
Default
true
Data Type
boolean
See Also
“Performance Considerations”
SupportLinks
Description
Determines whether the driver supports Oracle linked servers, which means a mapping has been defined in one Oracle server to another Oracle server.
Valid Values
true | false
If set to true, the driver supports Oracle linked servers. When Oracle linked servers are supported, the driver does not support distributed transactions.
If set to false, the driver does not support Oracle linked servers. In addition, the driver supports distributed transactions. In most cases, setting this property to false provides the best performance.
Default
false
Data Type
boolean
SysLoginRole
Description
Specifies whether the user is logged on the database with the Oracle system privilege SYSDBA or the Oracle system privilege SYSOPER. For example, you may want the user to be granted the SYSDBA privilege to allow the user to create or drop a database.
Refer to your Oracle documentation for information about which operations are authorized for the SYSDBA and SYSOPER system privileges.
Valid Values
sysdba | sysoper
If set to sysdba, the user is logged on the database with the Oracle system privilege SYSDBA. The user must be granted SYSDBA system privileges before the connection is attempted by the driver. If not, the driver throws an exception and the connection attempt fails.
If set to sysoper, the user is logged on the database with the Oracle system privilege SYSOPER. The user must be granted SYSOPER system privileges before the connection is attempted by the driver. If not, the driver throws an exception and the connection attempt fails.
If this property is set to an empty string or is unspecified, the user is logged in without SYSDBA or SYSOPER privileges.
Default
empty string
Data Type
String
TNSNamesFile
Description
The path and filename to the tnsnames.ora file from which connection information is retrieved. The tnsnames.ora file contains connection information that is mapped to Oracle net service names. Using a tnsnames.ora file to centralize connection information simplifies maintenance when changes occur.
If you specify this property, you also must specify the TNSServerName property.
If this property is specified, do not specify the following properties to prevent connection information conflicts:
AlternateServers
FailoverMode
LoadBalancing
PortNumber
ServerName
ServerType
ServiceName
SID
If any of these properties are specified in addition to this property, the driver throws an exception.
Valid Values
string
where string is a valid path to and file name of a tnsnames.ora file.
Default
None
Data Type
String
See Also
“Using tnsnames.ora Files”
TNSServerName
Description
The Oracle net service name that is used to reference the connection information in a tnsnames.ora file. The value of this property must be a valid net service name entry in the tnsnames.ora file specified by the TNSNamesFile property.
If this property is specified, you also must specify the TNSNamesFile property.
If this property is specified, do not specify the following properties to prevent connection information conflicts:
AlternateServers
FailoverMode
LoadBalancing
PortNumber
ServerName
ServerType
ServiceName
SID
If any of these properties are specified in addition to this property, the driver throws an exception.
Valid Values
string
where string is a valid Oracle net service name.
Default
None
Data Type
String
See Also
“Using tnsnames.ora Files”
TrustStore
Description
Specifies the directory of the truststore file to be used when SSL is enabled (EncryptionMethod=SSL) and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
This value overrides the directory of the truststore file that is specified by the javax.net.ssl.trustStore Java system property. If this property is not specified, the truststore directory is specified by the javax.net.ssl.trustStore Java system property.
This property is ignored if ValidateServerCertificate=false.
Valid Values
string
where string is the directory of the truststore file.
Default
None
Data Type
String
TrustStorePassword
Description
Specifies the password that is used to access the truststore file when SSL is enabled (EncryptionMethod=SSL) and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
This value overrides the password of the truststore file that is specified by the javax.net.ssl.trustStorePassword Java system property. If this property is not specified, the truststore password is specified by the javax.net.ssl.trustStorePassword Java system property.
This property is ignored if ValidateServerCertificate=false.
Valid Values
string
where string is a valid password for the truststore file.
Default
None
Data Type
String
User
Description
The user name that is used to connect to the Oracle database. A user name is required only if user ID/password authentication is enabled on your database. Contact your system administrator to obtain your user name.
Valid Values
string
where string is a valid user name. The user name is case-insensitive.
Default
None
Data Type
String
ValidateServerCertificate
Description
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption is enabled (EncryptionMethod=SSL). When using SSL server authentication, any certificate that is sent by the server must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate that is returned from the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need to specify truststore information on each client in the test environment.
Valid Values
true | false
If set to true, the driver validates the certificate that is sent by the database server. Any certificate from the server must be issued by a trusted CA in the truststore file. If the HostNameInCertificate property is specified, the driver also validates the certificate using a host name. The HostNameInCertificate property is optional and provides additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
If set to false, the driver does not validate the certificate that is sent by the database server. The driver ignores any truststore information that is specified by the TrustStore and TrustStorePassword properties or Java system properties.
Truststore information is specified using the TrustStore and TrustStorePassword properties or by using Java system properties.
Default
true
Data Type
boolean
WireProtocolMode
Description
This property is supported for backward compatibility. A value of 2 (the default) allows the driver to use the optimal protocol to communicate with the Oracle server; however, there may be some scenarios where setting the value to 1 may produce better results.
Valid Values
1 | 2
If set to 1, the driver uses an older protocol to communicate with the Oracle server.
If set to 2, the driver uses an updated protocol to communicate with the Oracle server.
Default
2
Data Type
int
See Also
“Performance Considerations”