|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OracleConnection
This interface defines the Oracle extensions to the standard JDBC interface
java.sql.Connection
. You can use
java.sql.Connection
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.
Here 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 this statement; it follows standard JDBC syntax.
Nested Class Summary | |
---|---|
static class |
OracleConnection.CommitOption
|
static class |
OracleConnection.DatabaseShutdownMode
|
static class |
OracleConnection.DatabaseStartupMode
|
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Method Summary | |
---|---|
java.sql.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 |
applyConnectionAttributes(java.util.Properties connAttr)
Applies the connection Attributes provided on the underlying PooledConnection. |
void |
archive(int mode,
int aseq,
java.lang.String acstext)
Deprecated. This method will be removed in a future version. |
void |
cancel()
Performs an immediate (asynchronous) termination of any currently executing operation on this connection. |
void |
clearAllApplicationContext(java.lang.String nameSpace)
Clear all the attribute/value information in a namespace. |
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. |
void |
close(java.util.Properties connAttr)
Closes the given Logical connection, and returns the underlying PooledConnection to the implicit connection cache. |
void |
commit(java.util.EnumSet<OracleConnection.CommitOption> options)
Commits the transaction with the given options. |
ARRAY |
createARRAY(java.lang.String typeName,
java.lang.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(java.sql.Date value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Date value,
java.util.Calendar cal)
Creates a DATE that has the given value. |
DATE |
createDATE(java.lang.String value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Time value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Time value,
java.util.Calendar cal)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Timestamp value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Timestamp value,
java.util.Calendar cal)
Creates a DATE that has the given value. |
INTERVALDS |
createINTERVALDS(java.lang.String value)
Creates an INTERVALDS that has the given value. |
INTERVALYM |
createINTERVALYM(java.lang.String value)
Creates an INTERVALYM that has the given value. |
NUMBER |
createNUMBER(java.math.BigDecimal value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(java.math.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(java.lang.String value,
int scale)
Creates a new NUMBER that has the given value and scale. |
java.sql.Array |
createOracleArray(java.lang.String arrayTypeName,
java.lang.Object elements)
Creates an Array object with the given type name and elements. |
TIMESTAMP |
createTIMESTAMP(java.sql.Date value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(DATE value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(java.lang.String value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(java.sql.Time value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(java.sql.Timestamp value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.sql.Date value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(DATE value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.lang.String value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.sql.Time value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.sql.Timestamp value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Date value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(DATE value)
|
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Date value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.lang.String value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.lang.String value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Time value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Time value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Timestamp value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Timestamp value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
AQMessage |
dequeue(java.lang.String queueName,
AQDequeueOptions opt,
byte[] tdo)
Dequeues an AQ message from the queue specified by its name. |
AQMessage |
dequeue(java.lang.String queueName,
AQDequeueOptions opt,
java.lang.String typeName)
Dequeues an AQ message from the queue specified by its name. |
void |
enqueue(java.lang.String queueName,
AQEnqueueOptions opt,
AQMessage mesg)
Enqueues the given AQ message 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. |
java.lang.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. |
java.sql.CallableStatement |
getCallWithKey(java.lang.String key)
getCallWithKey Searches the explicit cache for a match on key. |
java.util.Properties |
getConnectionAttributes()
Returns the connection Attributes set on the underlying PooledConnection. |
int |
getConnectionReleasePriority()
Returns the release priority set on the connection |
boolean |
getCreateStatementAsRefCursor()
Retrieves the current setting of the createStatementAsRefCursor flag which you can set with the
setCreateStatementAsRefCursor method. |
java.lang.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. |
java.lang.String |
getDataIntegrityAlgorithmName()
Returns the name of the algorithm that is used for data integrity checking by the thin driver on the network. |
int |
getDefaultExecuteBatch()
Retrieves the overall connection batch value of this connection. |
int |
getDefaultRowPrefetch()
Retrieves the value of row prefetch for all statements associated with this connection and created after this value was set. |
java.util.TimeZone |
getDefaultTimeZone()
Returns the TimeZone set through setDefaultTimeZone. |
java.lang.Object |
getDescriptor(java.lang.String sql_name)
Gets a Descriptor object corresponding to a sql type. |
java.lang.String |
getEncryptionAlgorithmName()
Returns the name of the algorithm that is used for data encryption by the thin driver on the network. |
short |
getEndToEndECIDSequenceNumber()
Gets the current end to end tracing context id sequence number. |
java.lang.String[] |
getEndToEndMetrics()
Gets the values of the end-to-end metrics, if any. |
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 . |
java.lang.Object |
getJavaObject(java.lang.String sql_name)
Deprecated. |
java.util.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 . |
java.lang.String |
getSessionTimeZone()
Obtain Oracle session time zone region name. |
java.lang.String |
getSessionTimeZoneOffset()
Obtain the time zone offset in hours of the current database session. |
java.lang.String |
getSQLType(java.lang.Object obj)
Deprecated. |
int |
getStatementCacheSize()
getStatementCacheSize Returns the current size of the application cache. |
java.sql.PreparedStatement |
getStatementWithKey(java.lang.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(java.lang.String[][] schemaAndTypeNamePairs)
Obtain the type descriptors associated with object types or arrays from an array of scheama and type names. |
TypeDescriptor[] |
getTypeDescriptorsFromListInCurrentSchema(java.lang.String[] typeNames)
Obtain the type descriptors associated with object types or array in a schema from an array of type names. |
java.util.Properties |
getUnMatchedConnectionAttributes()
Returns the unmatched connection Attributes from the underlying PooledConnection. |
java.lang.String |
getUserName()
Gets the user name of the current connection. |
boolean |
getUsingXAFlag()
Deprecated. |
boolean |
getXAErrorFlag()
Deprecated. |
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. |
void |
openProxySession(int type,
java.util.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(java.lang.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. |
java.sql.CallableStatement |
prepareCallWithKey(java.lang.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. |
java.sql.PreparedStatement |
prepareStatementWithKey(java.lang.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(java.lang.String sql_name,
java.lang.Object desc)
Store the Object Descriptor for later usage. |
AQNotificationRegistration[] |
registerAQNotification(java.lang.String[] name,
java.util.Properties[] options,
java.util.Properties globaloptions)
Registers your interest into being notified when a message is enqueued in a particular queue (or array of queues). |
void |
registerConnectionCacheCallback(OracleConnectionCacheCallback occc,
java.lang.Object userObj,
int cbkFlag)
Registers the connection cache callback on the logical connection This is used in conjunction with the Implicit Connection Cache Properties. |
DatabaseChangeRegistration |
registerDatabaseChangeNotification(java.util.Properties options)
Creates a new database change registration. |
void |
registerSQLType(java.lang.String sql_name,
java.lang.Class java_class)
Deprecated. |
void |
registerSQLType(java.lang.String sql_name,
java.lang.String java_class_name)
Deprecated. |
void |
registerTAFCallback(OracleOCIFailover cbk,
java.lang.Object obj)
Register an application TAF Callback instance that will be called when an application failover occurs. |
void |
setApplicationContext(java.lang.String nameSpace,
java.lang.String attribute,
java.lang.String value)
Sets a attribute/value pair in a particular namespace in the application context on the server. |
void |
setAutoClose(boolean autoClose)
set auto-close mode. |
void |
setConnectionReleasePriority(int priority)
Sets connection release priority. |
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)
Sets a default batch value for the Oracle update batching model (the default value is 1). |
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(java.util.TimeZone tz)
The TimeZone to be used while creating java.sql.Date, java.sql.Time & java.sql.Timestamp. |
void |
setEndToEndMetrics(java.lang.String[] metrics,
short sequenceNumber)
Sets the values of the end-to-end tracing metrics. |
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(java.lang.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(java.lang.String regionName)
Set the session time zone. |
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(java.lang.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,
java.lang.String host,
int tcpport)
Deprecated. |
void |
unregisterDatabaseChangeNotification(long registrationId,
java.lang.String callback)
Deletes a given database change registration in the server. |
OracleConnection |
unwrap()
Return the wrapped object if any else null. |
Methods inherited from interface java.sql.Connection |
---|
clearWarnings, close, commit, createStatement, createStatement, createStatement, getAutoCommit, getCatalog, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
Field Detail |
---|
static final byte ACCESSMODE_JAVAPROP
static final byte ACCESSMODE_SYSTEMPROP
static final byte ACCESSMODE_BOTH
static final java.lang.String CONNECTION_PROPERTY_RETAIN_V9_BIND_BEHAVIOR
static final java.lang.String CONNECTION_PROPERTY_RETAIN_V9_BIND_BEHAVIOR_DEFAULT
static final byte CONNECTION_PROPERTY_RETAIN_V9_BIND_BEHAVIOR_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_USER_NAME
static final java.lang.String CONNECTION_PROPERTY_USER_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_USER_NAME_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_DATABASE
static final java.lang.String CONNECTION_PROPERTY_DATABASE_DEFAULT
static final byte CONNECTION_PROPERTY_DATABASE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_AUTOCOMMIT
static final java.lang.String CONNECTION_PROPERTY_AUTOCOMMIT_DEFAULT
static final byte CONNECTION_PROPERTY_AUTOCOMMIT_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_PROTOCOL
static final java.lang.String CONNECTION_PROPERTY_PROTOCOL_DEFAULT
static final byte CONNECTION_PROPERTY_PROTOCOL_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_STREAM_CHUNK_SIZE
static final java.lang.String CONNECTION_PROPERTY_STREAM_CHUNK_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_STREAM_CHUNK_SIZE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_SET_FLOAT_AND_DOUBLE_USE_BINARY
static final java.lang.String CONNECTION_PROPERTY_SET_FLOAT_AND_DOUBLE_USE_BINARY_DEFAULT
static final byte CONNECTION_PROPERTY_SET_FLOAT_AND_DOUBLE_USE_BINARY_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_OCIDLL
static final java.lang.String CONNECTION_PROPERTY_OCIDLL_DEFAULT
static final byte CONNECTION_PROPERTY_OCIDLL_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_TERMINAL
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_TERMINAL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_TERMINAL_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_MACHINE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_MACHINE_ACCESSMODE
static final java.lang.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".
New in 11gR1: the OS username is also used for OS authentication. This connection property can be used to specify the OS username in cases where the driver can't retrieve it from the JVM. For example if you create the following user in the database:
> CREATE USER OPS$JDELAVAR IDENTIFIED EXTERNALLY; > GRANT CONNECT,RESOURCE,CREATE SESSION TO OPS$JDELAVAR;Then you will be able to connect as "OPS$JDELAVAR" with the following code:
String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=service)))"; DriverManager.registerDriver(new oracle.jdbc.OracleDriver()); Properties props = new Properties(); props.addProperty(OracleConnection.CONNECTION_PROPERTY_THIN_VSESSION_OSUSER,"jdelavar"); Connection conn = DriverManager.getConnection(url, props);Note that no password was provided because OS authentication is used; in other words, the database server assumes that the client's OS has authenticated the user which is a very naive assumption. Thus and for obvious security reasons, by default, remote OS authentication is disabled in the server. You need to add the following setting in your init.ora file in order to activate it:
REMOTE_OS_AUTHENT = TRUE
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_OSUSER_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_OSUSER_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_PROCESS
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_PROCESS_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_PROCESS_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_INAME
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_INAME_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_INAME_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_ENAME
static final java.lang.String CONNECTION_PROPERTY_THIN_VSESSION_ENAME_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_VSESSION_ENAME_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_PROFILE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_PROFILE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_PROFILE_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES
The supported algorithms are:
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");
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL
See javadoc for CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL.
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL_ACCESSMODE
static final java.lang.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 or SHA1:
prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_CHECKSUM_TYPES, "( MD5, SHA1 )"); prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_CHECKSUM_LEVEL, "REQUIRED");
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_CHECKSUM_TYPES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CHECKSUM_TYPES_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_CRYPTO_SEED
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_CRYPTO_SEED_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CRYPTO_SEED_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_TCP_NO_DELAY
static final java.lang.String CONNECTION_PROPERTY_THIN_TCP_NO_DELAY_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_TCP_NO_DELAY_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_READ_TIMEOUT
static final java.lang.String CONNECTION_PROPERTY_THIN_READ_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_READ_TIMEOUT_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_THIN_NET_USE_ZERO_COPY_IO
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_USE_ZERO_COPY_IO_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_USE_ZERO_COPY_IO_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_ENABLE_SDP
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_ENABLE_SDP_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_ENABLE_SDP_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_USE_1900_AS_YEAR_FOR_TIME
static final java.lang.String CONNECTION_PROPERTY_USE_1900_AS_YEAR_FOR_TIME_DEFAULT
static final byte CONNECTION_PROPERTY_USE_1900_AS_YEAR_FOR_TIME_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_TIMESTAMPTZ_IN_GMT
static final java.lang.String CONNECTION_PROPERTY_TIMESTAMPTZ_IN_GMT_DEFAULT
static final byte CONNECTION_PROPERTY_TIMESTAMPTZ_IN_GMT_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_TIMEZONE_AS_REGION
static final java.lang.String CONNECTION_PROPERTY_TIMEZONE_AS_REGION_DEFAULT
static final byte CONNECTION_PROPERTY_TIMEZONE_AS_REGION_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_SERVER_DN_MATCH
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_SERVER_DN_MATCH_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_SERVER_DN_MATCH_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_VERSION
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_VERSION_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_VERSION_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_CIPHER_SUITES
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_CIPHER_SUITES_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_CIPHER_SUITES_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORETYPE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORETYPE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORETYPE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTOREPASSWORD
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTOREPASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTOREPASSWORD_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORETYPE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORETYPE_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORETYPE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTOREPASSWORD
static final java.lang.String CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTOREPASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTOREPASSWORD_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_KEYMANAGERFACTORY_ALGORITHM
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_KEYMANAGERFACTORY_ALGORITHM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_KEYMANAGERFACTORY_ALGORITHM_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_TRUSTMANAGERFACTORY_ALGORITHM
static final java.lang.String CONNECTION_PROPERTY_THIN_SSL_TRUSTMANAGERFACTORY_ALGORITHM_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_SSL_TRUSTMANAGERFACTORY_ALGORITHM_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_OLDSYNTAX
static final java.lang.String CONNECTION_PROPERTY_THIN_NET_OLDSYNTAX_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NET_OLDSYNTAX_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_CONTEXT_INITIAL
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_CONTEXT_INITIAL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NAMING_CONTEXT_INITIAL_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_PROVIDER_URL
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_PROVIDER_URL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NAMING_PROVIDER_URL_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_SECURITY_AUTHENTICATION
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_SECURITY_AUTHENTICATION_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NAMING_SECURITY_AUTHENTICATION_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_SECURITY_PRINCIPAL
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_SECURITY_PRINCIPAL_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NAMING_SECURITY_PRINCIPAL_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_SECURITY_CREDENTIALS
static final java.lang.String CONNECTION_PROPERTY_THIN_NAMING_SECURITY_CREDENTIALS_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_NAMING_SECURITY_CREDENTIALS_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_WALLET_LOCATION_DEFAULT
static final byte CONNECTION_PROPERTY_WALLET_LOCATION_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_WALLET_PASSWORD
static final java.lang.String CONNECTION_PROPERTY_WALLET_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_WALLET_PASSWORD_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_PROXY_CLIENT_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_PROXY_CLIENT_NAME_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_DEFAULT_USE_NIO
static final java.lang.String CONNECTION_PROPERTY_DEFAULT_USE_NIO_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_USE_NIO_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_OCI_DRIVER_CHARSET
static final java.lang.String CONNECTION_PROPERTY_OCI_DRIVER_CHARSET_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_DRIVER_CHARSET_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_EDITION_NAME_DEFAULT
static final byte CONNECTION_PROPERTY_EDITION_NAME_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_INTERNAL_LOGON
static final java.lang.String CONNECTION_PROPERTY_INTERNAL_LOGON_DEFAULT
static final byte CONNECTION_PROPERTY_INTERNAL_LOGON_ACCESSMODE
static final java.lang.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 java.lang.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 java.lang.String CONNECTION_PROPERTY_OCI_SVC_CTX_HANDLE
static final java.lang.String CONNECTION_PROPERTY_OCI_SVC_CTX_HANDLE_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_SVC_CTX_HANDLE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_OCI_ENV_HANDLE
static final java.lang.String CONNECTION_PROPERTY_OCI_ENV_HANDLE_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_ENV_HANDLE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_OCI_ERR_HANDLE
static final java.lang.String CONNECTION_PROPERTY_OCI_ERR_HANDLE_DEFAULT
static final byte CONNECTION_PROPERTY_OCI_ERR_HANDLE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_PRELIM_AUTH
static final java.lang.String CONNECTION_PROPERTY_PRELIM_AUTH_DEFAULT
static final byte CONNECTION_PROPERTY_PRELIM_AUTH_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_SET_NEW_PASSWORD
static final java.lang.String CONNECTION_PROPERTY_SET_NEW_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_SET_NEW_PASSWORD_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_DEFAULT_EXECUTE_BATCH
static final java.lang.String CONNECTION_PROPERTY_DEFAULT_EXECUTE_BATCH_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_EXECUTE_BATCH_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_DEFAULT_ROW_PREFETCH
static final java.lang.String CONNECTION_PROPERTY_DEFAULT_ROW_PREFETCH_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_ROW_PREFETCH_ACCESSMODE
static final java.lang.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 "4000".
OracleStatement.setLobPrefetchSize
,
Constant Field Valuesstatic final java.lang.String CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_ENABLE_DATA_IN_LOCATOR_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_DATA_IN_LOCATOR_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_ENABLE_READ_DATA_IN_LOCATOR_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_READ_DATA_IN_LOCATOR_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_REPORT_REMARKS
static final java.lang.String CONNECTION_PROPERTY_REPORT_REMARKS_DEFAULT
static final byte CONNECTION_PROPERTY_REPORT_REMARKS_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_INCLUDE_SYNONYMS
static final java.lang.String CONNECTION_PROPERTY_INCLUDE_SYNONYMS_DEFAULT
static final byte CONNECTION_PROPERTY_INCLUDE_SYNONYMS_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_RESTRICT_GETTABLES
static final java.lang.String CONNECTION_PROPERTY_RESTRICT_GETTABLES_DEFAULT
static final byte CONNECTION_PROPERTY_RESTRICT_GETTABLES_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_ACCUMULATE_BATCH_RESULT
static final java.lang.String CONNECTION_PROPERTY_ACCUMULATE_BATCH_RESULT_DEFAULT
static final byte CONNECTION_PROPERTY_ACCUMULATE_BATCH_RESULT_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_USE_FETCH_SIZE_WITH_LONG_COLUMN
static final java.lang.String CONNECTION_PROPERTY_USE_FETCH_SIZE_WITH_LONG_COLUMN_DEFAULT
static final byte CONNECTION_PROPERTY_USE_FETCH_SIZE_WITH_LONG_COLUMN_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_PROCESS_ESCAPES
static final java.lang.String CONNECTION_PROPERTY_PROCESS_ESCAPES_DEFAULT
static final byte CONNECTION_PROPERTY_PROCESS_ESCAPES_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_FIXED_STRING
static final java.lang.String CONNECTION_PROPERTY_FIXED_STRING_DEFAULT
static final byte CONNECTION_PROPERTY_FIXED_STRING_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_DEFAULTNCHAR
static final java.lang.String CONNECTION_PROPERTY_DEFAULTNCHAR_DEFAULT
static final byte CONNECTION_PROPERTY_DEFAULTNCHAR_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_RESOURCE_MANAGER_ID
static final java.lang.String CONNECTION_PROPERTY_RESOURCE_MANAGER_ID_DEFAULT
static final byte CONNECTION_PROPERTY_RESOURCE_MANAGER_ID_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_DISABLE_DEFINECOLUMNTYPE
static final java.lang.String CONNECTION_PROPERTY_DISABLE_DEFINECOLUMNTYPE_DEFAULT
static final byte CONNECTION_PROPERTY_DISABLE_DEFINECOLUMNTYPE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_CONVERT_NCHAR_LITERALS
static final java.lang.String CONNECTION_PROPERTY_CONVERT_NCHAR_LITERALS_DEFAULT
static final byte CONNECTION_PROPERTY_CONVERT_NCHAR_LITERALS_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_J2EE13_COMPLIANT
static final java.lang.String CONNECTION_PROPERTY_J2EE13_COMPLIANT_DEFAULT
static final byte CONNECTION_PROPERTY_J2EE13_COMPLIANT_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_MAP_DATE_TO_TIMESTAMP_DEFAULT
static final byte CONNECTION_PROPERTY_MAP_DATE_TO_TIMESTAMP_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_USE_THREADLOCAL_BUFFER_CACHE_DEFAULT
static final byte CONNECTION_PROPERTY_USE_THREADLOCAL_BUFFER_CACHE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_DRIVER_NAME_ATTRIBUTE
static final java.lang.String CONNECTION_PROPERTY_DRIVER_NAME_ATTRIBUTE_DEFAULT
static final byte CONNECTION_PROPERTY_DRIVER_NAME_ATTRIBUTE_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_MAX_CACHED_BUFFER_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_MAX_CACHED_BUFFER_SIZE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE
static final java.lang.String CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE_DEFAULT
static final byte CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_LOB_STREAM_POS_STANDARD_COMPLIANT
static final java.lang.String CONNECTION_PROPERTY_LOB_STREAM_POS_STANDARD_COMPLIANT_DEFAULT
static final byte CONNECTION_PROPERTY_LOB_STREAM_POS_STANDARD_COMPLIANT_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_STRICT_ASCII_CONVERSION
static final java.lang.String CONNECTION_PROPERTY_STRICT_ASCII_CONVERSION_DEFAULT
static final byte CONNECTION_PROPERTY_STRICT_ASCII_CONVERSION_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_THIN_FORCE_DNS_LOAD_BALANCING_DEFAULT
static final byte CONNECTION_PROPERTY_THIN_FORCE_DNS_LOAD_BALANCING_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_ENABLE_TEMP_LOB_REF_COUNT_DEFAULT
static final byte CONNECTION_PROPERTY_ENABLE_TEMP_LOB_REF_COUNT_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_NET_KEEPALIVE
Sets keepAlive on the Connection Socket.
static final java.lang.String CONNECTION_PROPERTY_NET_KEEPALIVE_DEFAULT
static final byte CONNECTION_PROPERTY_NET_KEEPALIVE_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_PASSWORD
static final java.lang.String CONNECTION_PROPERTY_PASSWORD_DEFAULT
static final byte CONNECTION_PROPERTY_PASSWORD_ACCESSMODE
static final java.lang.String CONNECTION_PROPERTY_SERVER
static final java.lang.String CONNECTION_PROPERTY_SERVER_DEFAULT
static final byte CONNECTION_PROPERTY_SERVER_ACCESSMODE
static final java.lang.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 java.lang.String CONNECTION_PROPERTY_COMMIT_OPTION_DEFAULT
static final byte CONNECTION_PROPERTY_COMMIT_OPTION_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 java.lang.String PROXY_USER_NAME
static final java.lang.String PROXY_USER_PASSWORD
static final java.lang.String PROXY_DISTINGUISHED_NAME
static final java.lang.String PROXY_CERTIFICATE
static final java.lang.String PROXY_ROLES
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 int CACHE_SIZE_NOT_SET
static final java.lang.String NTF_TIMEOUT
static final java.lang.String NTF_QOS_PURGE_ON_NTFN
static final java.lang.String NTF_QOS_RELIABLE
static final java.lang.String NTF_AQ_PAYLOAD
static final java.lang.String NTF_LOCAL_TCP_PORT
static final int NTF_DEFAULT_TCP_PORT
static final java.lang.String NTF_LOCAL_HOST
static final java.lang.String NTF_GROUPING_CLASS
static final java.lang.String NTF_GROUPING_CLASS_NONE
static final java.lang.String NTF_GROUPING_CLASS_TIME
static final java.lang.String NTF_GROUPING_VALUE
static final java.lang.String NTF_GROUPING_TYPE
static final java.lang.String NTF_GROUPING_TYPE_SUMMARY
static final java.lang.String NTF_GROUPING_TYPE_LAST
static final java.lang.String NTF_GROUPING_START_TIME
static final java.lang.String NTF_GROUPING_REPEAT_TIME
static final java.lang.String NTF_GROUPING_REPEAT_FOREVER
static final java.lang.String DCN_NOTIFY_ROWIDS
static final java.lang.String DCN_IGNORE_INSERTOP
static final java.lang.String DCN_IGNORE_UPDATEOP
static final java.lang.String DCN_IGNORE_DELETEOP
static final java.lang.String DCN_NOTIFY_CHANGELAG
static final java.lang.String DCN_QUERY_CHANGE_NOTIFICATION
static final java.lang.String DCN_BEST_EFFORT
Method Detail |
---|
void commit(java.util.EnumSet<OracleConnection.CommitOption> options) throws java.sql.SQLException
flags
- commit options
java.sql.SQLException
void archive(int mode, int aseq, java.lang.String acstext) throws java.sql.SQLException
java.sql.SQLException
void openProxySession(int type, java.util.Properties prop) throws java.sql.SQLException
type
- has to be either OracleConnection.PROXYTYPE_USER_NAME
or OracleConnection.PROXYTYPE_DISTINGUISHED_NAME or
OracleConnection.PROXYTYPE_CERTIFICATEprop
- keys/values
java.sql.SQLException
boolean getAutoClose() throws java.sql.SQLException
java.sql.SQLException
- should never been raisedsetAutoClose
int getDefaultExecuteBatch()
The batch value from the connection is used for all prepared statements
associated with this connection. A different batch value can also be
defined for individual prepared statements. This can be done by using
OraclePreparedStatement.setExecuteBatch
, which will override
the default value provided from the connection. Therefore, the batch value
returned by this getDefaultExecuteBatch
entrypoint is valid
for prepared statements for which you have not defined a different batch
value.
The following code retrieves the default batch value of the connection
conn
.
Integer batch_val = ((OracleConnection)conn).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
java.lang.Object getDescriptor(java.lang.String sql_name)
sql_name
- the sql type
putDescriptor
,
oracle.sql.TypeDescriptor
java.lang.String[] getEndToEndMetrics() throws java.sql.SQLException
java.sql.SQLException
- if an error occurssetEndToEndMetrics
short getEndToEndECIDSequenceNumber() throws java.sql.SQLException
java.sql.SQLException
- if an error occursboolean 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
java.lang.Object getJavaObject(java.lang.String sql_name) throws java.sql.SQLException
java.sql.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
java.lang.String getSQLType(java.lang.Object obj) throws java.sql.SQLException
java.sql.SQLException
int getStmtCacheSize()
short getStructAttrCsId() throws java.sql.SQLException
java.sql.SQLException
- if Conversion is nulljava.lang.String getUserName() throws java.sql.SQLException
Example where conn
is your connection object:
String UserName = ((OracleConnection)conn).getUserName();
java.sql.SQLException
- if the logical connection is closedjava.lang.String getCurrentSchema() throws java.sql.SQLException
java.sql.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 java.sql.SQLException
java.sql.SQLException
int pingDatabase(int timeOut) throws java.sql.SQLException
timeOut
-
java.sql.SQLException
void putDescriptor(java.lang.String sql_name, java.lang.Object desc) throws java.sql.SQLException
sql_name
- the sql typedesc
- the Object Descriptor associated
java.sql.SQLException
- if sql_name or desc is nullgetDescriptor
,
oracle.sql.TypeDescriptor
void registerSQLType(java.lang.String sql_name, java.lang.Class java_class) throws java.sql.SQLException
java.sql.SQLException
void registerSQLType(java.lang.String sql_name, java.lang.String java_class_name) throws java.sql.SQLException
java.sql.SQLException
void setAutoClose(boolean autoClose) throws java.sql.SQLException
autoClose
- the boolean value
java.sql.SQLException
- when the argument autoClose is falsegetAutoClose
void setDefaultExecuteBatch(int batch) throws java.sql.SQLException
You can reduce the number of round trips to the database, thereby
improving application performance, by grouping multiple
UPDATE
, DELETE
, or INSERT
statements
into a single "batch" and having the whole batch sent to the database and
processed in one trip. To do this, you can either use the Oracle update
batching model or the batch updates of the Sun Microsystems JDBC 2.0
specification. The standard model is a manual, explicit model (there is no
batch value) whereas the Oracle model is an implicit model.
Note: It is important to be aware that you cannot mix theses models. In any single application, you can use the syntax of one model or the other, but not both. The Oracle JDBC driver will throw exceptions when you mix these syntaxes.
The Oracle update batching feature associates a batch value (limit) with
each prepared statement object (this way the driver knows in advance how
many operations will be batched). With Oracle update batching, instead of
the JDBC driver executing a prepared statement each time its
executeUpdate
method is called, the driver adds the statement
to a batch of accumulated execution requests. The driver will pass all the
operations to the database for execution once the batch value is
reached. For example, if the batch value is 10, then each batch of 10
operations will be sent to the database and processed in one trip.
The following code sets the default batch value to 20 for
all prepared statement objects associated with the conn
connection object:
((OracleConnection)conn).setDefaultExecuteBatch(20);
Even though this sets the default batch value for all the prepared
statements of the connection, you can override it by calling
setDefaultBatch
on individual Oracle prepared statements.
The connection batch value will apply to statement objects created after
this batch value was set.
Note that instead of calling setDefaultExecuteBatch
, you
can set the defaultBatchValue
Java property if you use a Java
Properties
object in establishing the connection.
Types of Statements Supported. As implemented by Oracle, update batching is intended for use with prepared statements, when you are repeating the same statement with different bind variables. Be aware of the following:
Note
that because Oracle update batching is vendor-specific, you must actually
use (or cast to) OraclePreparedStatement
objects, not general
PreparedStatement
objects.
UPDATE
, INSERT
, or
DELETE
operations. Executing a batch that includes an
operation that attempts to return a result set will cause an exception.
Note that with standard update batching model, you can use either
standard PreparedStatement
, CallableStatement
,
and Statement
objects, or Oracle-specific
OraclePreparedStatement
, OracleCallableStatement
,
and OracleStatement
objects.
Oracle Update Batching Characteristics and Limitations
sendBatch
method of an Oracle prepared statement in any of the
following circumstances: 1) the connection receives a COMMIT
request, either as a result of invoking the commit
method or
as a result of auto-commit mode; 2) the statement receives a
close
request; or 3) the connection receives a
close
request.
COMMIT
request, statement close, or
connection close has no effect on a pending batch if you use standard
update batching--only if you use Oracle update batching.
batch
- your default batch value (default is 1)
java.sql.SQLException
- if the argument batch is <=0OraclePreparedStatement.setExecuteBatch
,
getDefaultExecuteBatch
void setDefaultRowPrefetch(int value) throws java.sql.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 prefetch
java.sql.SQLException
- if the argument value is <=0OracleStatement.setRowPrefetch
,
getDefaultRowPrefetch
void setEndToEndMetrics(java.lang.String[] metrics, short sequenceNumber) throws java.sql.SQLException
metrics
- String[] containing the metric values.sequenceNumber
- the sequence number for the context id
java.sql.SQLException
- if an error occursgetEndToEndMetrics
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 java.sql.SQLException
java.sql.SQLException
void setStmtCacheSize(int size, boolean clearMetaData) throws java.sql.SQLException
java.sql.SQLException
void setStatementCacheSize(int size) throws java.sql.SQLException
size
- Requested size of the cache. If the existing cache size
is less than size, statements will be purged to reduce the
size.
java.sql.SQLException
- if size < 0, or if called on a logical connection.int getStatementCacheSize() throws java.sql.SQLException
java.sql.SQLException
void setImplicitCachingEnabled(boolean cache) throws java.sql.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.
java.sql.SQLException
- if called on a logical connection.boolean getImplicitCachingEnabled() throws java.sql.SQLException
java.sql.SQLException
void setExplicitCachingEnabled(boolean cache) throws java.sql.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.
java.sql.SQLException
- if called on a logical connection.boolean getExplicitCachingEnabled() throws java.sql.SQLException
java.sql.SQLException
void purgeImplicitCache() throws java.sql.SQLException
java.sql.SQLException
void purgeExplicitCache() throws java.sql.SQLException
java.sql.SQLException
java.sql.PreparedStatement getStatementWithKey(java.lang.String key) throws java.sql.SQLException
key
- Specified key to search for
java.sql.SQLException
java.sql.CallableStatement getCallWithKey(java.lang.String key) throws java.sql.SQLException
key
- Specified key to search for
java.sql.SQLException
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 java.sql.SQLException
mode
- can be either OracleConnection.DatabaseShutdownMode.CONNECT
OracleConnection.DatabaseShutdownMode.TRANSACTIONAL
OracleConnection.DatabaseShutdownMode.TRANSACTIONAL_LOCAL
OracleConnection.DatabaseShutdownMode.IMMEDIATE
OracleConnection.DatabaseShutdownMode.ABORT
OracleConnection.DatabaseShutdownMode.FINAL
java.sql.SQLException
void startup(java.lang.String startup_str, int mode) throws java.sql.SQLException
java.sql.SQLException
void startup(OracleConnection.DatabaseStartupMode mode) throws java.sql.SQLException
mode
- can be either OracleConnection.DatabaseStartupMode.NO_RESTRICTION
OracleConnection.DatabaseStartupMode.FORCE
OracleConnection.DatabaseStartupMode.RESTRICT
java.sql.SQLException
java.sql.PreparedStatement prepareStatementWithKey(java.lang.String key) throws java.sql.SQLException
key
- the key with which it was closed
java.sql.SQLException
- if a database access error occursjava.sql.CallableStatement prepareCallWithKey(java.lang.String key) throws java.sql.SQLException
key
- the key with which it was closed
java.sql.SQLException
- 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(java.lang.String regionName) throws java.sql.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.
java.sql.SQLException
- if an error occurred.java.lang.String getSessionTimeZone()
java.lang.String getSessionTimeZoneOffset() throws java.sql.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.
java.sql.SQLException
java.util.Properties getProperties()
java.sql.Connection _getPC()
boolean isLogicalConnection()
void registerTAFCallback(OracleOCIFailover cbk, java.lang.Object obj) throws java.sql.SQLException
cbk
- Callback instance.obj
- Context object in which any client's state can be
stored and provided when the callback method is
invoked.
java.sql.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 java.sql.SQLException
OracleSavepoint
object that
represents it.
OracleSavepoint
object
java.sql.SQLException
- if a database access error occurs
or this Connection
object is currently in
auto-commit modeOracleSavepoint
OracleSavepoint oracleSetSavepoint(java.lang.String name) throws java.sql.SQLException
OracleSavepoint
object that
represents it.
name
- a String
containing the name of the savepoint
OracleSavepoint
object
java.sql.SQLException
- if a database access error occurs
or this Connection
object is currently in
auto-commit modeOracleSavepoint
void oracleRollback(OracleSavepoint savepoint) throws java.sql.SQLException
OracleSavepoint
object was set.
This method should be used only when auto-commit has been disabled.
savepoint
- the OracleSavepoint
object to roll back to
java.sql.SQLException
- 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 java.sql.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 removed
java.sql.SQLException
- if a database access error occurs or
the given OracleSavepoint
object is not a valid
savepoint in the current transactionOracleSavepoint
void close(java.util.Properties connAttr) throws java.sql.SQLException
connAttr
- the connection Attributes to be applied
java.sql.SQLException
- if a database access error occursvoid close(int opt) throws java.sql.SQLException
opt
- set to INVALID_CONNECTION to close the PooledConnection
java.sql.SQLException
- if a database access error occursboolean isProxySession()
void applyConnectionAttributes(java.util.Properties connAttr) throws java.sql.SQLException
connAttr
- the connection Attributes to be applied
java.sql.SQLException
- if a database access error occursjava.util.Properties getConnectionAttributes() throws java.sql.SQLException
java.sql.SQLException
- if a database access error occursjava.util.Properties getUnMatchedConnectionAttributes() throws java.sql.SQLException
java.sql.SQLException
- if a database access error occursvoid registerConnectionCacheCallback(OracleConnectionCacheCallback occc, java.lang.Object userObj, int cbkFlag) throws java.sql.SQLException
occc
- Implementation of the OracleConnectionCacheCallback InterfaceuserObj
- User private object to be passed when invoking callbackscbkFlag
- Indicates which callback method to invoke.
Supported values are:
ABANDONED_CONNECTION_CALLBACK
RELEASE_CONNECTION_CALLBACK
ALL_CONNECTION_CALLBACKS
java.sql.SQLException
- if a database access error occursvoid setConnectionReleasePriority(int priority) throws java.sql.SQLException
priority
- one of the above release priority
java.sql.SQLException
- if a database access error occursint getConnectionReleasePriority() throws java.sql.SQLException
java.sql.SQLException
- if a database access error occursvoid setPlsqlWarnings(java.lang.String setting) throws java.sql.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.
java.sql.SQLException
- if a database access error occursAQNotificationRegistration[] registerAQNotification(java.lang.String[] name, java.util.Properties[] options, java.util.Properties globaloptions) throws java.sql.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.
java.sql.SQLException
void unregisterAQNotification(AQNotificationRegistration registration) throws java.sql.SQLException
registration
-
java.sql.SQLException
AQMessage dequeue(java.lang.String queueName, AQDequeueOptions opt, byte[] tdo) throws java.sql.SQLException
queueName
- name of the queue from which to dequeue.opt
- dequeue optionstdo
- the Type Descriptor Object OID of the type of the queue.
java.sql.SQLException
AQMessage dequeue(java.lang.String queueName, AQDequeueOptions opt, java.lang.String typeName) throws java.sql.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".
java.sql.SQLException
void enqueue(java.lang.String queueName, AQEnqueueOptions opt, AQMessage mesg) throws java.sql.SQLException
queueName
- name of the queue where to enqueue.opt
- enqueue options.mesg
- the AQ message to enqueue.
java.sql.SQLException
DatabaseChangeRegistration registerDatabaseChangeNotification(java.util.Properties options) throws java.sql.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.java.sql.SQLException
DatabaseChangeRegistration getDatabaseChangeRegistration(int regid) throws java.sql.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 registration
java.sql.SQLException
void unregisterDatabaseChangeNotification(DatabaseChangeRegistration registration) throws java.sql.SQLException
This method interrupts the notification thread and removes all listeners attached to this registration before closing it.
registration
-
java.sql.SQLException
unregisterDatabaseChangeNotification(long,String)
void unregisterDatabaseChangeNotification(int registrationId, java.lang.String host, int tcpport) throws java.sql.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.
java.sql.SQLException
unregisterDatabaseChangeNotification(long,String)
void unregisterDatabaseChangeNotification(int registrationId) throws java.sql.SQLException
java.sql.SQLException
unregisterDatabaseChangeNotification(long, String)
void unregisterDatabaseChangeNotification(long registrationId, java.lang.String callback) throws java.sql.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();
java.sql.SQLException
unregisterDatabaseChangeNotification(oracle.jdbc.dcn.DatabaseChangeRegistration)
ARRAY createARRAY(java.lang.String typeName, java.lang.Object elements) throws java.sql.SQLException
typeName
- the name of the SQL type of the created objectelements
- the elements of the created object
java.sql.SQLException
- if a database error occursjava.sql.Array createOracleArray(java.lang.String arrayTypeName, java.lang.Object elements) throws java.sql.SQLException
arrayTypeName
- the name of the SQL type of the created objectelements
- the elements of the created object
java.sql.SQLException
- if a database error occursBINARY_DOUBLE createBINARY_DOUBLE(double value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursBINARY_FLOAT createBINARY_FLOAT(float value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursDATE createDATE(java.sql.Date value) throws java.sql.SQLException
value
- the value that the new object should repreesnt
java.sql.SQLException
- if a database error occursDATE createDATE(java.sql.Time value) throws java.sql.SQLException
value
- the value that the new object should repreesnt
java.sql.SQLException
- if a database error occursDATE createDATE(java.sql.Timestamp value) throws java.sql.SQLException
value
- the value that the new object should repreesnt
java.sql.SQLException
- if a database error occursDATE createDATE(java.sql.Date value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should repreesntcal
- the timezone in which the value is interpreted
java.sql.SQLException
- if a database error occursDATE createDATE(java.sql.Time value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should repreesntcal
- the timezone in which the value is interpreted
java.sql.SQLException
- if a database error occursDATE createDATE(java.sql.Timestamp value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should repreesntcal
- the timezone in which the value is interpreted
java.sql.SQLException
- if a database error occursDATE createDATE(java.lang.String value) throws java.sql.SQLException
value
- the value that the new object should repreesnt
java.sql.SQLException
- if a database error occursINTERVALDS createINTERVALDS(java.lang.String value) throws java.sql.SQLException
value
- the value that the new object shoud represent
java.sql.SQLException
- if a database error occursINTERVALYM createINTERVALYM(java.lang.String value) throws java.sql.SQLException
value
- the value that the new object shoud represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(boolean value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(byte value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(short value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(int value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(long value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(float value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(double value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(java.math.BigDecimal value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(java.math.BigInteger value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursNUMBER createNUMBER(java.lang.String value, int scale) throws java.sql.SQLException
value
- the value that the new object should representscale
- the scale of the new object
java.sql.SQLException
- if a database error occursTIMESTAMP createTIMESTAMP(java.sql.Date value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMP createTIMESTAMP(DATE value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMP createTIMESTAMP(java.sql.Time value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMP createTIMESTAMP(java.sql.Timestamp value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMP createTIMESTAMP(java.lang.String value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.sql.Date value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.sql.Date value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.sql.Time value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.sql.Time value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.sql.Timestamp value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.sql.Timestamp value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.lang.String value) throws java.sql.SQLException
value
- the value that the new object should represent
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(java.lang.String value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPTZ createTIMESTAMPTZ(DATE value) throws java.sql.SQLException
java.sql.SQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(java.sql.Date value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(java.sql.Time value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(java.sql.Timestamp value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(java.lang.String value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursTIMESTAMPLTZ createTIMESTAMPLTZ(DATE value, java.util.Calendar cal) throws java.sql.SQLException
value
- the value that the new object should representcal
- the timezone of the value
java.sql.SQLException
- if a database error occursvoid cancel() throws java.sql.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.
java.sql.SQLException
- if the cancel operation failsvoid abort() throws java.sql.SQLException
java.sql.SQLException
- -- Io Exception: Socket closed - ORA-17002
TNS:not connected - ORA-12153
java.lang.SecurityException
- if the caller does not have the necessary
permissionTypeDescriptor[] getAllTypeDescriptorsInCurrentSchema() throws java.sql.SQLException
java.sql.SQLException
- If an error occurs.TypeDescriptor[] getTypeDescriptorsFromListInCurrentSchema(java.lang.String[] typeNames) throws java.sql.SQLException
An
- array of Strings which are type names. Use upper case
unless the type names are mixed case names.
java.sql.SQLException
- if the specified type does not exist, or if an error
occurred.TypeDescriptor[] getTypeDescriptorsFromList(java.lang.String[][] schemaAndTypeNamePairs) throws java.sql.SQLException
An
- array of arrays of Strings which are pairs of schema
and type names.
java.sql.SQLException
- if any of the specified types does not exist, or if an error
occurs.java.lang.String getDataIntegrityAlgorithmName() throws java.sql.SQLException
java.sql.SQLException
java.lang.String getEncryptionAlgorithmName() throws java.sql.SQLException
java.sql.SQLException
java.lang.String getAuthenticationAdaptorName() throws java.sql.SQLException
java.sql.SQLException
boolean isUsable()
void setDefaultTimeZone(java.util.TimeZone tz) throws java.sql.SQLException
Default
- TimeZone to be used for all Date, Time and Timestamp
conversions.
java.sql.SQLException
- if there is an issue while setting the TimeZonejava.util.TimeZone getDefaultTimeZone() throws java.sql.SQLException
java.sql.SQLException
- If there is any issue while retrieving the TimeZonevoid setApplicationContext(java.lang.String nameSpace, java.lang.String attribute, java.lang.String value) throws java.sql.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.
java.sql.SQLException
- If an error occursclearAllApplicationContext
void clearAllApplicationContext(java.lang.String nameSpace) throws java.sql.SQLException
nameSpace
- The namespace which will be cleared
java.sql.SQLException
setApplicationContext
|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |