public interface OracleConnection extends Connection
This interface defines the Oracle extensions to the standard JDBC interface
java.sql.Connection
. You can use the
java.sql.Connection
interface in your application, where you do
not make use of the Oracle extensions. However, when your application uses
the Oracle extensions to java.sql.Connection
you must use
oracle.jdbc.OracleConnection
.
OracleConnection
extends standard JDBC connection
functionality to create and return Oracle statement objects, set flags and
options for Oracle performance extensions, and support type maps for Oracle
objects.
Basic example : Once you connect to the database and, in the process,
create your Connection
object (see OracleDriver), the next step is to create a
Statement
object. The createStatement
method of
your JDBC Connection
object returns an object of the JDBC
Statement type.
Following is an example of how to create the
Statement
object (conn
being your connection
object):
Statement stmt = conn.createStatement();
Note that there is nothing Oracle-specific about the preceding example; it follows standard JDBC syntax.
This interface declares connection properties that are grouped into the following categories:
All connection properties can be specified as a URL parameter.
Most connection properties can be specified as a system property, as a
Properties
object entry, or
as a properties file entry.
See OracleDriver for more information about how to use the different options for specifying properties.
The CONNECTION_PROPERTY_..._ACCESSMODE
constant fields of this
interface express which options for specifying a property are supported. These
access mode constant values are a bitwise OR of ACCESSMODE_JAVAPROP
,
ACCESSMODE_SYSTEMPROP
, and/or ACCESSMODE_FILEPROP
. To
illustrate, consider the access mode of CONNECTION_PROPERTY_PASSWORD
:
boolean isJavaPropSupported = // evaluates to true 0 != (ACCESSMODE_JAVAPROP & CONNECTION_PROPERTY_PASSWORD_ACCESSMODE); boolean isSystemPropSupported = // evaluates to false 0 != (ACCESSMODE_SYSTEMPROP & CONNECTION_PROPERTY_PASSWORD_ACCESSMODE); boolean isFilePropSupported = // evaluates to true 0 != (ACCESSMODE_FILEPROP & CONNECTION_PROPERTY_PASSWORD_ACCESSMODE);The boolean evaluations would indicate that a password can be set with a
Properties
object or file, but can not be set as a system property.
Name | Short Description | Default Value |
---|---|---|
oracle.jdbc.user | Specifies the user name when connecting to the database | null |
oracle.jdbc.password | Specifies the password when connecting to the database | null |
oracle.jdbc.loginTimeout | Specifies the timeout for opening a JDBC connection | 0 |
oracle.net.authentication_services | Enables authentication with RADIUS, KERBEROS, or TCPS (that is: SSL/TLS) | null |
oracle.jdbc.proxyClientName | Specifies the user name for proxy authentication | null |
oracle.net.kerberos5_mutual_authentication | Enables Kerberos mutual authentication | null |
oracle.net.kerberos5_cc_name | Specifies the location of the Kerberos credential cache | null |
oracle.net.KerberosRealm | Specifies the realm used for Kerberos authentication | null |
oracle.jdbc.newPassword | Specifies the new password during connection creation | null |
internal_logon | Specifies the administrative user for authentication, such as SYSDBA | null |
prelim_auth | Enables PRELIM_AUTH mode | false |
oracle.jdbc.allowedLogonVersion | Specifies the minimum authentication protocol version | 8 |
Name | Short Description | Default Value |
---|---|---|
oracle.net.tns_admin | Specifies the file system path of the TNS ADMIN directory | null |
oracle.net.CONNECT_TIMEOUT | Specifies the timeout when connecting a socket to the database listener | 0 |
oracle.net.OUTBOUND_CONNECT_TIMEOUT | Specifies the timeout when negotiating a session with the database listener | 0 |
oracle.jdbc.ReadTimeout | Specifies the timeout while reading from the socket | null |
oracle.net.keepAlive | Enables TCP keep alive | false |
oracle.net.TCP_KEEPIDLE | Specifies the amount of time for a connection to remain idle before sending keep alive probes | -1 |
oracle.net.TCP_KEEPINTERVAL | Specifies the frequency at which keep alive probes are retransmitted | -1 |
oracle.net.TCP_KEEPCOUNT | Specifies the maximum number of keep alive probes to send before terminating the connection | -1 |
oracle.jdbc.TcpNoDelay | Enables TCP_NODELAY | false |
oracle.net.disableOob | Disables Out of Band (OOB) data | false |
oracle.jdbc.thinForceDNSLoadBalancing | Enables load balancing when a hostname resolves to multiple IP addresses | false |
oracle.net.DOWN_HOSTS_TIMEOUT | Specifies the duration for which a server address remains in the down hosts cache | 600 |
oracle.net.encryption_client | Specifies the level of security for the encryption service | null |
oracle.net.encryption_types_client | Specifies the list of encryption algorithms that you want to activate | null |
oracle.net.crypto_seed | Specifies the encryption seed | null |
oracle.net.useJCEAPI | Disables the use of JDK Crypto (JCE) APIs for encryption and decryption | true |
oracle.net.crypto_checksum_client | Specifies the level of security for the integrity service | null |
oracle.net.crypto_checksum_types_client | Specifies the list of integrity algorithms that you want to activate | null |
oracle.net.networkCompression | Enables compression of network packets | off |
oracle.net.networkCompressionLevels | Specifies the acceptable levels of network packet compression | (high) |
oracle.net.networkCompressionThreshold | Specifies the minimum size that an uncompressed network packet must have before being compressed | 1024 |
oracle.net.httpsProxyHost | Specifies the hostname or address of an https proxy server | null |
oracle.net.httpsProxyPort | Specifies the port of an https proxy server | 0 |
oracle.net.websocketUser | Specifies the webserver username when using Secure Websocket protocol (WSS) | null |
oracle.net.websocketPassword | Specifies the webserver password when using Secure Websocket protocol (WSS) | null |
oracle.net.socksProxyHost | Specifies the host name of a SOCKS proxy server | null |
oracle.net.socksProxyPort | Specifies the port number of a SOCKS proxy server | 1080 |
oracle.net.socksRemoteDNS | Enables remote DNS lookup of the database host when connecting through a SOCKS proxy server | false |
Name | Short Description | Default Value |
---|---|---|
oracle.net.wallet_location | Specifies the file system path to a wallet used when connecting with TLS/SSL | null |
oracle.net.wallet_password | Specifies the wallet password to use when connecting with TLS/SSL | null |
javax.net.ssl.keyStore | Specifies the file system path to a key store | null |
javax.net.ssl.keyStoreType | Specifies the type of a key store, such as SSO, JKS, or PKCS12 | null |
javax.net.ssl.keyStorePassword | Specifies the password of a key store | null |
javax.net.ssl.trustStore | Specifies the file system path to a trust store | null |
javax.net.ssl.trustStoreType | Specifies the type of a trust store, such as SSO, JKS, or PKCS12 | null |
javax.net.ssl.trustStorePassword | Specifies the password of a trust store | null |
oracle.net.ssl_certificate_alias | Specifies the keystore certificate alias | null |
oracle.net.ssl_server_dn_match | Disables authentication of the Distinguished Name (DN) given by the database server's certificate | null |
oracle.net.ssl_server_cert_dn | Specifies the Distinguished Name (DN) used to authenticate the database server's certificate | null |
oracle.net.ssl_version | Restricts the versions of TLS/SSL that can be used | null |
oracle.net.ssl_cipher_suites | Restricts the cipher suites that can be used for TLS/SSL | null |
ssl.keyManagerFactory.algorithm | Specifies the javax.net.ssl.KeyManagerFactory algorithm | null |
ssl.trustManagerFactory.algorithm | Specifies the javax.net.ssl.TrustManagerFactory algorithm | null |
oracle.net.ssl_context_protocol | Specifies the javax.net.ssl.SSLContext protocol | TLS |
Name | Short Description | Default Value | oracle.jdbc.fanEnabled | Disables Fast Application Notification (FAN) | true |
---|---|---|
oracle.jdbc.enableACSupport | Disables Application Continuity (AC) | true |
oracle.jdbc.enableTGSupport | Enables Transaction Guard (TG) | false |
oracle.jdbc.enableImplicitRequests | Disables implicit request boundaries for Application Continuity (AC) | true |
oracle.jdbc.replay.protectedRequestSizeLimit | Specifies the maximum number of calls that can occur in a replayed request | 2147483647 |
oracle.jdbc.ons.walletfile | Specifies the wallet file for ONS | null |
oracle.jdbc.ons.walletpassword | Specifies the wallet password for ONS | null |
oracle.jdbc.ons.protocol | Specifies the network protocol for ONS | TCP |
Name | Short Description | Default Value |
---|---|---|
v$session.terminal | Specifies the value of v$session.terminal | unknown |
v$session.machine | Specifies the value of v$session.machine | Local host name or "jdbcclient" |
v$session.osuser | Specifies the value of v$session.osuser | user.name system property or "jdbcuser" |
v$session.program | Specifies the value of v$session.program | JDBC Thin Client |
v$session.process | Specifies the value of v$session.process | 1234 |
oracle.jdbc.driverNameAttribute | Specifies the value of v$session_connect_info.client_driver | jdbcthin or jdbcoci |
oracle.net.connectionIdPrefix | Specifies the a net connection id prefix | null |
oracle.jdbc.DMSStatementMetrics | Enables DMS Statement metrics | false |
Name | Short Description | Default Value |
---|---|---|
oracle.jdbc.DRCPConnectionClass | Specifies the DRCP connection class name | null |
oracle.jdbc.DRCPTagName | Specifies the DRCP tag name | null |
oracle.jdbc.DRCPConnectionPurity | Specifies the DRCP purity type | SELF |
oracle.jdbc.UseDRCPMultipletag | Enables multiple DRCP tag names | false |
oracle.jdbc.DRCPPLSQLCallback | Specifies the DRCP callback | null |
oracle.jdbc.DRCPMultiplexingInRequestAPIs | Enables automatic DRCP session attachment and detachment with beginRequest and endRequest | false |
Name | Short Description | Default Value |
---|---|---|
oracle.jdbc.readOnlyInstanceAllowed | Enables connection to a read-only sharded database instance | false |
oracle.jdbc.useShardingDriverConnection | Enables the sharding driver | false |
Name | Short Description | Default Value |
---|---|---|
defaultRowPrefetch | Specifies the default number of rows to prefetch | 10 |
useFetchSizeWithLongColumn | Enables prefetch of rows with a LONG or LONG RAW column | false |
oracle.jdbc.defaultLobPrefetchSize | Specifies the default LOB prefetch size | 32768 |
oracle.net.useZeroCopyIO | Disables zero-copy IO for SecureFile Lobs | true |
oracle.jdbc.enableTempLobRefCnt | Disables tracking of references to temporary LOBs | true |
oracle.jdbc.useThreadLocalBufferCache | Enables thread local buffer caching | false |
oracle.jdbc.maxCachedBufferSize | Specifies the maximum size of a cached data buffer | 30 |
SetFloatAndDoubleUseBinary | When set to true, instructs the driver to transport Java float and Java double values to the database in SQL BINARY_FLOAT and SQL BINARY_DOUBLE representation respectively | false |
oracle.jdbc.enableQueryResultCache | Disables ResultSet caching | true |
oracle.jdbc.useNio | Instructs the jdbc:oci driver to copy data using native I/O with java.nio.ByteBuffer APIs | false |
Name | Short Description | Default Value |
---|---|---|
oracle.jdbc.JDBCStandardBehavior | Enables strict compliance with the JDBC specification | false |
oracle.jdbc.LobStreamPosStandardCompliant | Enables JDBC Specification compliant LOB positions | false |
autoCommit | Specifies the the default value of the auto-commit mode | true |
oracle.jdbc.autoCommitSpecCompliant | Disables JDBC Specification compliant behavior of the auto-commit mode | true |
oracle.jdbc.commitOption | Specifies the default commit option | null |
oracle.jdbc.continueBatchOnError | Enables batch updates to continue with the remaining rows, after an error occurs during the execution of a batch | false |
oracle.jdbc.defaultConnectionValidation | Specifies the default level of effort for connection validation | NETWORK |
fixedString | Instructs the driver to use FIXED CHAR padding when calling the setObject method | false |
oracle.jdbc.strictASCIIConversion | Enables replacement characters when converting to ASCII | false |
defaultNChar | Set NCHAR as the default mode for all character data columns | false |
oracle.jdbc.convertNcharLiterals | Disables NCHAR literal conversion | true |
processEscapes | Instructs the driver to disable escape processing by default | true |
oracle.jdbc.mapDateToTimestamp | When set to false, instructs the driver to map column values of Oracle's non-standard DATE type to java.sql.Date | true |
oracle.jdbc.use1900AsYearForTime | Sets the date component to 01 January 1900, when the setTime method is called | false |
oracle.jdbc.timestampTzInGmt | Disables adjusting of TIMESTAMP WITH TIME ZONE data to GMT | true |
oracle.jdbc.timezoneAsRegion | Disables the use of JVM default timezone rather than convert to a GMT offset | true |
oracle.jdbc.createDescriptorUseCurrentSchemaForSchemaName | Qualify Abstract Data Type (ADT) names with the CURRENT_USER as the type owner | false |
includeSynonyms | Instructs the driver to include synonyms when getting information about a column | false |
restrictGetTables | Restricts the values returned by the DatabaseMetaData.getTables() method | false |
oracle.jdbc.sqlTranslationProfile | Specifies the SQL translation profile | null |
oracle.jdbc.sqlErrorTranslationFile | Specifies the error code translation file | null |
protocol | Specifies the type of driver, whether it is thin, OCI, or KPRB | null |
oracle.jdbc.editionName | Specifies the "session edition" name | null |
oracle.jdbc.backwardCompatibileUpdateableResultSet | Enables backward compatibility with 12.1.0.2.0 for updatable ResultSets | false |
oracle.jdbc.RetainV9LongBindBehavior | Enables backward compatibility with 9.0.1.0 for bind values with a length that exceeds the maximum length of the VARCHAR type | false |
disableDefineColumnType | Disables the OracleStatement.defineColumnType method | false |
Name | Short Description | Default Value |
---|---|---|
oracle.net.ldap.security.authentication | Specifies the authentication mechanism to be used by the LDAP service provider in the JDK | null |
oracle.net.ldap.security.principal | Specifies the value of the principal that is used for LDAP authentication | null |
oracle.net.ldap.security.credentials | Specifies the credentials used for LDAP authentication | null |
com.sun.jndi.ldap.connect.timeout | Specifies the timeout when connecting to an LDAP server | null |
com.sun.jndi.ldap.read.timeout | Specifies the timeout when reading a response from an LDAP server | null |
oracle.net.ldap.ssl.walletLocation | Specifies the file system path to a wallet used when connecting to an LDAP server | null |
oracle.net.ldap.ssl.walletPassword | Specifies the wallet password to use when connecting to an LDAP server | null |
oracle.net.ldap.ssl.keyStoreType | Specifies the type of a key store to use when connecting to an LDAP server, such as SSO, JKS, or PKCS12 | null |
oracle.net.ldap.ssl.keyStore | Specifies the file system path to a key store to use when connecting to an LDAP server | null |
oracle.net.ldap.ssl.keyStorePassword | Specifies the password of a key store to use when connecting to an LDAP server | null |
oracle.net.ldap.ssl.trustStoreType | Specifies the type of a trust store to use when connecting to an LDAP server such as SSO, JKS, or PKCS12 | null |
oracle.net.ldap.ssl.trustStore | Specifies the file system path to a trust store to use when connecting to an LDAP server | null |
oracle.net.ldap.ssl.trustStorePassword | Specifies the password of a trust store to use when connecting to an LDAP server | null |
oracle.net.ldap.ssl.supportedCiphers | Restricts the cipher suites that can be used when connecting to an LDAP server | null |
oracle.net.ldap.ssl.supportedVersions | Restricts the versions of TLS/SSL that can be used | null |
oracle.net.ldap.ssl.keyManagerFactory.algorithm | Specifies the key manager factory algorithm to use when connecting to an LDAP server | null |
oracle.net.ldap.ssl.trustManagerFactory.algorithm | Specifies the trust manager factory algorithm to use when connecting to an LDAP server | null |
oracle.net.ldap.ssl.ssl_context_protocol | Specifies the protocol of SSLContext objects used when connecting to an LDAP server |
null |
Modifier and Type | Interface and Description |
---|---|
static class |
OracleConnection.CommitOption |
static class |
OracleConnection.ConnectionValidation
Specifiers for how much effort to put into validating a
Connection . |
static class |
OracleConnection.DatabaseShutdownMode |
static class |
OracleConnection.DatabaseStartupMode |
static class |
OracleConnection.DRCPState |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Modifier and Type | Method and Description |
---|---|
Connection |
_getPC()
Return the underlying physical connection if this is a
logical connection.
|
void |
abort()
Calling abort() on an open connection does the following: marks the
connection as closed, closes any sockets or other primitive
connections to the database, and insures that any thread that is
currently accessing the connection will either progress to completion
of the JDBC call or throw an exception.
|
void |
addLogicalTransactionIdEventListener(LogicalTransactionIdEventListener listener)
Registers a listener to Logical Transaction Id events.
|
void |
addLogicalTransactionIdEventListener(LogicalTransactionIdEventListener listener,
Executor executor)
This flavor of
addLogicalTransactionIdEventListener can be used to register
a listener with an executor. |
default void |
applyConnectionAttributes(Properties connAttr)
Deprecated.
The Implicit Connection Cache (ICC) has been desupported
since 12.1. This method throws UnsupportedOperationException, and
will be removed soon in the future.
|
void |
archive(int mode,
int aseq,
String acstext)
Deprecated.
This method will be removed in a future version.
|
boolean |
attachServerConnection()
This method needs to be called before using a DRCP connection.
|
void |
beginRequest()
Declares that a request to the server is starting on this
connection.
|
void |
cancel()
Performs an immediate (asynchronous) termination of any currently
executing operation on this connection.
|
void |
clearAllApplicationContext(String nameSpace)
Deprecated.
This is deprecated since 12.1 in favor of the standard JDBC API setClientInfo().
It is not recommended to use this API intermingled with get/setClientInfo APIs.
|
void |
close(int opt)
If opt is OracleConnection.INVALID_CONNECTION : Closes
the given Logical connection, as well the underlying
PooledConnection without returning the connection to the
cache when called with the parameter INVALID_CONNECTION.
|
default void |
close(Properties connAttr)
Deprecated.
The Implicit Connection Cache (ICC) has been desupported
since 12.1. This method throws UnsupportedOperationException, and
will be removed soon in the future.
|
void |
commit(EnumSet<OracleConnection.CommitOption> options)
Commits the transaction with the given options.
|
ARRAY |
createARRAY(String typeName,
Object elements)
Creates an ARRAY object with the given type name and elements.
|
BINARY_DOUBLE |
createBINARY_DOUBLE(double value)
Creates a BINARY_DOUBLE that has the given value.
|
BINARY_FLOAT |
createBINARY_FLOAT(float value)
Creates a BINARY_FLOAT that has the given value.
|
DATE |
createDATE(Date value)
Creates a DATE that has the given value.
|
DATE |
createDATE(Date value,
Calendar cal)
Creates a DATE that has the given value.
|
DATE |
createDATE(String value)
Creates a DATE that has the given value.
|
DATE |
createDATE(Time value)
Creates a DATE that has the given value.
|
DATE |
createDATE(Time value,
Calendar cal)
Creates a DATE that has the given value.
|
DATE |
createDATE(Timestamp value)
Creates a DATE that has the given value.
|
DATE |
createDATE(Timestamp value,
Calendar cal)
Creates a DATE that has the given value.
|
INTERVALDS |
createINTERVALDS(String value)
Creates an INTERVALDS that has the given value.
|
INTERVALYM |
createINTERVALYM(String value)
Creates an INTERVALYM that has the given value.
|
NUMBER |
createNUMBER(BigDecimal value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(BigInteger value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(boolean value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(byte value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(double value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(float value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(int value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(long value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(short value)
Creates a new NUMBER that has the given value.
|
NUMBER |
createNUMBER(String value,
int scale)
Creates a new NUMBER that has the given value and scale.
|
Array |
createOracleArray(String arrayTypeName,
Object elements)
Creates an Array object with the given type name and elements.
|
TIMESTAMP |
createTIMESTAMP(Date value)
Creates a new TIMESTAMP with the given value.
|
TIMESTAMP |
createTIMESTAMP(DATE value)
Creates a new TIMESTAMP with the given value.
|
TIMESTAMP |
createTIMESTAMP(String value)
Creates a new TIMESTAMP with the given value.
|
TIMESTAMP |
createTIMESTAMP(Time value)
Creates a new TIMESTAMP with the given value.
|
TIMESTAMP |
createTIMESTAMP(Timestamp value)
Creates a new TIMESTAMP with the given value.
|
TIMESTAMP |
createTIMESTAMP(Timestamp value,
Calendar cal)
Creates a new TIMESTAMP with the given value.
|
TIMESTAMPLTZ |
createTIMESTAMPLTZ(Date value,
Calendar cal)
Creates a new TIMESTAMPLTZ with the given value.
|
TIMESTAMPLTZ |
createTIMESTAMPLTZ(DATE value,
Calendar cal)
Creates a new TIMESTAMPLTZ with the given value.
|
TIMESTAMPLTZ |
createTIMESTAMPLTZ(String value,
Calendar cal)
Creates a new TIMESTAMPLTZ with the given value.
|
TIMESTAMPLTZ |
createTIMESTAMPLTZ(Time value,
Calendar cal)
Creates a new TIMESTAMPLTZ with the given value.
|
TIMESTAMPLTZ |
createTIMESTAMPLTZ(Timestamp value,
Calendar cal)
Creates a new TIMESTAMPLTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(Date value)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(DATE value) |
TIMESTAMPTZ |
createTIMESTAMPTZ(Date value,
Calendar cal)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(String value)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(String value,
Calendar cal)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(Time value)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(Time value,
Calendar cal)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(Timestamp value)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(Timestamp value,
Calendar cal)
Creates a new TIMESTAMPTZ with the given value.
|
TIMESTAMPTZ |
createTIMESTAMPTZ(Timestamp value,
java.time.ZoneId tzid)
Creates a new TIMESTAMPTZ with the given value.
|
AQMessage |
dequeue(String queueName,
AQDequeueOptions opt,
byte[] tdo)
Dequeues an AQ message from the queue specified by its name.
|
AQMessage |
dequeue(String queueName,
AQDequeueOptions opt,
byte[] tdo,
int version)
Dequeues an AQ message from the queue specified by its name.
|
AQMessage[] |
dequeue(String queueName,
AQDequeueOptions opt,
byte[] tdo,
int version,
int deqsize)
Dequeues an array of AQ messages from the queue specified by its name.
|
AQMessage |
dequeue(String queueName,
AQDequeueOptions opt,
String typeName)
Dequeues an AQ message from the queue specified by its name.
|
AQMessage[] |
dequeue(String queueName,
AQDequeueOptions opt,
String typeName,
int deqsize)
Dequeues an array of AQ messages from the queue specified by its name.
|
void |
detachServerConnection(String tag)
Notify the server that this connection will not be used.
|
void |
disableLogging()
Disables the logging for the connection.
|
void |
dumpLog()
Dumps the log for the connection to the configured dump location.
|
void |
enableLogging()
Enables logging for the connection.
|
void |
endRequest()
Declares that the request that was in progress on this connection
has completed.
|
void |
enqueue(String queueName,
AQEnqueueOptions opt,
AQMessage mesg)
Enqueues the given AQ message to the queue specified by its name.
|
int |
enqueue(String queueName,
AQEnqueueOptions opt,
AQMessage[] mesgs)
Enqueues the given array of AQ messages to the queue specified by its name.
|
TypeDescriptor[] |
getAllTypeDescriptorsInCurrentSchema()
Obtain all the type descriptors associated with object types or array
in the schema of this connection.
|
String |
getAuthenticationAdaptorName()
Returns the name of the adaptor that is used for
authentication by the thin driver.
|
boolean |
getAutoClose()
The driver is always in auto-close mode.
|
CallableStatement |
getCallWithKey(String key)
getCallWithKey
Searches the explicit cache for a match on key.
|
String |
getChecksumProviderName()
If network integrity service is enabled, returns the name of
the checksum provider, otherwise returns
null . |
default Properties |
getConnectionAttributes()
Deprecated.
The Implicit Connection Cache (ICC) has been desupported
since 12.1. This method throws UnsupportedOperationException, and
will be removed soon in the future.
|
default int |
getConnectionReleasePriority()
Deprecated.
The Implicit Connection Cache (ICC) has been desupported
since 12.1. This method throws UnsupportedOperationException, and
will be removed soon in the future.
|
boolean |
getCreateStatementAsRefCursor()
Retrieves the current setting of the
createStatementAsRefCursor flag which you can set with the
setCreateStatementAsRefCursor method. |
String |
getCurrentSchema()
Obtains the current schema of the current connection.
|
DatabaseChangeRegistration |
getDatabaseChangeRegistration(int regid)
Maps an existing registration identified by its ID 'regid'
with a new DatabaseChangeRegistration object.
|
String |
getDataIntegrityAlgorithmName()
Returns the name of the algorithm that is used for data
integrity checking by the thin driver on the network.
|
int |
getDefaultExecuteBatch()
Deprecated.
As of 12.1 all APIs related to oracle-style statement
batching are deprecated in favor of standard JDBC batching. We recommend
using the standard model going forward as it is spec compliant and provides
more information and control to the application.
|
int |
getDefaultRowPrefetch()
Retrieves the value of row prefetch for all statements associated
with this connection and created after this value was set.
|
TimeZone |
getDefaultTimeZone()
Returns the TimeZone set through setDefaultTimeZone.
|
Object |
getDescriptor(String sql_name)
Gets a Descriptor object corresponding to a sql type.
|
String |
getDRCPPLSQLCallbackName()
Returns the PL/SQL Fix-up callback name if configured,
otherwise returns
Null |
String |
getDRCPReturnTag()
Returns the tag associated with this DRCP pooled server.
|
OracleConnection.DRCPState |
getDRCPState()
Returns an enum indicating if the connection is attached
to a DRCP server process.
|
String |
getEncryptionAlgorithmName()
Returns the name of the algorithm that is used for data
encryption by the thin driver on the network.
|
String |
getEncryptionProviderName()
If network encryption service is enabled, returns the name of
the encryption provider, otherwise returns
null . |
short |
getEndToEndECIDSequenceNumber()
Deprecated.
This is deprecated since 12.1 in favor of getClientInfo().
It is not recommended to use this API intermingled with get/setClientInfo APIs.
|
String[] |
getEndToEndMetrics()
Deprecated.
This has been deprecated since 12.1 in favor of getClientInfo().
It is not recommended to use this API intermingled with get/setClientInfo APIs.
|
boolean |
getExplicitCachingEnabled()
getExplicitCachingEnabled
Returns true if the explicit cache is currently enabled, false otherwise.
|
boolean |
getImplicitCachingEnabled()
getImplicitCachingEnabled
Returns true if the implicit cache is currently enabled, false otherwise.
|
boolean |
getIncludeSynonyms()
Checks whether or not synonyms information is included in
DatabaseMetaData.getColumns . |
Object |
getJavaObject(String sql_name)
Deprecated.
|
oracle.jdbc.diagnostics.SecuredLogger |
getLogger()
Returns the SecuredLogger instance of the OracleConnection.
|
LogicalTransactionId |
getLogicalTransactionId()
Gets the current Logical Transaction Id which are sent by the server in
a piggy back message and hence this method call doesn't make a roundtrip.
|
String |
getNetConnectionId()
Returns the Net Connection ID associated with this connection.
|
Properties |
getProperties()
Determines the connection properties.
|
boolean |
getRemarksReporting()
Checks whether or not a call of
getTables or
getColumns of the DatabaseMetaData interface will
report the REMARKS column. |
boolean |
getRestrictGetTables()
Gets the restriction status of the returned data in
DatabaseMetaData.getTables . |
Properties |
getServerSessionInfo()
Exposes some of the key/value pairs that the server returns
at connection time.
|
default String |
getServerSessionInfo(String key)
Returns the value associated to a
key that the server returns
at connection time. |
String |
getSessionTimeZone()
Obtain Oracle session time zone region name.
|
String |
getSessionTimeZoneOffset()
Obtain the time zone offset in hours of the current database session.
|
String |
getSQLType(Object obj)
Deprecated.
|
int |
getStatementCacheSize()
getStatementCacheSize
Returns the current size of the application cache.
|
PreparedStatement |
getStatementWithKey(String key)
getStatementWithKey
Searches the explicit cache for a match on key.
|
int |
getStmtCacheSize()
Deprecated.
Use getStatementCacheSize() instead.
|
short |
getStructAttrCsId()
Obtain the Oracle identifier of the character set used in STRUCT
attributes.
|
TypeDescriptor[] |
getTypeDescriptorsFromList(String[][] schemaAndTypeNamePairs)
Obtain the type descriptors associated with object types or arrays
from an array of scheama and type names.
|
TypeDescriptor[] |
getTypeDescriptorsFromListInCurrentSchema(String[] typeNames)
Obtain the type descriptors associated with object types or array
in a schema from an array of type names.
|
default Properties |
getUnMatchedConnectionAttributes()
Deprecated.
The Implicit Connection Cache (ICC) has been desupported
since 12.1. This method throws UnsupportedOperationException, and
will be removed soon in the future.
|
String |
getUserName()
Gets the user name of the current connection.
|
boolean |
getUsingXAFlag()
Deprecated.
|
boolean |
getXAErrorFlag()
Deprecated.
|
boolean |
isDRCPEnabled()
Returns true if the connection is participating in DRCP.
|
boolean |
isDRCPMultitagEnabled()
Returns true if multiple tags are allowed with DRCP Connection.
|
boolean |
isLogicalConnection()
Method that returns a boolean indicating whether its
a logical connection or not.
|
boolean |
isProxySession()
Returns true if the current session associated with this
connection is a proxy session.
|
boolean |
isUsable()
Identifies whether this connection is still usable for JDBC operations.
|
boolean |
isValid(OracleConnection.ConnectionValidation effort,
int timeout)
Returns true if this connection was working properly to the extent
specified by
effort at the instant during this call it was checked. |
boolean |
needToPurgeStatementCache()
Returns if the client side Statement cache has to be purged.
|
void |
openProxySession(int type,
Properties prop)
Opens a new proxy session with the username provided in the
prop argument and switches to this new session.
This feature is supported for both thin and oci driver. Three proxy types are supported : OracleConnection.PROXYTYPE_USER_NAME : In this type PROXY_USER_NAME needs to be provided in prop. |
void |
oracleReleaseSavepoint(OracleSavepoint savepoint)
Removes the given
OracleSavepoint object from the current
transaction. |
void |
oracleRollback(OracleSavepoint savepoint)
Undoes all changes made after the given
OracleSavepoint
object was set. |
OracleSavepoint |
oracleSetSavepoint()
Creates an unnamed savepoint in the current transaction and
returns the new
OracleSavepoint object that
represents it. |
OracleSavepoint |
oracleSetSavepoint(String name)
Creates a savepoint with the given name in the current transaction
and returns the new
OracleSavepoint object that
represents it. |
int |
pingDatabase()
Ping Database server to see if both database and the connection are
actively up.
|
int |
pingDatabase(int timeOut)
Deprecated.
|
CallableStatement |
prepareCallWithKey(String key)
Deprecated.
This is same as prepareCall, except if a Callable Statement with
the given KEY exists in the Cache, then the statement is returned
AS IT IS when it was closed and cached with this KEY. An object
returned from the Cache based on Key will have its state set to
"KEYED". If no such Callable Statement is found, then null is returned.
Key cannot be null.
|
PreparedStatement |
prepareStatementWithKey(String key)
Deprecated.
This is same as prepareStatement, except if a Prepared Statement with
the given KEY exists in the Cache, then the statement is returned AS
IT IS when it was closed and cached with this KEY. An object returned
from the Cache based on Key will have its state set to "KEYED".
If no such Prepared Statement is found, a null is returned.
Key cannot be null.
|
void |
purgeExplicitCache()
purgeExplicitCache
Removes all existing statements from the explicit cache, after which it
will be empty.
|
void |
purgeImplicitCache()
purgeImplicitCache
Removes all existing statements from the implicit cache, after which it
will be empty.
|
void |
putDescriptor(String sql_name,
Object desc)
Store the Object Descriptor for later usage.
|
AQNotificationRegistration[] |
registerAQNotification(String[] name,
Properties[] options,
Properties globaloptions)
Registers your interest into being notified when a message is enqueued
in a particular queue (or array of queues).
|
default void |
registerConnectionCacheCallback(OracleConnectionCacheCallback occc,
Object userObj,
int cbkFlag)
Deprecated.
The Implicit Connection Cache (ICC) has been desupported
since 12.1. This method throws UnsupportedOperationException, and
will be removed soon in the future.
|
DatabaseChangeRegistration |
registerDatabaseChangeNotification(Properties options)
/
Creates a new database change registration.
|
void |
registerSQLType(String sql_name,
Class<?> java_class)
Deprecated.
|
void |
registerSQLType(String sql_name,
String java_class_name)
Deprecated.
|
void |
registerTAFCallback(OracleOCIFailover cbk,
Object obj)
Register an application TAF Callback instance that will be called
when an application failover occurs.
|
void |
removeLogicalTransactionIdEventListener(LogicalTransactionIdEventListener listener)
Deregisters the Logical Transaction Id event listener.
|
void |
setApplicationContext(String nameSpace,
String attribute,
String value)
Deprecated.
This has been deprecated since 12.1 in favour of setClientInfo().
It is not recommended to use this API intermingled with get/setClientInfo APIs.
|
void |
setAutoClose(boolean autoClose)
set auto-close mode.
|
default void |
setConnectionReleasePriority(int priority)
Deprecated.
The Implicit Connection Cache (ICC) has been desupported
since 12.1. This method throws UnsupportedOperationException, and
will be removed soon in the future.
|
void |
setCreateStatementAsRefCursor(boolean value)
When this is set to
true , any new statements created from this
connection will be created as a REF CURSOR . |
void |
setDefaultExecuteBatch(int batch)
Deprecated.
As of 12.1 all APIs related to oracle-style statement
batching are deprecated in favor of standard JDBC batching. We recommend
using the standard model going forward as it is spec compliant and provides
more information and control to the application.
|
void |
setDefaultRowPrefetch(int value)
Sets the value of row prefetch for all statements associated with this
connection and created after this value was set.
|
void |
setDefaultTimeZone(TimeZone tz)
The TimeZone to be used while creating java.sql.Date, java.sql.Time &
java.sql.Timestamp.
|
void |
setEndToEndMetrics(String[] metrics,
short sequenceNumber)
Deprecated.
It has been deprecated since 12.1 in favor of setClientInfo().
It is not recommended to use this API intermingled with get/setClientInfo APIs.
|
void |
setExplicitCachingEnabled(boolean cache)
setExplicitCachingEnabled
Enables or disables the explicit cache.
|
void |
setImplicitCachingEnabled(boolean cache)
setImplicitCachingEnabled
Enables or disables the implicit cache.
|
void |
setIncludeSynonyms(boolean synonyms)
Turns on or off retrieval of synonym information in DatabaseMetaData.
|
void |
setPlsqlWarnings(String setting)
Enable/Disable PLSQL Compiler Warnings
|
void |
setRemarksReporting(boolean reportRemarks)
Turns on or off the reporting of the REMARKS columns by the
getTables and getColumns calls of the
DatabaseMetaData interface. |
void |
setRestrictGetTables(boolean restrict)
Turns on or off the restriction of the returned data in
DatabaseMetaData.getTables. |
void |
setSessionTimeZone(String regionName)
Set the session time zone.
|
void |
setShardingKey(OracleShardingKey shardingKey)
Sets the sharding key on this connection.
|
void |
setShardingKey(OracleShardingKey shardingKey,
OracleShardingKey superShardingKey)
Sets the sharding key and the super sharding key on this connection.
|
boolean |
setShardingKeyIfValid(OracleShardingKey shardingKey,
int timeout)
Checks the validity of the connection and also checks if the sharding key
passed to this method is valid for the connection.If the sharding key is
valid, it will be set on the connection.
|
boolean |
setShardingKeyIfValid(OracleShardingKey shardingKey,
OracleShardingKey superShardingKey,
int timeout)
Checks the validity of the connection and also checks if the sharding keys
passed to this method are valid for the connection.If the sharding keys are
valid, it will be set on the connection.
|
void |
setStatementCacheSize(int size)
setStatementCacheSize
Specifies the size of the size of the application cache (which will be
used by both implicit and explicit caching).
|
void |
setStmtCacheSize(int size)
Deprecated.
Use setStatementCacheSize() instead.
|
void |
setStmtCacheSize(int size,
boolean clearMetaData)
Deprecated.
Use setStatementCacheSize() instead.
|
void |
setUsingXAFlag(boolean value)
Deprecated.
|
void |
setWrapper(OracleConnection wrapper)
Set the wrapping object.
|
void |
setXAErrorFlag(boolean value)
Deprecated.
|
void |
shutdown(OracleConnection.DatabaseShutdownMode mode)
Shuts the database server down.
|
void |
startup(OracleConnection.DatabaseStartupMode mode)
Starts the database server up.
|
void |
startup(OracleConnection.DatabaseStartupMode mode,
String pfileName)
Starts the database server up.
|
void |
startup(String startup_str,
int mode)
Deprecated.
This method will be removed in a future version.
|
void |
unregisterAQNotification(AQNotificationRegistration registration)
Deletes a given AQ registration.
|
void |
unregisterDatabaseChangeNotification(DatabaseChangeRegistration registration)
Deletes a given database change registration.
|
void |
unregisterDatabaseChangeNotification(int registrationId)
Deprecated.
|
void |
unregisterDatabaseChangeNotification(int registrationId,
String host,
int tcpport)
Deprecated.
|
void |
unregisterDatabaseChangeNotification(long registrationId,
String callback)
Deletes a given database change registration in the server.
|
OracleConnection |
unwrap()
Return the wrapped object if any else null.
|
abort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap
isWrapperFor, unwrap
static final byte ACCESSMODE_JAVAPROP
CONNECTION_PROPERTY_{name}_ACCESSMODE
constants defined in this
interface.
static final byte ACCESSMODE_SYSTEMPROP
CONNECTION_PROPERTY_{name}_ACCESSMODE
constants defined in this
interface.
static final byte ACCESSMODE_BOTH
CONNECTION_PROPERTY_{name}_ACCESSMODE
constants defined in this
interface.
static final byte ACCESSMODE_FILEPROP
CONNECTION_PROPERTY_{name}_ACCESSMODE
constants defined in this
interface.
static final String CONNECTION_PROPERTY_RETAIN_V9_BIND_BEHAVIOR
static final String CONNECTION_PROPERTY_RETAIN_V9_BIND_BEHAVIOR_DEFAULT
static final byte CONNECTION_PROPERTY_RETAIN_V9_BIND_BEHAVIOR_ACCESSMODE
static final String CONNECTION_PROPERTY_USER_NAME
static final String CONNECTION_PROPERTY_USER_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_USER_NAME_ACCESSMODE
static final String CONNECTION_PROPERTY_NEW_PASSWORD
static final String CONNECTION_PROPERTY_NEW_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_NEW_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_DATABASE
static final String CONNECTION_PROPERTY_DATABASE_DEFAULT
static final byte CONNECTION_PROPERTY_DATABASE_ACCESSMODE
static final String CONNECTION_PROPERTY_AUTOCOMMIT
static final String CONNECTION_PROPERTY_AUTOCOMMIT_DEFAULT
static final byte CONNECTION_PROPERTY_AUTOCOMMIT_ACCESSMODE
static final String CONNECTION_PROPERTY_PROTOCOL
static final String CONNECTION_PROPERTY_PROTOCOL_DEFAULT
static final byte CONNECTION_PROPERTY_PROTOCOL_ACCESSMODE
static final String CONNECTION_PROPERTY_STREAM_CHUNK_SIZE
static final String CONNECTION_PROPERTY_STREAM_CHUNK_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_STREAM_CHUNK_SIZE_ACCESSMODE
static final String CONNECTION_PROPERTY_SET_FLOAT_AND_DOUBLE_USE_BINARY
static final String CONNECTION_PROPERTY_SET_FLOAT_AND_DOUBLE_USE_BINARY_DEFAULT
static final byte CONNECTION_PROPERTY_SET_FLOAT_AND_DOUBLE_USE_BINARY_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_VSESSION_TERMINAL
static final String CONNECTION_PROPERTY_THIN_VSESSION_TERMINAL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_TERMINAL_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_VSESSION_MACHINE
If you don't specify a value, by default, the driver will attempt to retrieve your host name. If the attempt fails, it will use "jdbcclient".
static final String CONNECTION_PROPERTY_THIN_VSESSION_MACHINE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_MACHINE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_VSESSION_OSUSER
The OS username will show up in the "osuser" column of the "v$session" table for this connection.
If you don't specify any value and if the JVM's "user.name" system property is null, the value will be set to "jdbcuser".
static final String CONNECTION_PROPERTY_THIN_VSESSION_OSUSER_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_OSUSER_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM
static final String CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_VSESSION_PROCESS
static final String CONNECTION_PROPERTY_THIN_VSESSION_PROCESS_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_PROCESS_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_VSESSION_INAME
static final String CONNECTION_PROPERTY_THIN_VSESSION_INAME_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_INAME_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_VSESSION_ENAME
static final String CONNECTION_PROPERTY_THIN_VSESSION_ENAME_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_ENAME_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_PROFILE
static final String CONNECTION_PROPERTY_THIN_NET_PROFILE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_PROFILE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES
For example, to turn on KERBEROS authentication:
Properties prop = new Properties(); prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES, "( KERBEROS )"); prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL, "true"); // Specify where my krb5 configuration file is because JSSE can't find it: System.setProperty("java.security.krb5.conf","C:\\WINDOWS\\krb5.ini");
Or to turn on RADIUS:
prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES, "( RADIUS)");Or to turn on RADIUS, KERBEROS and SSL authentication adaptors:
prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES, "( RADIUS, KERBEROS, SSL)");
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB_REALM
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB_REALM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB_REALM_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB_JAAS_LOGIN_MODULE
JAAS
login module which will be used for
initializing javax.security.auth.login.LoginContext
. This property works in conjunction with
the JAAS configuration. Please refer JDK documentation to know about configuring the JAAS config file.
By default the Thin driver uses com.sun.security.auth.module.Krb5LoginModule
as LoginModule and
the Kerberos Credential Cache configured via CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME
is used for retreiving the TGT. The default value is null
. The JAAS configuration is used only if
this property is configured with login module name.static final String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB_JAAS_LOGIN_MODULE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB_JAAS_LOGIN_MODULE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_SET_FIPS_MODE
FIPS140-2
mode for native network encryption.
The default key pair generation mechanism is not FIPS140-2
compliant and fails to generate
a Diffie-Hellman key pair while negotiating the network encryption. Set the value to true
to enable FIPS-140-2
mode. The default value is false
and FIPS140-2
mode is disabled.static final String CONNECTION_PROPERTY_THIN_NET_SET_FIPS_MODE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_SET_FIPS_MODE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_ALLOW_WEAK_CRYPTO
12268
is thrown when
server does not have this capabilty. By default, in order to allow compatibility with
such servers, and at the cost of security, this property is set to "true".
When this property is configured to "false" then strong session keys are used and
the following algorithms are disabled.
Disabled Encryption algorithms : RC4_40, DES40, DES, RC4_56,
RC4_128, 3DES112, 3DES168 and RC4_256. Disabled Checksum algorithms : MD5.
This property can also be configured through URL. The value configured through URL
has higher priority than the value configured through connection properties.
Please see the below examples to know how to configure this property through URL.
static final String CONNECTION_PROPERTY_THIN_NET_ALLOW_WEAK_CRYPTO_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_ALLOW_WEAK_CRYPTO_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL
static final String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES
The supported algorithms are:
The following weak algorithms are disabled by default:
For example, if you require the connection to be encrypted with either AES256 or AES192,
you would set the following properties:
prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES, "( AES256, AES192 )"); prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL, "REQUIRED");This property can also be configured through URL. The value configured through URL has higher priority than the value configured through connection properties. Please see the below examples to know how to configure this property through URL.
static final String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL
CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL
to know more about the accepted values
and information on each of the values as both of these properties support same set of values.
This property can also be configured through URL. The value configured through URL
has higher priority than the value configured through the connection properties.
Please see the below examples to know how to configure this property through URL.
static final String CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_CHECKSUM_TYPES
The supported algorithms are:
For example, if you require checksumming to be turned on and you
want either MD5, SHA1, SHA256, SHA384 or SHA512:
prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_CHECKSUM_TYPES, "( MD5, SHA1, SHA256, SHA384 or SHA512 )"); prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL, "REQUIRED");This property can also be configured through URL. The value configured through URL has higher priority than the value configured through the connection properties. Please see the below examples to know how to configure this property through URL.
static final String CONNECTION_PROPERTY_THIN_NET_CHECKSUM_TYPES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CHECKSUM_TYPES_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_CRYPTO_SEED
static final String CONNECTION_PROPERTY_THIN_NET_CRYPTO_SEED_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CRYPTO_SEED_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_USE_JCE_API
"true"
and Data Encryption service is enabled, then
JDK Crypto(JCE) APIs are used for encryption and decryption of the data between the
JDBC client and the Oracle Server, otherwise the built-in crypto implementation is used.
Since 19.1, the default value is true
for the Thin driver. If the JVM version is older than
1.8.0_u151, then you need to change the JVM security policy to allow unlimited key
sizes. This is done by downloading and replacing the files found in $JAVA_HOME/lib/security
(local_policy.jar
and US_export_policy.jar
). Java Cryptography Extension
(JCE) Unlimited Strength Jurisdiction Policy Files can be downloaded from Oracle website.
When this property value is set to "true"
and the Unlimited Crypto Strength is not available
then the Thin driver will automatically change this property value to "false"
and will use
the built-in crypto implementation.static final String CONNECTION_PROPERTY_THIN_USE_JCE_API_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_USE_JCE_API_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_TCP_NO_DELAY
static final String CONNECTION_PROPERTY_THIN_TCP_NO_DELAY_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_TCP_NO_DELAY_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_READ_TIMEOUT
static final String CONNECTION_PROPERTY_THIN_READ_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_READ_TIMEOUT_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_OUTBOUND_CONNECT_TIMEOUT
"0"
(no timeout). jdbc:oracle:thin:@(DESCRIPTION=(CONNECT_TIMEOUT=10)
(ADDRESS_LIST=(ADDRESS=(HOST=myhost)(PORT=5521)(PROTOCOL=tcp)))(CONNECT_DATA=(SERVICE_NAME=myService)))
CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_OUTBOUND_CONNECT_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_OUTBOUND_CONNECT_TIMEOUT_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT
"0"
(no timeout).
This affects only the thin driver. The connect timeout can also be set
through the connection URL using TRANSPORT_CONNECT_TIMEOUT like in the example
below. The value set in the URL overrides the value set in this property. jdbc:oracle:thin:@(DESCRIPTION=(TRANSPORT_CONNECT_TIMEOUT=5)
(ADDRESS_LIST=(ADDRESS=(HOST=myhost)(PORT=5521)(PROTOCOL=tcp)))(CONNECT_DATA=(SERVICE_NAME=myService)))
static final String CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK
static final String CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_USE_ZERO_COPY_IO
static final String CONNECTION_PROPERTY_THIN_NET_USE_ZERO_COPY_IO_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_USE_ZERO_COPY_IO_ACCESSMODE
static final String CONNECTION_PROPERTY_USE_1900_AS_YEAR_FOR_TIME
static final String CONNECTION_PROPERTY_USE_1900_AS_YEAR_FOR_TIME_DEFAULT
static final byte CONNECTION_PROPERTY_USE_1900_AS_YEAR_FOR_TIME_ACCESSMODE
static final String CONNECTION_PROPERTY_TIMESTAMPTZ_IN_GMT
static final String CONNECTION_PROPERTY_TIMESTAMPTZ_IN_GMT_DEFAULT
static final byte CONNECTION_PROPERTY_TIMESTAMPTZ_IN_GMT_ACCESSMODE
static final String CONNECTION_PROPERTY_TIMEZONE_AS_REGION
static final String CONNECTION_PROPERTY_TIMEZONE_AS_REGION_DEFAULT
static final byte CONNECTION_PROPERTY_TIMEZONE_AS_REGION_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_CERTIFICATE_ALIAS
static final String CONNECTION_PROPERTY_THIN_SSL_CERTIFICATE_ALIAS_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_CERTIFICATE_ALIAS_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_SERVER_DN_MATCH
static final String CONNECTION_PROPERTY_THIN_SSL_SERVER_DN_MATCH_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_SERVER_DN_MATCH_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_SERVER_CERT_DN
CONNECTION_PROPERTY_THIN_SSL_SERVER_DN_MATCH
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_SSL_SERVER_CERT_DN_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_SERVER_CERT_DN_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_ALLOW_WEAK_DN_MATCH
true
the DN is verified only
after establishing NS Session, otherwise the DN is verified after every SSL handshake.
This can also be configured via the connection URL using the
SECURITY
parameter SSL_ALLOW_WEAK_DN_MATCH
.true
to enable it.ssl_allow_weak_dn_match
.static final String CONNECTION_PROPERTY_THIN_SSL_ALLOW_WEAK_DN_MATCH_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_ALLOW_WEAK_DN_MATCH_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_VERSION
"0"
- TLSv1.0 or TLSv1.1 or TLSv1.2"undetermined"
- TLSv1.0 or TLSv1.1 or TLSv1.2"2"
- SSLv2Hello"2.0"
- SSLv2Hello"version 2"
- SSLv2Hello"3"
- SSLv3"3.0"
- SSLv3"version 3 only"
- SSLv3"1"
- TLSv1.0"1.0"
- TLSv1.0"version 1 only"
- TLSv1.0"1 or 3"
- TLSv1.0 or SSLv3"1.0 or 3.0"
- TLSv1.0 or SSLv3"version 1 or version 3"
- TLSv1.0 or SSLv3"1.1"
- TLSv1.1"1.2"
- TLSv1.2"1.1 or 3.0"
- TLSv1.1 or SSLv3"1.2 or 3.0"
- TLSv1.2 or SSLv3"1.1 or 1.0"
- TLSv1.1 or TLSv1.0"1.2 or 1.0"
- TLSv1.2 or TLSv1.0"1.2 or 1.1"
- TLSv1.2 or TLSv1.1"1.1 or 1.0 or 3.0"
- TLSv1.1 or TLSv1.0 or SSLv3"1.2 or 1.0 or 3.0"
- TLSv1.2 or TLSv1.0 or SSLv3"1.2 or 1.1 or 1.0"
- TLSv1.2 or TLSv1.1 or TLSv1.0"1.2 or 1.1 or 3.0"
- TLSv1.2 or TLSv1.1 or SSLv3"1.2 or 1.1 or 1.0 or 3.0"
- TLSv1.2 or TLSv1.1 or TLSv1.0 or SSLv3static final String CONNECTION_PROPERTY_THIN_SSL_VERSION_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_VERSION_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_CIPHER_SUITES
Specify a comma separated list of cipher suites to enable for TLS communications with a database. The list must include at least one cipher suite that is also enabled for the database. If the driver and the database do not share a common cipher, then connection establishment will result in a TLS handshake failure.
Note that the standard list of cipher suite names may be found in the JSSE Cipher Suite Names section of the Java Cryptography Architecture Standard Algorithm Name Documentation. Providers may support cipher suite names not found in this list or might not use the recommended name for a certain cipher suite.
If no value is set for this property, the driver will use the set of cipher suites which your JSSE Security Provider has enabled by default.
This property is only supported by the jdbc:oracle:thin driver.
This property can also be configured through the EZConnect Plus URL format
using the parameter SSL_CIPHERS
. The value configured via
EZConnect URL has higher priority. Please note that the JDBC Thin driver
does not support configuring this property
through the parameter SSL_CIPHER_SUITES
in long TNS URL format.
static final String CONNECTION_PROPERTY_THIN_SSL_CIPHER_SUITES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_CIPHER_SUITES_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE
Specify the file system path of a key store file which contains private keys and certificates used for TLS/SSL/TCPS authentication with a database.
This property has no effect if
CONNECTION_PROPERTY_WALLET_LOCATION
has also been set.
This property is only supported by the jdbc:oracle:thin driver.
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORETYPE
Specify the format of a key store file specified by
CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE
. Examples of
commonly used formats are "SSO", "PKCS12", and "JKS".
This property has no effect if
CONNECTION_PROPERTY_WALLET_LOCATION
has also been set.
If this property is not set, the JDBC driver will attempt to automatically recognize the key store type based on the file extension of the key store.
Recognized Type | File Extension(s) |
---|---|
SSO | .sso |
PKCS12 | .p12 or .pfx |
JKS | .jks |
This property is only supported by the jdbc:oracle:thin driver.
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORETYPE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORETYPE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTOREPASSWORD
Specify the password of a key store file specified by
CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE
.
This property has no effect if
CONNECTION_PROPERTY_WALLET_LOCATION
has also been set.
If this property is not set, the JDBC driver will attempt to access the key store without using a password.
This property is only supported by the jdbc:oracle:thin driver.
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTOREPASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTOREPASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE
Specify the file system path of a trust store file which contains certificate authorities that can be trusted when authenticating a database's certificate.
If no value is set for this property, the driver will use the
cacerts
file included with your JDK installation.
If a database's certificate can not be authenticated, then connection establishment will result in a TLS handshake failure. The failure message may describe a problem with building or finding a verification path.
This property has no effect if
CONNECTION_PROPERTY_WALLET_LOCATION
has also been set.
This property is only supported by the jdbc:oracle:thin driver.
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORETYPE
Specify the format of a trust store file specified by
CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE
. Examples of
commonly used formats are "SSO", "PKCS12", and "JKS".
This property has no effect if
CONNECTION_PROPERTY_WALLET_LOCATION
has also been set.
If this property is not set, the JDBC driver will attempt to automatically recognize the trust store type based on the file extension of the trust store.
Recognized Type | File Extension(s) |
---|---|
SSO | .sso |
PKCS12 | .p12 or .pfx |
JKS | .jks |
This property is only supported by the jdbc:oracle:thin driver.
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORETYPE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORETYPE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTOREPASSWORD
Specify the password of a trust store file specified by
CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE
.
This property has no effect if
CONNECTION_PROPERTY_WALLET_LOCATION
has also been set.
If this property is not set, the JDBC driver will attempt to access the trust store without using a password.
This property is only supported by the jdbc:oracle:thin driver.
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTOREPASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTOREPASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_KEYMANAGERFACTORY_ALGORITHM
Specify the algorithm to use when managing the key meterial of the key
store file specified by
CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE
.
If this property is not set, the JDBC driver will use your JDK's default
algorithm, as returned by
KeyManagerFactory.getDefaultAlgorithm()
.
This property is only supported by the jdbc:oracle:thin driver.
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_SSL_KEYMANAGERFACTORY_ALGORITHM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_KEYMANAGERFACTORY_ALGORITHM_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_SSL_TRUSTMANAGERFACTORY_ALGORITHM
Specify the algorithm to use when managing the meterial of the trust
store file specified by
CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE
.
If this property is not set, the JDBC driver will use your JDK's default
algorithm, as returned by
TrustManagerFactory.getDefaultAlgorithm()
.
This property is only supported by the jdbc:oracle:thin driver.
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_SSL_TRUSTMANAGERFACTORY_ALGORITHM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_TRUSTMANAGERFACTORY_ALGORITHM_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_OLDSYNTAX
static final String CONNECTION_PROPERTY_THIN_NET_OLDSYNTAX_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_OLDSYNTAX_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JNDI_LDAP_CONNECT_TIMEOUT
static final String CONNECTION_PROPERTY_THIN_JNDI_LDAP_CONNECT_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JNDI_LDAP_CONNECT_TIMEOUT_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_JNDI_LDAP_READ_TIMEOUT
static final String CONNECTION_PROPERTY_THIN_JNDI_LDAP_READ_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JNDI_LDAP_READ_TIMEOUT_ACCESSMODE
static final String CONNECTION_PROPERTY_WALLET_LOCATION
mkstore -wrl ./client_wallet
-createCredential \(DESCRIPTION=\(ADDRESS=\(PROTOCOL=tcp\)\(HOST=servername\)\(
PORT=5560\)\)\(CONNECT_DATA=\(SERVICE_NAME=service_name\)\)\) scott tiger
The wallet location can be set in two formats:
file:/path/ewallet.sso" or "file:/path/cwallet.p12" or "file:/path/to/directory/
(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/path/to/directory)))
Note that if you don't use SSO wallets but PKCS12 wallets, you must provide the wallet password through the "oracle.net.wallet_password" property.
static final String CONNECTION_PROPERTY_WALLET_LOCATION_DEFAULT
static final byte CONNECTION_PROPERTY_WALLET_LOCATION_ACCESSMODE
static final String CONNECTION_PROPERTY_WALLET_PASSWORD
static final String CONNECTION_PROPERTY_WALLET_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_WALLET_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_CIPHER_SUITES
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_CIPHER_SUITES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_CIPHER_SUITES_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_VERSIONS
null
.
The valid protocol versions are TLSv1.2
TLSv1.1
TLSv1
SSLv3
SSLv2Hello
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_VERSIONS_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_VERSIONS_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE
KeyStore
file which will be used while
SSL negotiation with LDAP server. The default value is null
. When no value is specified,
the default keystore of the JVM is used.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_TYPE
KeyStore
file to be used while SSL
negotiation with LDAP Server. This is an optional property and the JDBC Thin driver will try to resolve
the key store type automatically using the file extension. JVM's default KeyStoreType
is
used if the type is not configured and the driver is not able to resolve the type automatically.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_TYPE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_TYPE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_PASSWORD
null
.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYSTORE_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYMANAGER_FACTORY_ALGORITHM
null
.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYMANAGER_FACTORY_ALGORITHM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_KEYMANAGER_FACTORY_ALGORITHM_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE
TrustStore
file which will be used while
SSL negotiation with LDAP server. The default value is null
. When no value is specified,
the default truststore of the JVM is used.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_TYPE
TrustStore
file to be used while SSL
negotiation with LDAP Server. This is an optional property and the JDBC Thin driver will try to resolve
the trust store type automatically using the file extension. JVM's default KeyStoreType
is
used if the type is not configured and the driver is not able to resolve the type automatically.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_TYPE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_TYPE_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_PASSWORD
null
.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTSTORE_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTMANAGER_FACTORY_ALGORITHM
null
.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTMANAGER_FACTORY_ALGORITHM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_TRUSTMANAGER_FACTORY_ALGORITHM_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_WALLET_LOCATION
null
. Username(DN) and password to be used for
authenticating with the LDAP server can be added to the wallet secret store using the
key names oracle.ldap.client.dn
and oracle.ldap.client.password
respectively.
The above authentication credentials can also be configured through connection properties.static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_WALLET_LOCATION_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_WALLET_LOCATION_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_WALLET_PASSWORD
null
and no password is required for accessing the wallet.CONNECTION_PROPERTY_THIN_LDAP_SSL_WALLET_LOCATION
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_LDAP_SSL_WALLET_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_WALLET_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SECURITY_AUTHENTICATION
none
or simple
.
The default value is none
and LDAP authentication is disabled. If it is configured
with the value simple
then the LDAP Server authentication details must to be set through either
wallet secret store or connection properties.static final String CONNECTION_PROPERTY_THIN_LDAP_SECURITY_AUTHENTICATION_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SECURITY_AUTHENTICATION_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SECURITY_PRINCIPAL
null
. This property can also be configured via wallet secret store entry
oracle.ldap.client.dn
. The value configured in connection property has higher priority over the
value configured in the wallet secret store. This property is used only when the LDAP authentication is set to
simple
.static final String CONNECTION_PROPERTY_THIN_LDAP_SECURITY_PRINCIPAL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SECURITY_PRINCIPAL_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SECURITY_CREDENTIALS
null
. This property can also be configured via wallet secret store entry
oracle.ldap.client.password
. The value configured in connection property has higher priority over the
value configured in the wallet secret store. This property is used only when the LDAP authentication is set to
simple
.static final String CONNECTION_PROPERTY_THIN_LDAP_SECURITY_CREDENTIALS_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SECURITY_CREDENTIALS_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_CONTEXT_PROTOCOL
Specifies a protocol
name for the driver to use when
obtaining an instance of SSLContext
from
SSLContext.getInstance(String)
for a TLS enabled
LDAP connection.
This property has no effect on which versions of SSL or TLS will be
accepted during handshakes with the LDAP server.
To configure the set of protocol versions accepted during handshakes, use
CONNECTION_PROPERTY_THIN_LDAP_SSL_VERSIONS
.
If this property is not specified, the driver will use "TLS" by default.
This property is only supported by the Type 4 driver (ie: jdbc:oracle:thin).
static final String CONNECTION_PROPERTY_THIN_LDAP_SSL_CONTEXT_PROTOCOL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_LDAP_SSL_CONTEXT_PROTOCOL_ACCESSMODE
static final String CONNECTION_PROPERTY_PROXY_CLIENT_NAME
For example if a database user "proxyclient" is setup to connect through another user called "proxy", then you would set the value of this property to "proxyclient".
Note that this connection property can be used to obtain a proxy client connection from
scratch and in this model there is only one database session involved instead of two when
you first create a regular connection as "proxy" and then call openProxySession(...)
to obtain a proxy client session. This is called the single-session proxy model.
This property is only supported for connections to database versions of 10.2 and higher.
There is no support for the single-session proxy model in earlier database versions.
static final String CONNECTION_PROPERTY_PROXY_CLIENT_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_PROXY_CLIENT_NAME_ACCESSMODE
static final String CONNECTION_PROPERTY_DEFAULT_USE_NIO
static final String CONNECTION_PROPERTY_DEFAULT_USE_NIO_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_USE_NIO_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_HTTPS_PROXY_HOST
jdbc:oracle:thin:@(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(HTTPS_PROXY=myproxyserver)(HTTPS_PROXY_PORT=8080)(HOST=myhost)(PORT=5521)(PROTOCOL=tcp)))
(CONNECT_DATA=(SERVICE_NAME=myService)))
CONNECTION_PROPERTY_THIN_HTTPS_PROXY_PORT
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_HTTPS_PROXY_HOST_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_HTTPS_PROXY_HOST_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_HTTPS_PROXY_PORT
jdbc:oracle:thin:@(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(HTTPS_PROXY=myproxyserver)(HTTPS_PROXY_PORT=8080)(HOST=myhost)(PORT=5521)(PROTOCOL=tcp)))
(CONNECT_DATA=(SERVICE_NAME=myService)))
CONNECTION_PROPERTY_THIN_HTTPS_PROXY_HOST
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_THIN_HTTPS_PROXY_PORT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_HTTPS_PROXY_PORT_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_NET_CONNECTIONID_PREFIX
oracle.net.connectionIdPrefix
can be used to
customize the first 8 characters of the Net connection id that's sent to the
listener during connection establishment for tracing purposes. Its value is a 8
character long string (can contain only alphabets
, numbers
and _
).
For example the value can be set to App_231
(which contains only
supported characters) to identify connections coming from a
particular application.CONNECT_DATA
parameter CONNECTION_ID_PREFIX
.static final String CONNECTION_PROPERTY_THIN_NET_CONNECTIONID_PREFIX_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CONNECTIONID_PREFIX_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_DRIVER_CHARSET
static final String CONNECTION_PROPERTY_OCI_DRIVER_CHARSET_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_DRIVER_CHARSET_ACCESSMODE
static final String CONNECTION_PROPERTY_EDITION_NAME
The following SQL query:
SELECT sys_context('USERENV', 'CURRENT_EDITION_NAME') FROM dualwill return the same value.
Note that this property can also be set as a system property.
By default, if you don't set this property, the "session edition" will be set to the database default edition (for example "ORA$BASE").
static final String CONNECTION_PROPERTY_EDITION_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_EDITION_NAME_ACCESSMODE
static final String CONNECTION_PROPERTY_INTERNAL_LOGON
As of 12.1 server and driver, "SYSBACKUP", "SYSDG" and "SYSKM" are also supported.
static final String CONNECTION_PROPERTY_INTERNAL_LOGON_DEFAULT
static final byte CONNECTION_PROPERTY_INTERNAL_LOGON_ACCESSMODE
static final String CONNECTION_PROPERTY_CREATE_DESCRIPTOR_USE_CURRENT_SCHEMA_FOR_SCHEMA_NAME
false
.
The user also has an option to append the CURRENT_USER value to the
ADT name to obtain fully qualified name by setting this property to
true
. Note that it takes a network round trip to fetch
the CURRENT_SCHEMA value.
The default value of this flag is false
which means
that the driver appends the user name used to login as the user name to
append to the ADT name.
static final String CONNECTION_PROPERTY_CREATE_DESCRIPTOR_USE_CURRENT_SCHEMA_FOR_SCHEMA_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_CREATE_DESCRIPTOR_USE_CURRENT_SCHEMA_FOR_SCHEMA_NAME_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_SVC_CTX_HANDLE
static final String CONNECTION_PROPERTY_OCI_SVC_CTX_HANDLE_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_SVC_CTX_HANDLE_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_ENV_HANDLE
static final String CONNECTION_PROPERTY_OCI_ENV_HANDLE_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_ENV_HANDLE_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_ERR_HANDLE
static final String CONNECTION_PROPERTY_OCI_ERR_HANDLE_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_ERR_HANDLE_ACCESSMODE
static final String CONNECTION_PROPERTY_PRELIM_AUTH
static final String CONNECTION_PROPERTY_PRELIM_AUTH_DEFAULT
static final byte CONNECTION_PROPERTY_PRELIM_AUTH_ACCESSMODE
static final String CONNECTION_PROPERTY_SET_NEW_PASSWORD
static final String CONNECTION_PROPERTY_SET_NEW_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_SET_NEW_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_DEFAULT_EXECUTE_BATCH
static final String CONNECTION_PROPERTY_DEFAULT_EXECUTE_BATCH_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_EXECUTE_BATCH_ACCESSMODE
static final String CONNECTION_PROPERTY_DEFAULT_ROW_PREFETCH
static final String CONNECTION_PROPERTY_DEFAULT_ROW_PREFETCH_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_ROW_PREFETCH_ACCESSMODE
static final String CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE
The LOB prefetch size can be overriden at the statement level through the setLobPrefetchSize(int)
which is defined in oracle.jdbc.OracleStatement
. The statement level LOB
prefetch size can be overriden at the column level through the defineColumnType
method.
The value can be "-1" to disable LOB prefetch for this connection, "0" to enable LOB prefetch for meta-data only or any value greater than 0 which represents a number of bytes for BLOBs and chars for CLOBs to be prefetched along with the locator during fetch operations. The default value for this property is "32768".
OracleStatement.setLobPrefetchSize
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_DATA_IN_LOCATOR
Data in Locator is a server side feature introduced in 10.2. For small lobs the actual data in included in the locator bytes shipped to the client. These may be shipped back and forth several times as the client accesses the lob using the lob APIs. For fast networks this actually increases performance because it greatly reduces server CPU consumption.
For slower networks there is a net slow down. Setting this property to false will disable this feature.
This property is currently only effective for the thin driver.
Data in Locator is automatically disabled when Lob Prefetch is enabled. Thus this property will most likely be used for 10.2 servers where lob prefetch is not available.
static final String CONNECTION_PROPERTY_ENABLE_DATA_IN_LOCATOR_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_DATA_IN_LOCATOR_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_READ_DATA_IN_LOCATOR
Data in Locator is a server side feature introduced in 10.2. The JDBC driver is enhanced to use this data directly. This saves a number of round trips which previously occurred when lob APIs were used to read the data.
This feature is only enabled for 10.2 servers. For earlier servers the Data in Locator feature did not exist and for later ones the lob prefetch functionality make this uunnecessary and the new lob storage types complicate the locator structure.
static final String CONNECTION_PROPERTY_ENABLE_READ_DATA_IN_LOCATOR_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_READ_DATA_IN_LOCATOR_ACCESSMODE
static final String CONNECTION_PROPERTY_REPORT_REMARKS
static final String CONNECTION_PROPERTY_REPORT_REMARKS_DEFAULT
static final byte CONNECTION_PROPERTY_REPORT_REMARKS_ACCESSMODE
static final String CONNECTION_PROPERTY_INCLUDE_SYNONYMS
static final String CONNECTION_PROPERTY_INCLUDE_SYNONYMS_DEFAULT
static final byte CONNECTION_PROPERTY_INCLUDE_SYNONYMS_ACCESSMODE
static final String CONNECTION_PROPERTY_RESTRICT_GETTABLES
static final String CONNECTION_PROPERTY_RESTRICT_GETTABLES_DEFAULT
static final byte CONNECTION_PROPERTY_RESTRICT_GETTABLES_ACCESSMODE
static final String CONNECTION_PROPERTY_ACCUMULATE_BATCH_RESULT
static final String CONNECTION_PROPERTY_ACCUMULATE_BATCH_RESULT_DEFAULT
static final byte CONNECTION_PROPERTY_ACCUMULATE_BATCH_RESULT_ACCESSMODE
static final String CONNECTION_PROPERTY_USE_FETCH_SIZE_WITH_LONG_COLUMN
static final String CONNECTION_PROPERTY_USE_FETCH_SIZE_WITH_LONG_COLUMN_DEFAULT
static final byte CONNECTION_PROPERTY_USE_FETCH_SIZE_WITH_LONG_COLUMN_ACCESSMODE
static final String CONNECTION_PROPERTY_PROCESS_ESCAPES
static final String CONNECTION_PROPERTY_PROCESS_ESCAPES_DEFAULT
static final byte CONNECTION_PROPERTY_PROCESS_ESCAPES_ACCESSMODE
static final String CONNECTION_PROPERTY_FIXED_STRING
static final String CONNECTION_PROPERTY_FIXED_STRING_DEFAULT
static final byte CONNECTION_PROPERTY_FIXED_STRING_ACCESSMODE
static final String CONNECTION_PROPERTY_DEFAULTNCHAR
static final String CONNECTION_PROPERTY_DEFAULTNCHAR_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULTNCHAR_ACCESSMODE
static final String CONNECTION_PROPERTY_RESOURCE_MANAGER_ID
static final String CONNECTION_PROPERTY_RESOURCE_MANAGER_ID_DEFAULT
static final byte CONNECTION_PROPERTY_RESOURCE_MANAGER_ID_ACCESSMODE
static final String CONNECTION_PROPERTY_DISABLE_DEFINECOLUMNTYPE
static final String CONNECTION_PROPERTY_DISABLE_DEFINECOLUMNTYPE_DEFAULT
static final byte CONNECTION_PROPERTY_DISABLE_DEFINECOLUMNTYPE_ACCESSMODE
static final String CONNECTION_PROPERTY_CONVERT_NCHAR_LITERALS
static final String CONNECTION_PROPERTY_CONVERT_NCHAR_LITERALS_DEFAULT
static final byte CONNECTION_PROPERTY_CONVERT_NCHAR_LITERALS_ACCESSMODE
static final String CONNECTION_PROPERTY_AUTO_COMMIT_SPEC_COMPLIANT
Oracle JDBC 12.1 drivers comply with JDBC specification 4.1 and will:
SQLException
when Connection.commit()
or Connection.rollback()
is invoked when auto-commit is true
.Connection.setAutoCommit(boolean)
is called and the mode is changed from false
to true
.Because the standard behavior may break existing applications, this
flag is provided as a convenience and can be set to false
.
Most applications may never need to set this flag. Users are encouraged to
modify their applications to support the specification instead of using
this flag.
Connection.commit()
,
Connection.rollback()
,
Connection.setAutoCommit(boolean)
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_AUTO_COMMIT_SPEC_COMPLIANT_DEFAULT
static final byte CONNECTION_PROPERTY_AUTO_COMMIT_SPEC_COMPLIANT_ACCESSMODE
static final String CONNECTION_PROPERTY_JDBC_STANDARD_BEHAVIOR
static final String CONNECTION_PROPERTY_JDBC_STANDARD_BEHAVIOR_DEFAULT
static final byte CONNECTION_PROPERTY_JDBC_STANDARD_BEHAVIOR_ACCESSMODE
static final String CONNECTION_PROPERTY_J2EE13_COMPLIANT
true
. So if this property is used as workaround
to turn off compliant behavior, consider changing the application.The driver would behave differently in the following way when the property is set.
The property is false
by default for all drivers while
using regular JDBC library. The value of this property is
true
by default in DMS jar file.
static final String CONNECTION_PROPERTY_J2EE13_COMPLIANT_DEFAULT
static final byte CONNECTION_PROPERTY_J2EE13_COMPLIANT_ACCESSMODE
static final String CONNECTION_PROPERTY_DMS_PARENT_NAME
static final String CONNECTION_PROPERTY_DMS_PARENT_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_DMS_PARENT_NAME_ACCESSMODE
static final String CONNECTION_PROPERTY_DMS_PARENT_TYPE
static final String CONNECTION_PROPERTY_DMS_PARENT_TYPE_DEFAULT
static final byte CONNECTION_PROPERTY_DMS_PARENT_TYPE_ACCESSMODE
static final String CONNECTION_PROPERTY_DMS_STMT_METRICS
static final String CONNECTION_PROPERTY_DMS_STMT_METRICS_DEFAULT
static final byte CONNECTION_PROPERTY_DMS_STMT_METRICS_ACCESSMODE
static final String CONNECTION_PROPERTY_DMS_STMT_CACHING_METRICS
static final String CONNECTION_PROPERTY_DMS_STMT_CACHING_METRICS_DEFAULT
static final byte CONNECTION_PROPERTY_DMS_STMT_CACHING_METRICS_ACCESSMODE
static final String CONNECTION_PROPERTY_MAP_DATE_TO_TIMESTAMP
The 9i and 10g drivers mistakenly mapped DATE to java.sql.Date by default. Setting this property to false will cause the driver to map SQL DATE to java.util.Date with the corresponding loss of time information in each DATE value. This is for backwards compatibility only.
static final String CONNECTION_PROPERTY_MAP_DATE_TO_TIMESTAMP_DEFAULT
static final byte CONNECTION_PROPERTY_MAP_DATE_TO_TIMESTAMP_ACCESSMODE
static final String CONNECTION_PROPERTY_USE_THREADLOCAL_BUFFER_CACHE
In most cases you should use the per connection cache. However if your app has many more idle connections than active connections at any given moment then using the thread local cache may reduce the total JDBC driver memory footprint. If you are not having a problem with Java heap size, leave this alone.
static final String CONNECTION_PROPERTY_USE_THREADLOCAL_BUFFER_CACHE_DEFAULT
static final byte CONNECTION_PROPERTY_USE_THREADLOCAL_BUFFER_CACHE_ACCESSMODE
static final String CONNECTION_PROPERTY_DRIVER_NAME_ATTRIBUTE
static final String CONNECTION_PROPERTY_DRIVER_NAME_ATTRIBUTE_DEFAULT
static final byte CONNECTION_PROPERTY_DRIVER_NAME_ATTRIBUTE_ACCESSMODE
static final String CONNECTION_PROPERTY_MAX_CACHED_BUFFER_SIZE
The driver uses char and byte buffers to retrieve query results. These buffers can be quite large and are cached. If some queries create particularly large buffers, the driver will attempt to cache those large buffers. This may possibly reduce performance. The The best way to approach this problem is to reduce buffer size of those queries by setting their fetch_size to a smaller value, but if that is impractical, you can set this property to prevent these large buffers from being cached. The appropriate value depends on the heap size, number of connections open, number of statements open at once, and fraction of the heap that can be allocated to JDBC. A reasonable starting point for a middle-tier application server might be 21 (2MB). It bears repating that you are better off setting the fetch size of the problematic statements, if possible.
USE_THREAD_LOCAL_BUFFER_CACHE
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_MAX_CACHED_BUFFER_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_MAX_CACHED_BUFFER_SIZE_ACCESSMODE
static final String CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE
static final String CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE_ACCESSMODE
static final String CONNECTION_PROPERTY_LOB_STREAM_POS_STANDARD_COMPLIANT
static final String CONNECTION_PROPERTY_LOB_STREAM_POS_STANDARD_COMPLIANT_DEFAULT
static final byte CONNECTION_PROPERTY_LOB_STREAM_POS_STANDARD_COMPLIANT_ACCESSMODE
static final String CONNECTION_PROPERTY_STRICT_ASCII_CONVERSION
static final String CONNECTION_PROPERTY_STRICT_ASCII_CONVERSION_DEFAULT
static final byte CONNECTION_PROPERTY_STRICT_ASCII_CONVERSION_ACCESSMODE
static final String CONNECTION_PROPERTY_CONNECTION_CLASS
static final String CONNECTION_PROPERTY_CONNECTION_CLASS_DEFAULT
static final byte CONNECTION_PROPERTY_CONNECTION_CLASS_ACCESSMODE
static final String CONNECTION_PROPERTY_DRCP_TAG_NAME
#attachConnection()
will return true.static final String CONNECTION_PROPERTY_DRCP_TAG_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_DRCP_TAG_NAME_ACCESSMODE
static final String CONNECTION_PROPERTY_CONNECTION_PURITY
static final String CONNECTION_PROPERTY_CONNECTION_PURITY_DEFAULT
static final byte CONNECTION_PROPERTY_CONNECTION_PURITY_ACCESSMODE
static final String CONNECTION_PROPERTY_USE_DRCP_MULTIPLE_TAG
=
character.
Multiple tags are separated by ;
character.key
and value
can not be null or empty.
This property is valid only for thin driver.static final String CONNECTION_PROPERTY_USE_DRCP_MULTIPLE_TAG_DEFAULT
static final byte CONNECTION_PROPERTY_USE_DRCP_MULTIPLE_TAG_ACCESSMODE
static final String CONNECTION_PROPERTY_DRCP_PLSQL_CALLBACK
static final String CONNECTION_PROPERTY_DRCP_PLSQL_CALLBACK_DEFAULT
static final byte CONNECTION_PROPERTY_DRCP_PLSQL_CALLBACK_ACCESSMODE
static final String CONNECTION_PROPERTY_THIN_FORCE_DNS_LOAD_BALANCING
When a hostname resolves to multiple addresses, the JDBC thin driver retrieves an array of addresses by calling "InetAddress.getAllByName()" and attempts to connect to first address in the array. If the connection fails, it tries to connect to the second address and so on.
By default, because "InetAddress.getAllByName()" always returns the addresses in the same order, the first connection attempt will always be made to the same IP address. This defeats the goal of SCAN (Single Client Access Name which is a 11.2 RAC feature). In order to force the the driver to make the first connection attempt to a different IP address each time, you can set this property to "true". The default value is "false".
When this connection is set to "true", the array of IP addresses that a hostname resolves to, will be rotated by one for each new JDBC connection. As a result, DNS load balancing will happen properly.
This is a JDBC thin driver property only.
static final String CONNECTION_PROPERTY_THIN_FORCE_DNS_LOAD_BALANCING_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_FORCE_DNS_LOAD_BALANCING_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_TEMP_LOB_REF_COUNT
By default the JDBC thin driver counts the temp LOB references and only closes them on the server when this count is down to zero. For example it may happen that two instances of CLOB (or OracleClob) A and B point to the same temp lob. At this point thin's temp lob ref count is 2. If you close A, no roundtrip will be issued because B is still holding on the temp LOB (counts is 1). Thin will send a close to the database only when B is also closed.
The JDBC Thin driver will tell the server that it's counting temp lob references so that the server's temp lob ref count is always 1 as long as a close hasn't been issued.
If you're running into ORA-22922: NONEXISTENT LOB VALUE
errors in your application
you should make sure that you haven't accidentally set this property to false.
This property applies to the JDBC Thin driver only. It's new in 11.2.0.3.
static final String CONNECTION_PROPERTY_ENABLE_TEMP_LOB_REF_COUNT_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_TEMP_LOB_REF_COUNT_ACCESSMODE
static final String CONNECTION_PROPERTY_NET_KEEPALIVE
Valid values for this property are "true" or "false". If this property is not set, the default value is "false".
When this property is set to "true", a TCP keep alive probe will be initiated when the network connection has been idle for some period of time.
The behavior of the keep alive probe can be configured using additional connection properties:
static final String CONNECTION_PROPERTY_NET_KEEPALIVE_DEFAULT
static final byte CONNECTION_PROPERTY_NET_KEEPALIVE_ACCESSMODE
static final String CONNECTION_PROPERTY_NET_USE_TCP_FAST_OPEN
This is an ADB-S specific property for clients connecting from within OCI Cloud network. Please refer to ADB-S documentation for more information.
static final String CONNECTION_PROPERTY_NET_USE_TCP_FAST_OPEN_DEFAULT
static final byte CONNECTION_PROPERTY_NET_USE_TCP_FAST_OPEN_ACCESSMODE
static final String CONNECTION_PROPERTY_SQL_TRANSLATION_PROFILE
The string identifier for the translation profile or the translator to be used. Presence of this property activates the support for SQL Translation and is thus mandatory if SQL Translation feature is required.
static final String CONNECTION_PROPERTY_SQL_TRANSLATION_PROFILE_DEFAULT
static final byte CONNECTION_PROPERTY_SQL_TRANSLATION_PROFILE_ACCESSMODE
static final String CONNECTION_PROPERTY_SQL_ERROR_TRANSLATION_FILE
Path to an xml file which provides the Error code translations for those errors which occur if a connection can not be established to the server. The XML file is to be provided by the user and must conform to the following DTD. This is an optional property and if not provided then untranslated exceptions with oracle error codes are thrown. This property only affects the exceptions which happen when a connection to the server cannot be established. Once connection is established the translation happens on the server bypassing the local error translation file.
<!DOCTYPE LocalTranslationProfile[ <!ELEMENT LocalTranslationProfile (Exception+)> <!ELEMENT Exception (ORAError, ErrorCode, SQLState )> <!ELEMENT ORAError (#PCDATA)> <!ELEMENT ErrorCode (#PCDATA)> <!ELEMENT SQLState (#PCDATA)> ]>
static final String CONNECTION_PROPERTY_SQL_ERROR_TRANSLATION_FILE_DEFAULT
static final byte CONNECTION_PROPERTY_SQL_ERROR_TRANSLATION_FILE_ACCESSMODE
static final String CONNECTION_PROPERTY_READONLY_INSTANCE_ALLOWED
static final String CONNECTION_PROPERTY_READONLY_INSTANCE_ALLOWED_DEFAULT
static final byte CONNECTION_PROPERTY_READONLY_INSTANCE_ALLOWED_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_RESULTSET_CACHE
static final String CONNECTION_PROPERTY_ENABLE_RESULTSET_CACHE_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_RESULTSET_CACHE_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_QUERY_RESULT_CACHE
RESULT_CACHE(MODE FORCE)
for example)
for its data to be cached on the driver. You can also use a SQL hint /*+result_cache */
to identify queries that are worth being cached.static final String CONNECTION_PROPERTY_ENABLE_QUERY_RESULT_CACHE_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_QUERY_RESULT_CACHE_ACCESSMODE
static final String CONNECTION_PROPERTY_BACKWARD_COMPATIBLE_UPDATEABLE_RESULTSET
static final String CONNECTION_PROPERTY_BACKWARD_COMPATIBLE_UPDATEABLE_RESULTSET_DEFAULT
static final byte CONNECTION_PROPERTY_BACKWARD_COMPATIBLE_UPDATEABLE_RESULTSET_ACCESSMODE
static final String CONNECTION_PROPERTY_ALLOWED_LOGON_VERSION
Minimum authentication protocol required by the client. The term VERSION in the parameter name refers to the version of the authentication protocol, not the Oracle Database release. If the database doesn't meet or exceed the value defined by this parameter, then JDBC throws ORA-17292 : No valid logon method found. Allowed values :
static final String CONNECTION_PROPERTY_ALLOWED_LOGON_VERSION_DEFAULT
static final byte CONNECTION_PROPERTY_ALLOWED_LOGON_VERSION_ACCESSMODE
static final String CONNECTION_PROPERTY_COMMIT_OPTION
connection.commit();
. This
can be useful in cases where you don't want to rewrite your application to
specify a commit option at the call level, such as
connection.commit(myCommitOption);
.
This property can be set at the system level (all connections will use it) or at the connection level (only that particular connection will be affected). A call level commit option will override the default value.
Note that by default, if you don't set this property, the commit option is '0', zero, and the Oracle server's defaults apply. These defaults are: IMMEDIATE and WAIT (IO operations are done immediately and the call waits until the operation has completed to return).
static final String CONNECTION_PROPERTY_COMMIT_OPTION_DEFAULT
static final byte CONNECTION_PROPERTY_COMMIT_OPTION_ACCESSMODE
static final String CONNECTION_PROPERTY_DOWN_HOSTS_TIMEOUT
To specify the amount of time in seconds that information about the down
state of server hosts is kept in driver's cache.
The driver discovers the down
state of server hosts when attempting connections.
When a connection attempt fails, the information about the down
state of the server host is added to the driver's cache.
Subsequent connection attempts moves the down
hosts to the end of the address list, thereby reducing the priority of such hosts.
When the time specified by the oracle.net.DOWN_HOSTS_TIMEOUT
parameter has passed, the host is purged from the driver's cache, and its priority in the address list is restored.
Default value is 600 seconds.
static final String CONNECTION_PROPERTY_DOWN_HOSTS_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_DOWN_HOSTS_TIMEOUT_ACCESSMODE
static final String CONNECTION_PROPERTY_FAN_ENABLED
This property can be set at the system level (which applies to all connections), or at the connection level (which applies to a particular connection). The property is applicable to THIN and JDBC-OCI drivers only.
By default, if you don't set this property, FAN/HA is enabled. The primary use of this property is to disable driver HA/FAN.
static final String CONNECTION_PROPERTY_FAN_ENABLED_DEFAULT
static final byte CONNECTION_PROPERTY_FAN_ENABLED_ACCESSMODE
static final String CONNECTION_PROPERTY_TNS_ADMIN
tnsnames.ora
file.
ojdbc.properties
in the TNS Admin directory.static final String CONNECTION_PROPERTY_TNS_ADMIN_DEFAULT
static final byte CONNECTION_PROPERTY_TNS_ADMIN_ACCESSMODE
static final String CONNECTION_PROPERTY_NETWORK_COMPRESSION
Enables compression of the protocol data sent over network.
The value can be either "on"
, "off"
or "auto"
.
The default value is "off"
.
static final String CONNECTION_PROPERTY_NETWORK_COMPRESSION_DEFAULT
static final byte CONNECTION_PROPERTY_NETWORK_COMPRESSION_ACCESSMODE
static final String CONNECTION_PROPERTY_NETWORK_COMPRESSION_LEVELS
("high")
compression level and it is
the default value, so setting this property is optional.
Please note that the server should be configured to support
high
compression level. By default the server
supports only low
compression level.static final String CONNECTION_PROPERTY_NETWORK_COMPRESSION_LEVELS_DEFAULT
static final byte CONNECTION_PROPERTY_NETWORK_COMPRESSION_LEVELS_ACCESSMODE
static final String CONNECTION_PROPERTY_NETWORK_COMPRESSION_THRESHOLD
"1024"
.
The value cannot be less than "200"
. The value is in bytes.static final String CONNECTION_PROPERTY_NETWORK_COMPRESSION_THRESHOLD_DEFAULT
static final byte CONNECTION_PROPERTY_NETWORK_COMPRESSION_THRESHOLD_ACCESSMODE
static final String CONNECTION_PROPERTY_CONFIG_FILE
CONNECTION_PROPERTY_TNS_ADMIN
. If the connection property is set,
the driver will use that value rather than the system property or
environment variable. If the connection property is not set, "TNS_ADMIN"
as a system property will override the environment variable.
Properties.load(java.io.Reader)
. Any property
which has ACCESSMODE_FILEPROP can be defined in a file.
static final String CONNECTION_PROPERTY_CONFIG_FILE_DEFAULT
static final byte CONNECTION_PROPERTY_CONFIG_FILE_ACCESSMODE
static final String CONNECTION_PROPERTY_WEBSOCKET_USER
Secure Websocket protocol (WSS)
.null
.static final String CONNECTION_PROPERTY_WEBSOCKET_USER_DEFAULT
static final byte CONNECTION_PROPERTY_WEBSOCKET_USER_ACCESSMODE
static final String CONNECTION_PROPERTY_WEBSOCKET_PASSWORD
Secure Websocket protocol (WSS)
.null
.static final String CONNECTION_PROPERTY_WEBSOCKET_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_WEBSOCKET_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_SOCKS_PROXY_HOST
null
.
The HTTPS proxy configuration has higher precedence over SOCKS proxy.
If both are configured then HTTPS proxy is used for establishing connection
to the Oracle Database Server.static final String CONNECTION_PROPERTY_SOCKS_PROXY_HOST_DEFAULT
static final byte CONNECTION_PROPERTY_SOCKS_PROXY_HOST_ACCESSMODE
static final String CONNECTION_PROPERTY_SOCKS_PROXY_PORT
1080
.static final String CONNECTION_PROPERTY_SOCKS_PROXY_PORT_DEFAULT
static final byte CONNECTION_PROPERTY_SOCKS_PROXY_PORT_ACCESSMODE
static final String CONNECTION_PROPERTY_SOCKS_REMOTE_DNS
false
and the DNS lookup is performed locally.true
the DNS load balancing is disabled.CONNECTION_PROPERTY_SOCKS_PROXY_HOST
,
CONNECTION_PROPERTY_THIN_HTTPS_PROXY_HOST
,
CONNECTION_PROPERTY_THIN_HTTPS_PROXY_PORT
,
#THIN_FORCE_DNS_LOAD_BALANCING
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_SOCKS_REMOTE_DNS_DEFAULT
static final byte CONNECTION_PROPERTY_SOCKS_REMOTE_DNS_ACCESSMODE
static final String CONNECTION_PROPERTY_DEFAULT_CONNECTION_VALIDATION
Connection
.static final String CONNECTION_PROPERTY_DEFAULT_CONNECTION_VALIDATION_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_CONNECTION_VALIDATION_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_AC_SUPPORT
This property can be set at the system level (which applies to all connections), or at the connection level (which applies to a particular connection). The property is applicable to THIN driver only.
By default, if you don't set this property, AC support is enabled on the JDBC driver data sources. The primary use of this property is to disable AC on the data sources.
Note that when this property is set to true, whether AC is actually active depends on other factors like server AC configuration.
static final String CONNECTION_PROPERTY_ENABLE_AC_SUPPORT_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_AC_SUPPORT_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_TG_SUPPORT
This property can be set at the system level (which applies to all connections), or at the connection level (which applies to a particular connection). The property is applicable to THIN driver only.
By default, if you don't set this property, TG support is disabled on the JDBC driver data sources, unless Application Continuity (AC) is enabled. The primary use of this property is to enable TG on the data sources, when AC is not enabled.
Note that when this property is set to true, whether TG is actually
active depends on other factors like server TG configuration.
One way to check if TG is actually enabled is to call
getLogicalTransactionId
on
oracle.jdbc.OracleConnection
and verify that the returned
value is not null.
static final String CONNECTION_PROPERTY_ENABLE_TG_SUPPORT_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_TG_SUPPORT_ACCESSMODE
static final String CONNECTION_PROPERTY_ENABLE_IMPLICIT_REQUESTS
Implicit request support helps to reduce application failover recovery time. This AC optimization should be used with caution for applications that change server session states during a request. For more details, please consult the JDBC and RAC documentations on Auto-AC.
This property can be set at the system level (which applies to all connections), or at the connection level (which applies to a particular connection). The property is applicable to THIN driver only.
By default, the value of this property is "true", which means that implicit request support is enabled.
static final String CONNECTION_PROPERTY_ENABLE_IMPLICIT_REQUESTS_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_IMPLICIT_REQUESTS_ACCESSMODE
static final String CONNECTION_PROPERTY_DRCP_MULTIPLEXING_IN_REQUEST_APIS
Enabling this makes DRCP transparent to connection pools that call the request-APIs at pool check-out and check-in.
This property can be set at the system level (which applies to all connections), or at the connection level (which applies to a particular connection).
By default, the value of this property is "false", which means that the support is disabled.
static final String CONNECTION_PROPERTY_DRCP_MULTIPLEXING_IN_REQUEST_APIS_DEFAULT
static final byte CONNECTION_PROPERTY_DRCP_MULTIPLEXING_IN_REQUEST_APIS_ACCESSMODE
static final String CONNECTION_PROPERTY_CONTINUE_BATCH_ON_ERROR
This property is applicable to the THIN driver only. The default value of this property is "false".
static final String CONNECTION_PROPERTY_CONTINUE_BATCH_ON_ERROR_DEFAULT
static final byte CONNECTION_PROPERTY_CONTINUE_BATCH_ON_ERROR_ACCESSMODE
static final String CONNECTION_PROPERTY_TCP_KEEPIDLE
This property is applicable to the THIN driver only.
CONNECTION_PROPERTY_NET_KEEPALIVE
must be set to "true" to enable
TCP keep alive.
The default value is system dependent. If this property is not set, or if it is set to -1, the driver will use the system dependent default value.
jdk.net.ExtendedSocketOptions#TCP_KEEPIDLE
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_TCP_KEEPIDLE_DEFAULT
static final byte CONNECTION_PROPERTY_TCP_KEEPIDLE_ACCESSMODE
static final String CONNECTION_PROPERTY_TCP_KEEPINTERVAL
This property is applicable to the THIN driver only.
CONNECTION_PROPERTY_NET_KEEPALIVE
must be set to "true" to enable
TCP keep alive.
The default value is system dependent. If this property is not set, or if it is set to -1, the driver will use the system dependent default value.
jdk.net.ExtendedSocketOptions#TCP_KEEPINTERVAL
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_TCP_KEEPINTERVAL_DEFAULT
static final byte CONNECTION_PROPERTY_TCP_KEEPINTERVAL_ACCESSMODE
static final String CONNECTION_PROPERTY_USE_SHARDING_DRIVER_CONNECTION
static final String CONNECTION_PROPERTY_USE_SHARDING_DRIVER_CONNECTION_DEFAULT
static final byte CONNECTION_PROPERTY_USE_SHARDING_DRIVER_CONNECTION_ACCESSMODE
static final String CONNECTION_PROPERTY_TCP_KEEPCOUNT
This property is applicable to the THIN driver only.
CONNECTION_PROPERTY_NET_KEEPALIVE
must be set to "true" to enable
TCP keep alive.
The default value is system dependent. If this property is not set, or if it is set to -1, the driver will use the system dependent default value.
jdk.net.ExtendedSocketOptions#TCP_KEEPCOUNT
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_TCP_KEEPCOUNT_DEFAULT
static final byte CONNECTION_PROPERTY_TCP_KEEPCOUNT_ACCESSMODE
static final String CONNECTION_PROPERTY_REQUEST_SIZE_LIMIT
We recommend that applicationss do not set this property unless there is a demonstrated memory size problem caused by request size and no better solution is feasible.
Replay disabling applies only to any request that exceeds the limit. Replay will be reenabled at the next beginRequest on the same JDBC physical connection.
This property can be set at the system level (which applies to all connections), or at the connection level (which applies to a particular connection). The property is applicable to THIN driver only.
There is a request-size histogram in the AC statistics that users can
use to get an idea of the request size distribution of their application.
It can be obtained by calling getRequestSizeHistogram()
on
oracle.jdbc.replay.ReplayStatistics
.
The histogram is also dumped into the Oracle JDBC driver logs, when the driver detects significant memory pressure.
Users can use the histogram and AC statistics to determine the majority of their request sizes, and set the request-size limit to be slightly above those. For small number of long requests above the limit, users could consider alternatives such as more frequent connection pool checkout/checkin's, deploying Transparent Application Continuity (TAC) to reduce request size, or to allow replay being disabled for requests with only long queries.
By default, the value of this property is "2147483647", which is Integer.MAX_VALUE that means replay is practically enabled for all requests.
static final String CONNECTION_PROPERTY_REQUEST_SIZE_LIMIT_DEFAULT
static final byte CONNECTION_PROPERTY_REQUEST_SIZE_LIMIT_ACCESSMODE
static final String CONNECTION_PROPERTY_ONS_WALLET_FILE
The Oracle JDBC driver just passes this wallet file to the lower layer. The file can be specified on a global or per-data source basis.
The supported wallet file specification syntax is the same as for
oracle.net.wallet_location
If the oracle.jdbc.ons.walletfile
property is not specified
but the oracle.net.wallet_location
property is, and if the
oracle.jdbc.ons.protocol
property is set to "TCPS", the driver
will use oracle.net.wallet_location
property's value as
the ONS wallet file. In that case, both the JDBC connection and
the ONS connection share the same Oracle wallet.
CONNECTION_PROPERTY_WALLET_LOCATION
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_ONS_WALLET_FILE_DEFAULT
static final byte CONNECTION_PROPERTY_ONS_WALLET_FILE_ACCESSMODE
static final String CONNECTION_PROPERTY_ONS_WALLET_PASSWORD
CONNECTION_PROPERTY_WALLET_PASSWORD
,
Constant Field Valuesstatic final String CONNECTION_PROPERTY_ONS_WALLET_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_ONS_WALLET_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_ONS_PROTOCOL
When this property is "TCPS" and oracle.jdbc.ons.walletfile
is not specified, any JDBC wallet configured via the connection
property oracle.net.wallet_location
will also be used
as the ONS wallet for ONS connections.
If oracle.jdbc.ons.walletfile
is specified, it will be used
as the ONS wallet and the ONS connection protocol is assumed to be TCPS.
static final String CONNECTION_PROPERTY_ONS_PROTOCOL_DEFAULT
static final byte CONNECTION_PROPERTY_ONS_PROTOCOL_ACCESSMODE
static final String CONNECTION_PROPERTY_LOGIN_TIMEOUT
When specified, the timeout is applied to any method call which opens a
new connection, such as
DataSource.getConnection()
or
ConnectionBuilder
. If the timeout expires, these
method calls will throw a SQLException
with error code
18714.
A value specified for this property can be overriden by a value set with
CommonDataSource.setLoginTimeout(int)
.
This property is only supported by the Type 4 driver (ie: jdbc:oracle:thin).
static final String CONNECTION_PROPERTY_LOGIN_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_LOGIN_TIMEOUT_ACCESSMODE
static final String CONNECTION_PROPERTY_IN_BAND_NOTIFICATION
Specifies whether driver in-band notification support is enabled. This feature primarily helps applications to drain connections gracefully during Oracle Autonomous Database (ADB) and Real Application Clusters (RAC) planned maintenance.
This property can be set at the system level (which applies to all connections), or at the connection level (which applies to a particular connection). The property is applicable to THIN and JDBC-OCI drivers only.
By default, if you don't set this property, in-band notification is always enabled. The primary use of this property is to disable this feature, which might be necessary in case in-band notification interferes with similar features in upper-stacks (like a connection pool or application container), or malfunctions.
//_end_m4_ifInServerstatic final String CONNECTION_PROPERTY_IN_BAND_NOTIFICATION_DEFAULT
static final byte CONNECTION_PROPERTY_IN_BAND_NOTIFICATION_ACCESSMODE
static final String CONNECTION_PROPERTY_SSL_CONTEXT_PROTOCOL
Specifies a protocol
name for the driver to use when
obtaining an instance of SSLContext
from
SSLContext.getInstance(String)
for a TLS enabled
database connection.
This property has no effect on which versions of SSL or TLS will be
accepted during handshakes with the database server.
To configure the set of protocol versions accepted during handshakes, use
CONNECTION_PROPERTY_THIN_SSL_VERSION
.
If this property is not specified, the driver will use "TLS" by default.
This property is only supported by the Type 4 driver (ie: jdbc:oracle:thin).
static final String CONNECTION_PROPERTY_SSL_CONTEXT_PROTOCOL_DEFAULT
static final byte CONNECTION_PROPERTY_SSL_CONTEXT_PROTOCOL_ACCESSMODE
static final String CONNECTION_PROPERTY_TOKEN_AUTHENTICATION
Enables the use of access tokens that are stored in a file system location when authenticating with Oracle Database.
In this release of Oracle JDBC, "OCI_TOKEN" and "OAUTH" are the only
accepted values for this property. Setting this property to "OCI_TOKEN"
or "OAUTH" configures Oracle JDBC to obtain tokens from the file system as
described in the JavaDoc of CONNECTION_PROPERTY_TOKEN_LOCATION
.
If an Oracle Net Descriptor style URL includes the TOKEN_AUTH parameter then the value of that parameter takes precedence over a value defined by this property.
If a username and password are provided, then Oracle JDBC will use them to authenticate with the database, and this property is ignored.
If a token is configured using CONNECTION_PROPERTY_ACCESS_TOKEN
,
then Oracle JDBC will use it to authenticate with the database, and
this property is ignored.
static final String CONNECTION_PROPERTY_TOKEN_AUTHENTICATION_DEFAULT
static final byte CONNECTION_PROPERTY_TOKEN_AUTHENTICATION_ACCESSMODE
static final String CONNECTION_PROPERTY_TOKEN_LOCATION
When CONNECTION_PROPERTY_TOKEN_AUTHENTICATION
is set to
"OCI_TOKEN" or "OAUTH", this property specifies the file system path to
obtain access tokens from. The path specified by this property must be a
directory containing a file named "token", and the token file must contain
a JSON Web Token (JWT) on a single line of UTF-8 encoded text. The JWT
format is specified by
RFC 7519.
If the value of CONNECTION_PROPERTY_TOKEN_AUTHENTICATION
is
"OCI_TOKEN" then the path given by this property must be a directory
containing a both a token file, and a file named "oci_db_key.pem" that
stores the proof-of-possession key for the JWT token.
The private key file must use the PEM format and must contain the base64
encoding of an RSA private key in the PKCS#8 format. The private key
encoding must appear between the tags "-----BEGIN PRIVATE KEY---" and
"-----END PRIVATE KEY-----". Oracle JDBC uses the private key to
demonstrate proof of possession. Proof of possession is specified by
RFC 7800.
Note that the OCI CLI tool may be used to generate both the token and
private key files. By default, the OCI CLI tool will write these files
to the location of $HOME/.oci/db-token/
. If the value of
CONNECTION_PROPERTY_TOKEN_AUTHENTICATION
is "OCI_TOKEN", and
no location is configured by this property, then Oracle JDBC will read
the token and private key files from the default location of
$HOME/.oci/db-token/
.
If the value of CONNECTION_PROPERTY_TOKEN_AUTHENTICATION
is
"OAUTH", then only the token file is required, and the path given by this
property may locate either a file or directory. If a file is located,
then the JWT is read from it. Otherwise, if a directory is located, then
the JWT is read from a file named "token" in that directory.
If an Oracle Net Descriptor style URL includes the TOKEN_LOCATION parameter then the value of that parameter takes precedence over a value defined by this property.
static final String CONNECTION_PROPERTY_TOKEN_LOCATION_DEFAULT
static final byte CONNECTION_PROPERTY_TOKEN_LOCATION_ACCESSMODE
static final String CONNECTION_PROPERTY_PASSWORD_AUTHENTICATION
Configures how Oracle JDBC performs authentication with a user name and password.
In this release of Oracle JDBC, "PASSWORD_VERIFIER" and "OCI_TOKEN" are the only accepted values for this property.
If the value is "PASSWORD_VERIFIER", then database authentication is performed.
If the value is "OCI_TOKEN", then authentication is performed with the
Oracle Identity Cloud Service as described in
CONNECTION_PROPERTY_OCI_IAM_URL
The default value of this property is "PASSWORD_VERIFIER".
If an Oracle Net Descriptor style URL includes the PASSWORD_AUTH parameter then the value of that parameter takes precedence over a value defined by this property.
static final String CONNECTION_PROPERTY_PASSWORD_AUTHENTICATION_DEFAULT
static final byte CONNECTION_PROPERTY_PASSWORD_AUTHENTICATION_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_IAM_URL
When CONNECTION_PROPERTY_PASSWORD_AUTHENTICATION
is set to
"OCI_TOKEN", this property must specify the full path of the Identity and
Access Management (IAM) endpoint that Oracle JDBC authenticates with, as
in:
https://<{iam-endpoint}/{version}/dbBearerToken
Oracle JDBC must be configured to trust the certificate of the server
located by this URL. Certificates signed by an authority included in
the JDK's default cacerts file will be trusted. Additional trusted
certificates may be configued with CONNECTION_PROPERTY_WALLET_LOCATION
,
CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE
.
If an Oracle Net Descriptor style URL includes the OCI_IAM_URL parameter, then the value of that parameter takes precedence over a value defined by this property.
static final String CONNECTION_PROPERTY_OCI_IAM_URL_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_IAM_URL_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_TENANCY
When CONNECTION_PROPERTY_PASSWORD_AUTHENTICATION
is set to
"OCI_TOKEN", this property must specify the Oracle Cloud ID (OCID) of
the cloud tenant for the user that Oracle JDBC authenticates as.
If an Oracle Net Descriptor style URL includes the OCI_TENANCY parameter, then the value of that parameter takes precedence over a value defined by this property.
static final String CONNECTION_PROPERTY_OCI_TENANCY_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_TENANCY_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_COMPARTMENT
When CONNECTION_PROPERTY_PASSWORD_AUTHENTICATION
is set to
"OCI_TOKEN", this property specifies the Oracle Cloud ID (OCID) of the
compartment for the database identified by
CONNECTION_PROPERTY_OCI_DATABASE
. If this property is not set,
then Oracle JDBC requests access to all databases within the tenancy
identified by CONNECTION_PROPERTY_OCI_TENANCY
.
If an Oracle Net Descriptor style URL includes the OCI_COMPARTMENT parameter, then the value of that parameter takes precedence over a value defined by this property.
static final String CONNECTION_PROPERTY_OCI_COMPARTMENT_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_COMPARTMENT_ACCESSMODE
static final String CONNECTION_PROPERTY_OCI_DATABASE
When CONNECTION_PROPERTY_PASSWORD_AUTHENTICATION
is set to
"OCI_TOKEN", this property specifies the Oracle Cloud ID (OCID) of
the database that JDBC requests access to. If this property is not set,
then Oracle JDBC requests access to all databases within the compartment
specified by CONNECTION_PROPERTY_OCI_COMPARTMENT
.
If an Oracle Net Descriptor style URL includes the OCI_DATABASE parameter, then the value of that parameter takes precedence over a value defined by this property.
static final String CONNECTION_PROPERTY_OCI_DATABASE_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_DATABASE_ACCESSMODE
static final String CONNECTION_PROPERTY_ACCESS_TOKEN
This property configures an access token that Oracle JDBC uses for authentication with Oracle Database. An access token configured with this property will only be used if neither a user name nor password has been provided when creating a new connection. If a user name or a password is provided, via connection properties, programmatic APIs, or by any other means, then the value of this property is ignored.
If a value is configured for this property, then Oracle JDBC will ignore
any token that is specified by
CONNECTION_PROPERTY_TOKEN_AUTHENTICATION
and
CONNECTION_PROPERTY_TOKEN_LOCATION
.
The value of this property must be a JSON Web Token (JWT). The JWT format is specified by RFC 7519.
The database instance that Oracle JDBC connects to must be configured to validate the token with the service that issued it. The Oracle Database Security Guide specifies how to configure the database for token based authentication.
On systems where access tokens are stored in environment variables, it may be useful to note that an ojdbc.properties file can include expressions that resolve to the value of an environment variable. For example, this line in ojdbc.properties would configure this property as the value of an environment variable named "DATABASE_ACCESS_TOKEN":
oracle.jdbc.accessToken=${DATABASE_ACCESS_TOKEN}
static final String CONNECTION_PROPERTY_ACCESS_TOKEN_DEFAULT
static final byte CONNECTION_PROPERTY_ACCESS_TOKEN_ACCESSMODE
static final String CONNECTION_PROPERTY_ALLOW_ABSOLUTE_JNDI_URLS
This property enables loading absolute JNDI URLs.
For security reasons, the JDBC driver does not allow loading absolute JNDI URLS. This behavior can be overriden by setting this property to true. If this property is set to false, the JDBC driver will throw an error when requested to load a Connection object from a remote URL.
static final String CONNECTION_PROPERTY_ALLOW_ABSOLUTE_JNDI_URLS_DEFAULT
static final byte CONNECTION_PROPERTY_ALLOW_ABSOLUTE_JNDI_URLS_ACCESSMODE
static final String CONNECTION_PROPERTY_PASSWORD
static final String CONNECTION_PROPERTY_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_PASSWORD_ACCESSMODE
static final String CONNECTION_PROPERTY_SERVER
static final String CONNECTION_PROPERTY_SERVER_DEFAULT
static final byte CONNECTION_PROPERTY_SERVER_ACCESSMODE
static final int DATABASE_OK
static final int DATABASE_CLOSED
static final int DATABASE_NOTOK
static final int DATABASE_TIMEOUT
static final int INVALID_CONNECTION
static final int PROXY_SESSION
static final int ABANDONED_CONNECTION_CALLBACK
static final int RELEASE_CONNECTION_CALLBACK
static final int ALL_CONNECTION_CALLBACKS
static final int CONNECTION_RELEASE_LOCKED
static final int CONNECTION_RELEASE_LOW
static final int CONNECTION_RELEASE_HIGH
static final int PROXYTYPE_USER_NAME
static final int PROXYTYPE_DISTINGUISHED_NAME
static final int PROXYTYPE_CERTIFICATE
static final String PROXY_TYPE
static final String PROXY_USER_NAME
static final String PROXY_USER_PASSWORD
static final String PROXY_DISTINGUISHED_NAME
static final String PROXY_CERTIFICATE
static final String PROXY_ROLES
static final String CLIENT_INFO_KEY_SEPARATOR
static final String OCSID_NAMESPACE
static final String OCSID_ACTION_KEY
static final String OCSID_CLIENTID_KEY
static final String OCSID_ECID_KEY
static final String OCSID_MODULE_KEY
static final String OCSID_DBOP_KEY
static final String OCSID_SEQUENCE_NUMBER_KEY
static final String OCSID_CLIENT_INFO_KEY
static final int END_TO_END_ACTION_INDEX
static final int END_TO_END_CLIENTID_INDEX
static final int END_TO_END_ECID_INDEX
static final int END_TO_END_MODULE_INDEX
static final int END_TO_END_STATE_INDEX_MAX
static final String NETWORK_COMPRESSION_OFF
static final String NETWORK_COMPRESSION_ON
static final String NETWORK_COMPRESSION_AUTO
static final String NETWORK_COMPRESSION_LEVEL_LOW
static final int NETWORK_COMPRESSION_LEVEL_LOW_VALUE
static final String NETWORK_COMPRESSION_LEVEL_HIGH
static final int NETWORK_COMPRESSION_LEVEL_HIGH_VALUE
static final int NETWORK_COMPRESSION_THRESHOLD_MIN
Minimum value supported by the connection
property CONNECTION_PROPERTY_NETWORK_COMPRESSION_THRESHOLD
.
The value is in bytes.
static final int CACHE_SIZE_NOT_SET
static final String NTF_TIMEOUT
static final String NTF_QOS_PURGE_ON_NTFN
static final String NTF_QOS_RELIABLE
static final String NTF_QOS_SECURE
static final String NTF_ASYNC_DEQ
static final String NTF_AQ_PAYLOAD
static final String NTF_USE_SSL
static final String NTF_QOS_TX_ACK
static final String NTF_QOS_AUTO_ACK
static final String NTF_LOCAL_TCP_PORT
static final int NTF_DEFAULT_TCP_PORT
static final String NTF_LOCAL_HOST
static final String NTF_GROUPING_CLASS
static final String NTF_GROUPING_CLASS_NONE
static final String NTF_GROUPING_CLASS_TIME
static final String NTF_GROUPING_VALUE
static final String NTF_GROUPING_TYPE
static final String NTF_GROUPING_TYPE_SUMMARY
static final String NTF_GROUPING_TYPE_LAST
static final String NTF_GROUPING_START_TIME
static final String NTF_GROUPING_REPEAT_TIME
static final String NTF_GROUPING_REPEAT_FOREVER
static final String DCN_NOTIFY_ROWIDS
static final String DCN_IGNORE_INSERTOP
static final String DCN_IGNORE_UPDATEOP
static final String DCN_IGNORE_DELETEOP
static final String DCN_NOTIFY_CHANGELAG
static final String DCN_QUERY_CHANGE_NOTIFICATION
static final String DCN_BEST_EFFORT
static final String DCN_CLIENT_INIT_CONNECTION
static final String DCN_USE_HOST_CONNECTION_ADDR_INFO
static final String AQ_USE_HOST_CONNECTION_ADDR_INFO
void commit(EnumSet<OracleConnection.CommitOption> options) throws SQLException
flags
- commit optionsSQLException
void archive(int mode, int aseq, String acstext) throws SQLException
SQLException
void openProxySession(int type, Properties prop) throws SQLException
type
- has to be either OracleConnection.PROXYTYPE_USER_NAME
or OracleConnection.PROXYTYPE_DISTINGUISHED_NAME or
OracleConnection.PROXYTYPE_CERTIFICATEprop
- keys/valuesSQLException
boolean getAutoClose() throws SQLException
SQLException
- should never been raisedsetAutoClose
int getDefaultExecuteBatch()
OraclePreparedStatement.setExecuteBatch
,
setDefaultExecuteBatch
int getDefaultRowPrefetch()
The row-prefetching feature associates an integer row-prefetch setting
with a given statement object. JDBC fetches that number of rows at a time
from the database during the query. That is, JDBC will fetch N rows that
match the query criteria and bring them all back to the client at once,
where N is the prefetch setting. Then, once your next
calls
have run through those N rows, JDBC will go back to fetch the next N rows
that match the criteria.
You can set the number of rows to prefetch for a particular Oracle
statement (any type of statement). You can also reset the default number of
rows that will be prefetched for all statements in your connection with the
setDefaultRowPrefetch
method. Therefore, the row prefetch
value returned by this getDefaultRowPrefetch
entrypoint is
valid for statements for which you have not defined a different row
prefetch value.
The default number of rows to prefetch to the client is 10.
Example where conn
is your connection object:
//Get the default row-prefetch setting for this connection
int defRowPref = ((OracleConnection)conn).getDefaultRowPrefetch();
OracleStatement.setRowPrefetch
,
setDefaultRowPrefetch
Object getDescriptor(String sql_name)
sql_name
- the sql typeputDescriptor
,
oracle.sql.TypeDescriptor
String[] getEndToEndMetrics() throws SQLException
SQLException
- if an error occurssetEndToEndMetrics
,
Connection.getClientInfo(java.lang.String)
,
Connection.getClientInfo()
short getEndToEndECIDSequenceNumber() throws SQLException
SQLException
- if an error occursConnection.getClientInfo(java.lang.String)
,
Connection.getClientInfo()
boolean getIncludeSynonyms()
DatabaseMetaData.getColumns
.
By default and for performance reasons it won't but you can change this with the
setIncludeSynonyms
method.DatabaseMetaData.getColumns
will report
information if a table synonym is passed in, and false otherwisesetIncludeSynonyms
boolean getRestrictGetTables()
DatabaseMetaData.getTables
.
The default behavior is to return information about all synonyms,
including those which do not point to accessible tables or views. But you
can change this with the setRestrictGetTables
method.
DatabaseMetaData.getTables
is restricted, and false otherwisesetRestrictGetTables
Object getJavaObject(String sql_name) throws SQLException
SQLException
boolean getRemarksReporting()
getTables
or
getColumns
of the DatabaseMetaData
interface will
report the REMARKS
column.
By default and for performance reasons it won't (it will return
null
) but you can change this with the
setRemarksReporting
method.
DatabaseMetaData
calls getTables
and getColumns
will report the REMARKS column and false otherwisesetRemarksReporting
String getSQLType(Object obj) throws SQLException
SQLException
int getStmtCacheSize()
short getStructAttrCsId() throws SQLException
SQLException
- if Conversion is nullString getUserName() throws SQLException
Example where conn
is your connection object:
String UserName = ((OracleConnection)conn).getUserName();
SQLException
- if the logical connection is closedString getCurrentSchema() throws SQLException
SQLException
- If there was an error while fetching the resultsboolean getUsingXAFlag()
UsingXA
flag which the driver sets to
true
when using XA to manage distributed transactions. If you
are not using distributed transactions with the XA library, the value of
the UsingXA
flag will be false
.true
when using XA to manage distributed transactions
and false
otherwise.setUsingXAFlag
boolean getXAErrorFlag()
XAError
flag which is used with
distributed transactions.
When using distributed transactions with an XA library, you can ask the
driver to raise exception when doing anything that might require a
transaction. To do so, set the value of the XAError
flag to
true
with the method setXAErrorFlag
.
The default value is false
.
setXAErrorFlag
int pingDatabase() throws SQLException
SQLException
int pingDatabase(int timeOut) throws SQLException
timeOut
- SQLException
void putDescriptor(String sql_name, Object desc) throws SQLException
sql_name
- the sql typedesc
- the Object Descriptor associatedSQLException
- if sql_name or desc is nullgetDescriptor
,
oracle.sql.TypeDescriptor
void registerSQLType(String sql_name, Class<?> java_class) throws SQLException
SQLException
void registerSQLType(String sql_name, String java_class_name) throws SQLException
SQLException
void setAutoClose(boolean autoClose) throws SQLException
autoClose
- the boolean valueSQLException
- when the argument autoClose is falsegetAutoClose
void setDefaultExecuteBatch(int batch) throws SQLException
batch
- value is discarded.SQLException
- never thrown.OraclePreparedStatement.setExecuteBatch
,
getDefaultExecuteBatch
void setDefaultRowPrefetch(int value) throws SQLException
The row-prefetching feature associates an integer row-prefetch setting with
a given statement object. JDBC fetches that number of rows at a time from
the database during the query. That is, JDBC will fetch N rows that match
the query criteria and bring them all back to the client at once, where N
is the prefetch setting. Then, once your next
calls have run
through those N rows, JDBC will go back to fetch the next N rows that match
the criteria.
You can set the number of rows to prefetch for a particular Oracle statement (any type of statement) but this method allows you to reset the default number of rows that will be prefetched for all statements in your connection. The default number of rows to prefetch to the client is 10.
Use the setDefaultRowPrefetch
method to set the default number of
rows to prefetch, passing in an integer that specifies the desired default. If you
want to check the current setting of the default, then use the
getDefaultRowPrefetch
method. This method returns an integer.
Example where conn
is your connection object:
//Set the default row-prefetch setting for this connection to 7
((OracleConnection)conn).setDefaultRowPrefetch(7);
Note 1 : A statement object receives the default row-prefetch setting from the associated connection at the time the statement object is created. Subsequent changes to the connection's default row-prefetch setting have no effect on the statement's row-prefetch setting.
Note 2 : If a column of a result set is of datatype LONG or LONG RAW (that is, the streaming types), JDBC changes the statement's row-prefetch setting to 1, even if you never actually read a value of either of those types.
Note 3 : Do not mix the JDBC 2.0 fetch size API and the Oracle row-prefetching API in your application. You can use one or the other but not both.
value
- the number of rows to prefetchSQLException
- if the argument value is <=0OracleStatement.setRowPrefetch
,
getDefaultRowPrefetch
void setEndToEndMetrics(String[] metrics, short sequenceNumber) throws SQLException
metrics
- String[] containing the metric values.sequenceNumber
- the sequence number for the context idSQLException
- if an error occursgetEndToEndMetrics
,
Connection.setClientInfo(java.util.Properties)
,
Connection.setClientInfo(java.lang.String, java.lang.String)
void setIncludeSynonyms(boolean synonyms)
Similar to setRemarksReporting
, getColumns
performs extremely slow if information about synonyms has to be included,
because it neccessitates an outer join so, by default, the JDBC driver will
not report information about synonyms.
You can get synonym information by passing true to this method, and turn it off by passing false. You can also control this behavior by passing a property named "includeSynonyms" as "true" to DriverManager.getConnection.
synonyms
- true if you want to retrieve synonym information
in DatabaseMetaData.getColumns and false otherwise.getIncludeSynonyms
void setRemarksReporting(boolean reportRemarks)
getTables
and getColumns
calls of the
DatabaseMetaData
interface.
The DatabaseMetaData
calls getTables
and getColumns
are extremely slow if the REMARKS column has to be reported as this
necessitates an expensive outer join so by default the JDBC driver does not report
the REMARKS columns.
You can turn the reporting of REMARKS on by passing a true
argument
to this method. You turn it back off by passing a false
argument.
Example where conn
is your connection object:
((OracleConnection)conn).setRemarksReporting(true);
You can also control the reporting of REMARKS by passing a property
named remarksReporting
as true
to the
DriverManager.getConnection
call.
reportRemarks
- true if you want to turn on the reporting of
the REMARKS columns and false otherwise.getRemarksReporting
void setRestrictGetTables(boolean restrict)
DatabaseMetaData.getTables.
DatabaseMetaData.getTables
will return information about
all accessible tables, views, and synonyms. There are two issues relating
to synonyms which can affect the quality of the returned data:
getTables
can return rows
containing objects that are not describable with getColumns
,
either because they are not accessible (issue 1) or because they are not
tables or views (issue 2).
To remedy this, you can restrict the results of getTables
to only those tables and views to which you have access. This is done by
either passing true
to this method, or by passing the
restrictGetTables
property as true
to the
DriverManager.getConnection
call. The default behavior is to
return information about all synonyms, including those which do not point
to accessible tables or views.
Note that getTables
can return more than one row for the
same object, one for the object itself, and additional rows for any
synonyms defined for that object. This is the case regardless of the
setting for restrictGetTables.
The following code turns on the restriction:
((OracleConnection)conn).setRestrictGetTables(true);
restrict
- true to turn on the restriction and false
otherwise.getRestrictGetTables
void setStmtCacheSize(int size) throws SQLException
SQLException
void setStmtCacheSize(int size, boolean clearMetaData) throws SQLException
SQLException
void setStatementCacheSize(int size) throws SQLException
size
- Requested size of the cache. If the existing cache size
is less than size, statements will be purged to reduce the
size.SQLException
- if size < 0, or if called on a logical connection.int getStatementCacheSize() throws SQLException
SQLException
void setImplicitCachingEnabled(boolean cache) throws SQLException
cache
- If true, then implicit caching will be enabled. If false,
then any existing statements will be purged and the implicit
cache will be disabled.SQLException
- if called on a logical connection.boolean getImplicitCachingEnabled() throws SQLException
SQLException
void setExplicitCachingEnabled(boolean cache) throws SQLException
cache
- If true, then explicit caching will be enabled. If false,
then any existing statements will be purged and the explicit
cache will be disabled.SQLException
- if called on a logical connection.boolean getExplicitCachingEnabled() throws SQLException
SQLException
void purgeImplicitCache() throws SQLException
SQLException
void purgeExplicitCache() throws SQLException
SQLException
PreparedStatement getStatementWithKey(String key) throws SQLException
key
- Specified key to search forSQLException
CallableStatement getCallWithKey(String key) throws SQLException
key
- Specified key to search forSQLException
void setUsingXAFlag(boolean value)
UsingXA
flag.
XA is a general standard (not specific to Java) for distributed transactions. You should use this method only when using XA.
By default, when using distributed transactions with XA, the driver will
set the UsingXA
flag to true
and exceptions will
be raised when you want to do anything with your logical connection that
might require a transaction. Otherwise the flag UsingXA
is
always false
.
If you are actually using distributed transactions with XA and you dislike the
default behavior, you can set the flag back to false
.
value
- the value of the UsingXA
flaggetUsingXAFlag
void setXAErrorFlag(boolean value)
XAError
flag which is used with
distributed transactions. When coexisting with an XA library, you can set
the XAError
flag to true
and the driver will then
raise an exception when doing anything that might require a transaction.value
- the value of the XAError
flaggetXAErrorFlag
void shutdown(OracleConnection.DatabaseShutdownMode mode) throws SQLException
mode
- can be either OracleConnection.DatabaseShutdownMode.CONNECT
OracleConnection.DatabaseShutdownMode.TRANSACTIONAL
OracleConnection.DatabaseShutdownMode.TRANSACTIONAL_LOCAL
OracleConnection.DatabaseShutdownMode.IMMEDIATE
OracleConnection.DatabaseShutdownMode.ABORT
OracleConnection.DatabaseShutdownMode.FINAL
SQLException
void startup(String startup_str, int mode) throws SQLException
SQLException
void startup(OracleConnection.DatabaseStartupMode mode) throws SQLException
mode
- can be either OracleConnection.DatabaseStartupMode.NO_RESTRICTION
OracleConnection.DatabaseStartupMode.FORCE
OracleConnection.DatabaseStartupMode.RESTRICT
SQLException
void startup(OracleConnection.DatabaseStartupMode mode, String pfileName) throws SQLException
mode
- can be either OracleConnection.DatabaseStartupMode.NO_RESTRICTION
OracleConnection.DatabaseStartupMode.FORCE
OracleConnection.DatabaseStartupMode.RESTRICT
pfileName:
- PFILE name. If client-side parameter file is null or doesn't exist,
it will throw exception otherwise read the file and pass parameters to server.SQLException
PreparedStatement prepareStatementWithKey(String key) throws SQLException
key
- the key with which it was closedSQLException
- if a database access error occursCallableStatement prepareCallWithKey(String key) throws SQLException
key
- the key with which it was closedSQLException
- if a database access error occursvoid setCreateStatementAsRefCursor(boolean value)
true
, any new statements created from this
connection will be created as a REF CURSOR
. Only resultsets
obtained from statements that are created as REF CURSORS
can
be returned from a Java Stored Procedure. This feature is supported by the
server-side internal driver only, and is no-op in all other JDBC drivers.
Default value is false
.
To use the setCreateStatementAsRefCursor
entrypoint you
have to cast the Connection object to the type
oracle.jdbc.OracleConnection
.
value
- true
if new statements should be created as
REF CURSORS
, false
otherwisegetCreateStatementAsRefCursor
boolean getCreateStatementAsRefCursor()
createStatementAsRefCursor
flag which you can set with the
setCreateStatementAsRefCursor
method.
To use the getCreateStatementAsRefCursor
entrypoint you
have to cast the Connection object to the type
oracle.jdbc.OracleConnection
.
setCreateStatementAsRefCursor
void setSessionTimeZone(String regionName) throws SQLException
This method is used to set the session time zone. This method must be invoked before accessing any TIMESTAMP WITH LOCAL TIME ZONE data. Upon invocation of this method, the Jdbc driver sets the session timezone of the connection and saves the session timezone so that any TSLTZ data accessed via Jdbc are adjusted using the session timezone.
regionName
- Oracle session time zone region name.SQLException
- if an error occurred.String getSessionTimeZone()
String getSessionTimeZoneOffset() throws SQLException
"ALTER SESSION SET TIME_ZONE ..."
and then call this
method, it will return the new value.
The value returned by this method is that same as the result
of "SELECT SESSIONTIMEZONE FROM DUAL;"
. The drivers
may use some performance optimization to not use a roundtrip to the
server so it is always preferrable to use this method.
SQLException
Properties getProperties()
Connection _getPC()
boolean isLogicalConnection()
void registerTAFCallback(OracleOCIFailover cbk, Object obj) throws SQLException
cbk
- Callback instance.obj
- Context object in which any client's state can be
stored and provided when the callback method is
invoked.SQLException
- if this method is invoked in drivers other than
the Jdbc OCI driver.OracleConnection unwrap()
void setWrapper(OracleConnection wrapper)
wrapper
- An object which implements oracle.jdbc.OracleConnection and
which is a wrapper for this object
# @since 9iR2OracleSavepoint oracleSetSavepoint() throws SQLException
OracleSavepoint
object that
represents it.OracleSavepoint
objectSQLException
- if a database access error occurs
or this Connection
object is currently in
auto-commit modeOracleSavepoint
OracleSavepoint oracleSetSavepoint(String name) throws SQLException
OracleSavepoint
object that
represents it.name
- a String
containing the name of the savepointOracleSavepoint
objectSQLException
- if a database access error occurs
or this Connection
object is currently in
auto-commit modeOracleSavepoint
void oracleRollback(OracleSavepoint savepoint) throws SQLException
OracleSavepoint
object was set.
This method should be used only when auto-commit has been disabled.
savepoint
- the OracleSavepoint
object to roll back toSQLException
- if a database access error occurs,
the OracleSavepoint
object is no longer valid,
or this Connection
object is currently in
auto-commit modeOracleSavepoint
void oracleReleaseSavepoint(OracleSavepoint savepoint) throws SQLException
OracleSavepoint
object from the current
transaction. Any reference to the savepoint after it have been removed
will cause an SQLException
to be thrown.savepoint
- the OracleSavepoint
object to be removedSQLException
- if a database access error occurs or
the given OracleSavepoint
object is not a valid
savepoint in the current transactionOracleSavepoint
@Deprecated default void close(Properties connAttr) throws SQLException
SQLException
void close(int opt) throws SQLException
opt
- set to INVALID_CONNECTION to close the PooledConnectionSQLException
- if a database access error occursboolean isProxySession()
@Deprecated default void applyConnectionAttributes(Properties connAttr) throws SQLException
SQLException
@Deprecated default Properties getConnectionAttributes() throws SQLException
SQLException
@Deprecated default Properties getUnMatchedConnectionAttributes() throws SQLException
SQLException
@Deprecated default void registerConnectionCacheCallback(OracleConnectionCacheCallback occc, Object userObj, int cbkFlag) throws SQLException
SQLException
@Deprecated default void setConnectionReleasePriority(int priority) throws SQLException
SQLException
@Deprecated default int getConnectionReleasePriority() throws SQLException
SQLException
void setPlsqlWarnings(String setting) throws SQLException
setting
- Setting specified for ALTER SESSION SET PLSQL_WARNINGS.
Sample values are: "'ENABLE:ALL'", "'DISABLE:ALL'",
"'ENALBLE:INFORMATIONAL'", etc. Please refer to the SQL
reference of ALTER SESSION SET PLSQL_WARNINGS for
more information. If the setting is "'DISABLE:ALL'",
jdbc drivers turn off PLSQL Compiler Warnings.
Note: the quotes(') in the setting String are necessary.SQLException
- if a database access error occursAQNotificationRegistration[] registerAQNotification(String[] name, Properties[] options, Properties globaloptions) throws SQLException
This method creates an array of new AQ registrations in the database server with the given options. It also opens a listening socket which will be used by the database to send notifications. Note that mutiple registrations can share the same listening socket.
Each registration will continue to live after this connection is closed. You need to explicitly unregister it to destroy it in the server and release the resources in the driver.
This method uses one roundtrip.
name
- contains an array of queue names ("SCOTT.MY_QUEUE") for single consumer
queues or queue names with the consumer name ("SCOTT.MY_QUEUE:RECEIVER")
for multiple consumer queues.options
- Possible options are ([] means default):OracleConnection.NTF_QOS_RELIABLE
: "true"/["false"]. Set this option
to "true" to make the notifications persistent which comes at a performance
cost.OracleConnection.NTF_QOS_PURGE_ON_NTFN
: "true"/["false"]. Set this
option to "true" and the registration will be expunged on the first
notification event.OracleConnection.NTF_TIMEOUT
: value in seconds "60"/["0"]. Specifies
the time in seconds after which the registration is automatically
expunged by the database. The default is "0": the registration lives
until explicitly deregistered.OracleConnection.NTF_AQ_PAYLOAD
: "true"/["false"]. Sets this to "true"
to make the server send the payload within the notification. Note that
this feature works only with "RAW" payloads.OracleConnection.NTF_GROUPING_CLASS
:
OracleConnection.NTF_GROUPING_CLASS_TIME
/[OracleConnection.NTF_GROUPING_CLASS_NONE
].
Notification Grouping Class, the criterion
or dimension for grouping. As of 11.2 the only supported class is
OracleConnection.NTF_GROUPING_CLASS_TIME
meaning grouping by time, that is,
the user specifies a time value and a single notification gets published at the end of
that time. To use grouping at least this option must be specified to a value other than
the default OracleConnection.NTF_GROUPING_CLASS_NONE
, which is no grouping.OracleConnection.NTF_GROUPING_VALUE
: "1200/["600"]. Notification Grouping
Value, the value of the grouping class. The value must be an integer number. For the TIME
grouping class, this value represents a number of seconds, meaning the time after which
grouped notifications are sent. If not specified, it defaults to 600 sec.OracleConnection.NTF_GROUPING_TYPE
:
OracleConnection.NTF_GROUPING_TYPE_LAST
/[OracleConnection.NTF_GROUPING_TYPE_SUMMARY
].
Notification Grouping Type, the format of grouping notification. It can either contain
the summary of all events (default) or the last event in the group.OracleConnection.NTF_GROUPING_START_TIME
: When to start grouping?
Notification grouping can start from a user-specified time that should a valid
timestamp with time zone, that is an instance of oracle.sql.TIMESTAMPTZ
.
If this option is not specified when using grouping, it defaults to current system time.
For example if prop
was the option properties, and conn
the
connection object, you would call:
prop.put(OracleConnection.NTF_GROUPING_START_TIME,new TIMESTAMPTZ(conn,"2007-06-21 10:10:00.0"));
.OracleConnection.NTF_GROUPING_REPEAT_TIME
: "100/[NTF_GROUPING_REPEAT_FOREVER
]".
How many times do grouping?
Grouping notifications will be sent as many times as specified by the notification
grouping repeat count and after that revert to regular notifications. If not specified,
it will default to: NTF_GROUPING_REPEAT_FOREVER
- keep sending grouping notifications forever.globaloptions
- Possible options are ([] means default):OracleConnection.NTF_LOCAL_TCP_PORT
: "1234"/[NTF_DEFAULT_TCP_PORT].
This option lets you specify what TCP port the driver should use for the
listening socket. If you don't specify a port, the driver will use
NTF_DEFAULT_TCP_PORT and if it's already used, it will increment it by one
until it finds one that is available.OracleConnection.NTF_LOCAL_HOST
: example "212.121.134.12". Use this
option to manually specify the IP address of the machine that will
receive the notifications from the server. Use this option with caution:
only specify the IP address of the local machine when the driver is unable
to find it out on its own (it uses InetAddress.getLocalHost()
). For example if the machine on which runs the JDBC
driver is a VPN client, you may have to specify the IP address of the
VPN client which the driver cannot find out on its own. This option
should not be used to attempt to have a different remote host receive
the notifications from the server.
SQLException
void unregisterAQNotification(AQNotificationRegistration registration) throws SQLException
registration
- SQLException
AQMessage dequeue(String queueName, AQDequeueOptions opt, byte[] tdo) throws SQLException
queueName
- name of the queue from which to dequeue.opt
- dequeue optionstdo
- the Type Descriptor Object OID of the type of the queue.SQLException
AQMessage dequeue(String queueName, AQDequeueOptions opt, byte[] tdo, int version) throws SQLException
queueName
- name of the queue from which to dequeue.opt
- dequeue optionstdo
- the Type Descriptor Object OID of the type of the queue.version
- the version of the type DescriptorSQLException
AQMessage dequeue(String queueName, AQDequeueOptions opt, String typeName) throws SQLException
queueName
- name of the queue from which to dequeue.opt
- dequeue options.typeName
- the name of the type of the queue. For example,
it can be "RAW", "SYS.ANYDATA" or "SCOTT.MY_OBJECT_TYPE".SQLException
void enqueue(String queueName, AQEnqueueOptions opt, AQMessage mesg) throws SQLException
queueName
- name of the queue where to enqueue.opt
- enqueue options.mesg
- the AQ message to enqueue.SQLException
int enqueue(String queueName, AQEnqueueOptions opt, AQMessage[] mesgs) throws SQLException
queueName
- name of the queue where to enqueue.opt
- enqueue options.mesgs
- the array of AQ messages to enqueue.SQLException
AQMessage[] dequeue(String queueName, AQDequeueOptions opt, String typeName, int deqsize) throws SQLException
queueName
- name of the queue from which to dequeue.opt
- dequeue options.typeName
- the name of the type of the queue. For example,
it can be "RAW", "SYS.ANYDATA" or "SCOTT.MY_OBJECT_TYPE".deqsize
- dequeue number of messagesSQLException
AQMessage[] dequeue(String queueName, AQDequeueOptions opt, byte[] tdo, int version, int deqsize) throws SQLException
queueName
- name of the queue from which to dequeue.opt
- dequeue optionstdo
- the Type Descriptor Object OID of the type of the queue.version
- the version of the type Descriptordeqsize
- dequeue number of messagesSQLException
DatabaseChangeRegistration registerDatabaseChangeNotification(Properties options) throws SQLException
This method creates a new database change registration in the database server with the given options. It also opens a listening socket which will be used by the database to send notifications. Note that if there already is a listening socket (created by a different registration), then it will be used by this registration as well.
This method returns a DatabaseChangeRegistration object that can then be used to associate a statement with this registration.
The registration will continue to live after this connection is closed. You need to explicitly unregister it to destroy it in the server and release the resources in the driver.
This method uses one roundtrip.
options
- Possible options are ([] means default):OracleConnection.NTF_QOS_RELIABLE
: "true"/["false"]. Set this option
to "true" to make the notifications persistent which comes at a performance
cost.OracleConnection.NTF_QOS_PURGE_ON_NTFN
: "true"/["false"]. Set this
option to "true" and the registration will be expunged on the first
notification event.OracleConnection.NTF_TIMEOUT
: value in seconds "60"/["0"]. Specifies
the time in seconds after which the registration is automatically
expunged by the database. The default is "0": the registration lives
until explicitly deregistered.OracleConnection.NTF_LOCAL_TCP_PORT
: "1234"/[NTF_DEFAULT_TCP_PORT].
This option lets you specify what TCP port the driver should use for the
listening socket. If you don't specify a port, the driver will use
NTF_DEFAULT_TCP_PORT and if it's already used, it will increment it by one
until it finds one that is available.OracleConnection.NTF_LOCAL_HOST
: example "212.121.134.12". Use this
option to manually specify the IP address of the machine that will
receive the notifications from the server. Use this option with caution:
only specify the IP address of the local machine when the driver is unable
to find it out on its own (it uses InetAddress.getLocalHost()
). For example if the machine on which runs the JDBC
driver is a VPN client, you may have to specify the IP address of the
VPN client which the driver cannot find out on its own. This option
should not be used to attempt to have a different remote host receive
the notifications from the server.OracleConnection.DCN_NOTIFY_ROWIDS
: "true"/["false"]. Use this option
to have the server send the ROWIDs of the row that have changed within the
notification event. By default this feature is turned off.OracleConnection.DCN_IGNORE_INSERTOP
: "true"/["false"]. Use this
option to tell the server to ignore INSERT operations.OracleConnection.DCN_IGNORE_UPDATEOP
: "true"/["false"]. Use this
options to tell the server to ignore UPDATE operations.OracleConnection.DCN_IGNORE_DELETEOP
: "true"/["false"]. Use this
options to tell the server to ignore DELETE operations.OracleConnection.DCN_NOTIFY_CHANGELAG
: "30"/["0"]. This is
an int value (specified as a String), that can be used to specify
the number of transactions by which the client is willing to lag behind.
This option can be used by the client as a throttling mechanism for
database change events. When this option is chosen, ROWID level granularity
of information will not be available in the events, even if the
DCN_NOTIFY_ROWIDS option was set to "true". OracleConnection.DCN_QUERY_CHANGE_NOTIFICATION
: "true"/["false"]. Use
this option to activate query change notification instead of object
change notification. Note that this option is only available in the database
server starting in 11.1.OracleConnection.DCN_BEST_EFFORT
: "true"/["false"]. If a query has been
successfully registered, by default there will be no FALSE positives. If this
option is selected during registrations, then registrations on complex
queries may still be allowed but notifications may have some FALSE positives,
because full pruning may not be performed if determined to be too expensive.
In the worst case notifications will be generated in response to any DML/DDL
changes to underlying objects. Note that this option is ignored if the
DCN_QUERY_CHANGE_NOTIFICATION
isn't turned on. As
DCN_QUERY_CHANGE_NOTIFICATION
, this option is only available
in the database server starting in 11.1.OracleConnection.NTF_GROUPING_CLASS
:
OracleConnection.NTF_GROUPING_CLASS_TIME
/[OracleConnection.NTF_GROUPING_CLASS_NONE
].
Notification Grouping Class, the criterion
or dimension for grouping. The only supported class is
OracleConnection.NTF_GROUPING_CLASS_TIME
meaning grouping by time, that is,
the user specifies a time value and a single notification gets published at the end of
that time. To use grouping at least this option must be specified to a value other than
the default OracleConnection.NTF_GROUPING_CLASS_NONE
, which is no grouping.OracleConnection.NTF_GROUPING_VALUE
: "1200/["600"]. Notification Grouping
Value, the value of the grouping class. The value must be an integer number. For the TIME
grouping class, this value represents a number of seconds, meaning the time after which
grouped notifications are sent. If not specified, it defaults to 600 sec.OracleConnection.NTF_GROUPING_TYPE
:
OracleConnection.NTF_GROUPING_TYPE_LAST
/[OracleConnection.NTF_GROUPING_TYPE_SUMMARY
].
Notification Grouping Type, the format of grouping notification. It can either contain
the summary of all events (default) or the last event in the group.OracleConnection.NTF_GROUPING_START_TIME
: When to start grouping?
Notification grouping can start from a user-specified time that should a valid
timestamp with time zone, that is an instance of oracle.sql.TIMESTAMPTZ
.
If this option is not specified when using grouping, it defaults to current system time.
For example if prop
was the option properties, and conn
the
connection object, you would call:
prop.put(OracleConnection.NTF_GROUPING_START_TIME,new TIMESTAMPTZ(conn,"2007-06-21 10:10:00.0"));
.OracleConnection.NTF_GROUPING_REPEAT_TIME
: "100"/[NTF_GROUPING_REPEAT_FOREVER
].
How many times do grouping?
Grouping notifications will be sent as many times as specified by the notification
grouping repeat count and after that revert to regular notifications. If not specified,
it will default to: NTF_GROUPING_REPEAT_FOREVER
- keep sending grouping notifications forever.OracleConnection.DCN_CLIENT_INIT_CONNECTION
: "true"/["false"].
This can be configured to initiate a connection from the client instead of
opening a listener socket for receiving the database change notifications.
Set the value to 'true' for using the Client initiated DCN connection.
By default the value is 'false' and opens a listening socket for receiving
notifications from the server.OracleConnection.DCN_USE_HOST_CONNECTION_ADDR_INFO
: ["true"]/"false".
Set the value to 'false' to use the address info returned by the server
for establishing the client initiated DCN Connection. Default value is 'true'
and the database hostname and port information present in this database connection's
connection string is used for establishing the client initiated DCN connection.SQLException
DatabaseChangeRegistration getDatabaseChangeRegistration(int regid) throws SQLException
This method can be used if you create a registration through PLSQL and you want to associate a JDBC statement with it.
This method doesn't create a new listener on the JDBC driver side and DatabaseChangeEvent won't be created. Thus you won't be allowed to attach any listeners to this registration.
Note that this method doesn't generate any roundtrip to the database.
regid
- The id of the registrationSQLException
void unregisterDatabaseChangeNotification(DatabaseChangeRegistration registration) throws SQLException
This method interrupts the notification thread and removes all listeners attached to this registration before closing it.
registration
- SQLException
unregisterDatabaseChangeNotification(long,String)
void unregisterDatabaseChangeNotification(int registrationId, String host, int tcpport) throws SQLException
This method will throw an "ORA-24950: unregister failed, registration not found" if you don't provide the correct TCP port which can be extracted from the "callback" value in the "USER_CHANGE_NOTIFICATION_REGS" table.
SQLException
unregisterDatabaseChangeNotification(long,String)
void unregisterDatabaseChangeNotification(int registrationId) throws SQLException
SQLException
unregisterDatabaseChangeNotification(long, String)
void unregisterDatabaseChangeNotification(long registrationId, String callback) throws SQLException
This flavor of unregisterDatabaseChangeNotification
can be used to
process the result of the following query:
select regid,callback from USER_CHANGE_NOTIFICATION_REGS;
.
For example to remove all registrations from the database you would execute the following code:
Statement stmt= conn.createStatement(); ResultSet rs = stmt.executeQuery("select regid,callback from USER_CHANGE_NOTIFICATION_REGS"); while(rs.next()) { long regid = rs.getLong(1); String callback = rs.getString(2); ((OracleConnection)conn).unregisterDatabaseChangeNotification(regid,callback); } rs.close(); stmt.close();
ARRAY createARRAY(String typeName, Object elements) throws SQLException
typeName
- the name of the SQL type of the created objectelements
- the elements of the created objectSQLException
- if a database error occursArray createOracleArray(String arrayTypeName, Object elements) throws SQLException
arrayTypeName
- the name of the SQL type of the created objectelements
- the elements of the created objectSQLException
- if a database error occursBINARY_DOUBLE createBINARY_DOUBLE(double value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursBINARY_FLOAT createBINARY_FLOAT(float value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursDATE createDATE(Date value) throws SQLException
value
- the value that the new object should repreesntSQLException
- if a database error occursDATE createDATE(Time value) throws SQLException
value
- the value that the new object should repreesntSQLException
- if a database error occursDATE createDATE(Timestamp value) throws SQLException
value
- the value that the new object should repreesntSQLException
- if a database error occursDATE createDATE(Date value, Calendar cal) throws SQLException
value
- the value that the new object should repreesntcal
- the timezone in which the value is interpretedSQLException
- if a database error occursDATE createDATE(Time value, Calendar cal) throws SQLException
value
- the value that the new object should repreesntcal
- the timezone in which the value is interpretedSQLException
- if a database error occursDATE createDATE(Timestamp value, Calendar cal) throws SQLException
value
- the value that the new object should repreesntcal
- the timezone in which the value is interpretedSQLException
- if a database error occursDATE createDATE(String value) throws SQLException
value
- the value that the new object should repreesntSQLException
- if a database error occursINTERVALDS createINTERVALDS(String value) throws SQLException
value
- the value that the new object shoud representSQLException
- if a database error occursINTERVALYM createINTERVALYM(String value) throws SQLException
value
- the value that the new object shoud representSQLException
- if a database error occursNUMBER createNUMBER(boolean value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(byte value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(short value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(int value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(long value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(float value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(double value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(BigDecimal value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(BigInteger value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursNUMBER createNUMBER(String value, int scale) throws SQLException
value
- the value that the new object should representscale
- the scale of the new objectSQLException
- if a database error occursTIMESTAMP createTIMESTAMP(Date value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMP createTIMESTAMP(DATE value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMP createTIMESTAMP(Time value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMP createTIMESTAMP(Timestamp value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMP createTIMESTAMP(Timestamp value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMP createTIMESTAMP(String value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(Date value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(Date value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(Time value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(Time value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(Timestamp value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(Timestamp value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(Timestamp value, java.time.ZoneId tzid) throws SQLException
value
- the value that the new object should representtzid
- the ZoneId of the valueSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(String value) throws SQLException
value
- the value that the new object should representSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(String value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(DATE value) throws SQLException
SQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(Date value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(Time value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(Timestamp value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(String value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(DATE value, Calendar cal) throws SQLException
value
- the value that the new object should representcal
- the timezone of the valueSQLException
- if a database error occursvoid cancel() throws SQLException
For example, in the context of AQ, it can be used to cancel a 'dequeue' call that is waiting for a new message to be enqueued.
SQLException
- if the cancel operation failsvoid abort() throws SQLException
SQLException
- -- Io Exception: Socket closed - ORA-17002
TNS:not connected - ORA-12153SecurityException
- if the caller does not have the necessary
permissionTypeDescriptor[] getAllTypeDescriptorsInCurrentSchema() throws SQLException
SQLException
- If an error occurs.Properties getServerSessionInfo() throws SQLException
oracle.jdbc.driver.T4CTTIoauthenticate
,
many of the values are received from that TTC call.Properties
objectSQLException
default String getServerSessionInfo(String key) throws SQLException
key
that the server returns
at connection time. See oracle.jdbc.driver.T4CTTIoauthenticate
,
many of the values are received from that TTC call.key
- Key to look upkey
, or null
if there is
no association.SQLException
TypeDescriptor[] getTypeDescriptorsFromListInCurrentSchema(String[] typeNames) throws SQLException
An
- array of Strings which are type names. Use upper case
unless the type names are mixed case names.SQLException
- if the specified type does not exist, or if an error
occurred.TypeDescriptor[] getTypeDescriptorsFromList(String[][] schemaAndTypeNamePairs) throws SQLException
An
- array of arrays of Strings which are pairs of schema
and type names.SQLException
- if any of the specified types does not exist, or if an error
occurs.String getDataIntegrityAlgorithmName() throws SQLException
SQLException
String getEncryptionAlgorithmName() throws SQLException
SQLException
String getAuthenticationAdaptorName() throws SQLException
SQLException
boolean isUsable()
void setDefaultTimeZone(TimeZone tz) throws SQLException
Default
- TimeZone to be used for all Date, Time and Timestamp
conversions.SQLException
- if there is an issue while setting the TimeZoneTimeZone getDefaultTimeZone() throws SQLException
SQLException
- If there is any issue while retrieving the TimeZonevoid setApplicationContext(String nameSpace, String attribute, String value) throws SQLException
nameSpace
- The namespace where this attribute/value pairs
will be stored. The only supported namespace is CLIENTCONTEXT.
The value cannot be null nor empty.attribute
- The attribute whose value needs to be set. If
the value is null then a NullPointerException is thrown. If the
value is an empty string (""), then the namespace will be cleared
and the value is ignored.value
- The value of the attribute. If the value is null then
a NullPointerException is thrown. If the
value is an empty string (""), then the attribute will be cleared.SQLException
- If an error occursclearAllApplicationContext
,
Connection.setClientInfo(java.lang.String, java.lang.String)
,
Connection.setClientInfo(java.util.Properties)
void clearAllApplicationContext(String nameSpace) throws SQLException
nameSpace
- The namespace which will be clearedSQLException
setApplicationContext
,
Connection.setClientInfo(java.util.Properties)
void addLogicalTransactionIdEventListener(LogicalTransactionIdEventListener listener) throws SQLException
LogicalTransactionIdEventListener
interface. A listener instance must then be registered using this method.SQLException
void addLogicalTransactionIdEventListener(LogicalTransactionIdEventListener listener, Executor executor) throws SQLException
addLogicalTransactionIdEventListener
can be used to register
a listener with an executor. When a Logical Transaction Id event is triggered the driver
will use this executor to call the listener's onLogicalTransactionIdEvent
method. Typically you would call this method if you want onLogicalTransactionIdEvent
to be executed in a separate thread.SQLException
void removeLogicalTransactionIdEventListener(LogicalTransactionIdEventListener listener) throws SQLException
SQLException
LogicalTransactionId getLogicalTransactionId() throws SQLException
SQLException
boolean isDRCPEnabled() throws SQLException
SQLException
- if there is an error while processing the requestattachServerConnection()
,
detachServerConnection(java.lang.String)
,
needToPurgeStatementCache()
boolean isDRCPMultitagEnabled() throws SQLException
SQLException
CONNECTION_PROPERTY_USE_DRCP_MULTIPLE_TAG
String getDRCPReturnTag() throws SQLException
String getDRCPPLSQLCallbackName() throws SQLException
Null
boolean attachServerConnection() throws SQLException
Multiple invocation of this method with tagging will not make multiple roundtrips to the database instead return the status from the previous call.
Invoking this method on a non DRCP connection or invoking this method multiple times in a non-tagging case is a noop and will return true. Invoking this method multiple times in a tagging case will return the tag match status.
needToPurgeStatementCache()
returns true if the
underlying session has changed and if the local statement cache should
be purged.
SQLException
- If there is an exception while obtaining server processisDRCPEnabled()
,
detachServerConnection(java.lang.String)
,
needToPurgeStatementCache()
void detachServerConnection(String tag) throws SQLException
attachServerConnection()
on this connection, the
server will attempt to pair this connection with the server process of
the same tag.
This method makes a one way call to the database for performance reasons. However the call is two way when the connection is participating in a Transaction
tag
- A string value that the connection will be associated in the
the server. null is a valid argument when no tagging
is required. An empty String will be treated the same as null.SQLException
- If there was an exception while releasingisDRCPEnabled()
,
attachServerConnection()
,
needToPurgeStatementCache()
boolean needToPurgeStatementCache() throws SQLException
SQLException
- if there is an exception while performing this
operation.isDRCPEnabled()
,
attachServerConnection()
,
detachServerConnection(java.lang.String)
OracleConnection.DRCPState getDRCPState() throws SQLException
OracleConnection.DRCPState.DETACHED
if the connection is detached. OracleConnection.DRCPState.ATTACHED_IMPLICIT
or OracleConnection.DRCPState.ATTACHED_EXPLICIT
if the connection is attached.SQLException
attachServerConnection()
,
detachServerConnection(java.lang.String)
,
isDRCPEnabled()
void beginRequest() throws SQLException
SQLException
- When called with an open transaction
on this connection.void endRequest() throws SQLException
SQLException
- When called with an open transaction on this
connection.boolean setShardingKeyIfValid(OracleShardingKey shardingKey, OracleShardingKey superShardingKey, int timeout) throws SQLException
shardingKey
- Sharding key to be validated and set against this connectionsuperShardingKey
- Super Sharding key to be validated and set against this connectiontimeout
- Time in seconds before which the validation process is expected to
be complete, else the validation process is aborted.
The value of the timeout must be set to zero to disable the timeout
during the validation.SQLException
- if there is any exception while performing this validation or if
timeout value is less than 0.void setShardingKey(OracleShardingKey shardingKey, OracleShardingKey superShardingKey) throws SQLException
shardingKey
- Sharding key to be set on this connectionsuperShardingKey
- Super Sharding key to be set on this connectionSQLException
- if there is an exception while setting the sharding keys on this
connection.boolean setShardingKeyIfValid(OracleShardingKey shardingKey, int timeout) throws SQLException
shardingKey
- Sharding key to be validated and set against this connectiontimeout
- Time in seconds before which the validation process is expected to
be complete, else the validation process is aborted.
The value of the timeout must be set to zero to disable the timeout
during the validation.SQLException
- if there is any exception while performing this validation or if
timeout value is less than 0.void setShardingKey(OracleShardingKey shardingKey) throws SQLException
shardingKey
- Sharding key to be set on this connectionSQLException
- if there is an exception while setting the sharding keys on this
connection.boolean isValid(OracleConnection.ConnectionValidation effort, int timeout) throws SQLException
effort
at the instant during this call it was checked.
It does not imply it is still working after the call returns, only it
worked at some point during the call. Returns false if the connection is
not working properly at the instant during the call when it is checked or
if the timeout is exceeded while checking.timeout
- The time in seconds to wait for the validation action to complete.
If the timeout expires before the action completes the method
returns false. A value of 0 mean no limit.effort
- How much effort to expend checking the connection.SQLException
- if timeout < 0String getEncryptionProviderName() throws SQLException
null
.SQLException
CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL
String getChecksumProviderName() throws SQLException
null
.SQLException
CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL
String getNetConnectionId() throws SQLException
SQLException
CONNECTION_PROPERTY_THIN_NET_CONNECTIONID_PREFIX
void disableLogging() throws SQLException
SQLException
void enableLogging() throws SQLException
SQLException
void dumpLog() throws SQLException
SQLException
oracle.jdbc.diagnostics.SecuredLogger getLogger() throws SQLException
SQLException