OracleConnection Members

OracleConnection members are listed in the following tables.

OracleConnection Constructors

OracleConnection constructors are listed in Table 6-44.

Table 44 OracleConnection Constructors

Constructor Description
OracleConnection Constructors Instantiates a new instance of the OracleConnection class (Overloaded)

OracleConnection Static Methods

The OracleConnection static methods are listed in Table 6-45.

Table 45 OracleConnection Static Methods

Method Description
ClearAllPools Clears all connections from all the connection pools
ClearPool Clears the connection pool that is associated with the provided OracleConnection object
ClearInteractiveTokenCache

Clears the connection pool, Microsoft Entra ID, and OCI IAM access tokens from the ODP.NET cache.

Not available in ODP.NET, Unmanaged Driver

Equals Inherited from System.Object (Overloaded)
UnregisterCloudConfigNotification

Unregisters an OracleConnection from receiving cloud provider change notifications

Not available in ODP.NET, Unmanaged Driver

OracleConnection Properties

OracleConnection properties are listed in Table 6-46.

Table 46 OracleConnection Properties

Property Description
AccessToken Used to get or set OracleAccessToken on the connection
ActionName Specifies the action name for the connection
AllowCertificateSelectionUI

Indicates whether to allow the user to select a specific TLS/SSL certificate via a graphical interface for their database connection when using a MCS wallet location

Not Available in ODP.NET, Unmanaged Driver

AutoCommit Specifies whether to commit each SQL statement implicitly or only until an explicit commit occurs
AutoProxy Enables using a HTTPS proxy server for the ODP.NET connection
BindByName

Specifies the binding method in the collection

Not Available in ODP.NET, Unmanaged Driver

ChunkMigrationConnectionTimeout

This setting pauses the connection request until the migration completes or fails to migrate in the specified time, then connect to the correct shard with the data requested.

Not Available in ODP.NET, Unmanaged Driver

ClientId Specifies the client identifier for the connection
ClientInfo Specifies the client information for the connection
ClientTimeZoneFileVersion Returns the highest time zone file version in the TimeZoneFileLocation directory and embedded in ODP.NET
CommandTimeout

Specifies the number of seconds the command is allowed to execute before terminating the execution with an exception

Not Available in ODP.NET, Unmanaged Driver

ConnectionIdPrefix

Identifies a particular application's connections by appending its string to the connection identifier

Not Available in ODP.NET, Unmanaged Driver

ConnectionString Specifies connection information or URL used to connect to an Oracle database
ConnectionTimeout Indicates the maximum amount of time that the Open method can take to obtain a pooled connection before the request is terminated
ConnectionType

Determines whether a particular connection object is associated with a TimesTen database connection, an Oracle database connection, or no physical connection

Not Available in ODP.NET, Managed Driver and ODP.NET Core

Container Inherited from System.ComponentModel.Component
Credential Used to get or set an OracleCredential object on the connection
Database Not Supported
DatabaseCharset

Specifies the CHAR database character set on the connection and is used to optimize connection establishment

Not Available in ODP.NET, Unmanaged Driver

DatabaseNCharset

Specifies the NCHAR database character set on the connection and is used to optimize connection establishment

Not Available in ODP.NET, Unmanaged Driver

DatabaseDomainName Specifies the name of the database domain to which the connection is set
DatabaseEditionName Sets or gets the edition name for the OracleConnection object
DatabaseMaxIdentifierLength Specifies the maximum identifier length the connection supports
DatabaseName Specifies the name of the database to which the connection is set
DatabaseOpenTelemetryTracing

Enables database OpenTelemetry span instrumentation for ODP.NET public APIs that perform a database round-trip

Not Available in ODP.NET, Unmanaged Driver

DatabaseTimeZoneFileVersion Returns the database’s time zone file version
DataSource Specifies the Oracle Net Services Name, Connect Descriptor, or an easy connect naming that identifies the database to which to connect
DRCPConnectionClass Specifies a logical name that identifies the DRCP connection pool that the ODP.NET connection will use
DRCPPurity Specifies whether an application can reuse a pooled session (Pooled) or must use a new session (New)
FetchSize

Specifies the total memory size, in bytes, that the provider allocates to cache data fetched in one database round-trip

Not Available in ODP.NET, Unmanaged Driver

HostName Specifies the name of the host to which the connection is set
HttpsProxy Specifies the HTTPS proxy server
HttpsProxyPort Specifies the HTTPS proxy server port number
InstanceName Specifies the name of the instance to which the connection is set
IsInTransaction Specifies if the current application is in a transaction
IsNNEChecksummed

Indicates if the connection uses Oracle Database Native Network Encryption (NNE) checksumming

Not Available in ODP.NET, Unmanaged Driver

IsNNEEncypted

Indicates if the connection uses Oracle Database Native Network Encryption (NNE).

Not Available in ODP.NET, Unmanaged Driver

IsTLSEncrypted

Indicates if the connection uses TCPS, SSL, or TLS

Not Available in ODP.NET, Unmanaged Driver

KeepAlive

Specifies whether to keep an idle connection alive.

Not Available in ODP.NET, Unmanaged Driver

KeepAliveInterval

Specifies the time interval after an unacknowledged probe before a new probe is sent.

Not Available in ODP.NET, Unmanaged Driver

KeepAliveTime

Specifies the idle time before a keepalive probe is sent.

Not Available in ODP.NET, Unmanaged Driver

MaxStatementCacheSize

Specifies the maximum number of statements that can be cached when self-tuning is enabled

Not Available in ODP.NET, Unmanaged Driver

ModuleName Specifies the module name for the connection
NamesDirectoryPath Specifies the naming method order used for client name resolution lookups
OciCompartment Gets or sets the Oracle Cloud Identifier (OCID) of the target database’s compartment
OciDatabase Gets or sets the target database’s Oracle Cloud Identifier (OCID)
OciIamUrl Gets or sets the URL end point for getting the database token
OciTenacy Gets or sets the Oracle Cloud Identifier (OCID) of the IAM user’s cloud tenancy to retrieve the database token
OpenTelemetryTracing

Specifies whether to dynamically enable or disable ODP.NET OpenTelemetry tracing instrumentation at the connection level

Not Available in ODP.NET, Unmanaged Driver

PasswordAuthentication Sets the connection PASSWORD_AUTH parameter value
PDBName Used to set and get the name of the pluggable database to which the session is connected to
Pipelining

Enables asynchronous execution on the database server side

Not Available in ODP.NET, Unmanaged Driver

PoolName

Specifies the name that uniquely identifies the pool in .NET metrics or performance counters.

Not available in ODP.NET, Unmanaged Driver and ODP.NET, Managed Driver

ProviderName

Specifies the ODP.NET provider type and version

Not Available in ODP.NET, Unmanaged Driver

ProviderNuGetVersion

Specifies the ODP.NET NuGet version number

Not Available in ODP.NET, Unmanaged Driver

ProviderTypeNLSSensitiveToString

Specifies whether to honor the data type's NLS format when the ToString() method is called

Not Available in ODP.NET, Unmanaged Driver

ProviderVersion Specifies the ODP.NET assembly version
RemoteConfigurationFiltering Specifies whether local configuration file access, such as to wallet and tnsnames.ora files, is allowed from centralized configuration providers
Roles

Retrieves the OracleRoleCollection object associated with the connection.

Not Available in ODP.NET, Unmanaged Driver

RowsToFetchPerRoundTrip

Specifies the total number of rows to retrieve per database round trip

Not Available in ODP.NET, Unmanaged Driver

SDU Specifies the session data unit size (SDU) for Oracle networking communication between client and server
ServerVersion Specifies the version number of the Oracle database to which the OracleConnection has established a connection
ServiceName Specifies the name of the service to which the connection is set
ServiceRelocationConnectionTimeout

Specifies the time to wait before retrying connecting to a service that becomes unavailable

Not Available in ODP.NET, Unmanaged Driver

SessionlessTransactionOptions

Indicates the sessionless transaction options

Not Available in ODP.NET, Unmanaged Driver

SessionlessTransactionId

Returns the sessionless transaction identifier

Not Available in ODP.NET, Unmanaged Driver

Site Inherited from System.ComponentModel.Component
SqlNetAllowedLogonVersionClient Specifies the minimum authentication protocol that is to be used for a given OracleConnection object
SqlNetAuthenticationServices This property enables one or more authentication services, such as TCP/IP with SSL.
SqlNetCryptoChecksumClient

Specifies the checksum client behavior.

Not Available in ODP.NET, Unmanaged Driver

SqlNetCryptoChecksumTypesClient

Specifies the checksum algorithms the client can use.

Not Available in ODP.NET, Unmanaged Driver

SqlNetEncryptionClient

Specifies the encryption client behavior

Not Available in ODP.NET, Unmanaged Driver

SqlNetEncryptionTypesClient

Specifies encryption algorithms that the client can use.

Not Available in ODP.NET, Unmanaged Driver

SqlNetWalletOverride Specifies whether the client overrides the strong authentication credential with the stored wallet password credential for the database connection
SSLCertificateThumbprint Specifies the TLS/SSL certificate thumbprint in the certificate store for the ODP.NET connection to use
SSLServerCertDN Sets the distinguished name (DN) string that will be used to validate the server certificate DN
SSLServerDNMatch Enables server certificate distinguished name (DN) validation
SSLVersion

Enforces the connection to use a specific SSL/TLS version

Not available in ODP.NET, Unmanaged Driver

State Specifies the current state of the connection
StatementCacheSize Specifies the current size of the statement cache associated with this connection
SuppressGetDecimalInvalidCastException

Specifies whether to suppress the InvalidCastException and return a rounded-off 28 or 29 precision Oracle NUMBER value that can be represented as a .NET Decimal

Not available in ODP.NET, Unmanaged Driver

SwitchedConnection If the returned pooled connection changed its service name (ServiceName) or pluggable database (PDBName) in order to connect to the desired pluggable database, then this property will consider the connection switched
TAFMode

Configures Transparent Application Failover behavior on the connection

Not available in ODP.NET, Unmanaged Driver

TLSExcludeVersion

Indicates which SSL/TLS versions connections should not be enabled for.

Not Available in ODP.NET, Unmanaged Driver

TLSVersion

Enforces the connection to use a specific SSL/TLS version

Not Available in ODP.NET, Unmanaged Driver

TnsAdmin

Specifies the directory location of tnsnames.ora or sqlnet.ora, or both

Not Available in ODP.NET, Unmanaged Driver

TokenAuthentication

Sets the value for TOKEN_AUTH parameter for the connection

Not Available in ODP.NET, Unmanaged Driver

TokenLocation

Gets or sets the token location path for the connection where the signature token and private key files are located

Not Available in ODP.NET, Unmanaged Driver

TransactionPriority

Specifies the connection's transaction priority level

Not Available in ODP.NET, Unmanaged Driver

UseClientInitiatedCQN

Specifies whether to use Client Initiated Continuous Query Notification (CICQN) or traditional Continuous Query Notification (CQN) that does not rely on a persistent connection

Not Available in ODP.NET, Unmanaged Driver

UseHourOffsetForUnsupportedTimezone

Specifies whether the hour offset can be used for the session time zone, when the Oracle time zone region name that is associated with the .NET locale is not supported by the Oracle database being used

Not Available in ODP.NET, Unmanaged Driver

UseSNI

Specifies whether to use Server Name Indication (SNI)

Not Available in ODP.NET, Unmanaged Driver

WalletLocation

Specifies the location of wallets. Wallets are certificates, keys, and trustpoints processed by SSL/TLS

Not Available in ODP.NET, Unmanaged Driver

WalletPassword

Stores the password to decrypt the PKCS #12 wallet

Not Available in ODP.NET, Unmanaged Driver

OracleConnection Public Methods

OracleConnection public methods are listed in Table 6-47.

Table 47 OracleConnection Public Methods

Public Method Description
BeginRequest

Starts an explicit request boundary when using Application Continuity

Not available in ODP.NET, Unmanaged Driver

BeginSessionlessTransaction

Starts a new sessionless transaction and returns its global transaction identifier

Not available in ODP.NET, Unmanaged Driver

BeginTransaction Begins a local transaction (Overloaded)
ChangeDatabase Not Supported
ClearEndUserSecurityContext

This method removes the Deep Data Security end-user security context from the database session.

Not available in ODP.NET, Unmanaged Driver

Clone Creates a copy of an OracleConnection object
Close Closes the database connection
CreateCommand Creates and returns an OracleCommand object associated with the OracleConnection object
CreateObjRef Inherited from System.MarshalByRefObject
Commit() Commits the database transaction
DisableReplay

Disables replay on the connection in Application Continuity

Not available in ODP.NET, Unmanaged Driver

Dispose Inherited from System.ComponentModel.Component
EndRequest

Indicates an ending explicit request boundary when using Application Continuity

Not available in ODP.NET, Unmanaged Driver

EnlistDistributedTransaction

Enables applications to explicitly enlist in a specified distributed transaction

Not supported in .NET Core

EnlistTransaction Enables applications to enlist in a specified distributed transaction
Equals Inherited from System.Object (Overloaded)
FlushCache

Flushes all updates and deletes made through REF objects retrieved using this connection

Not Available in ODP.NET, Managed Driver and ODP.NET Core

GetHashCode Inherited from System.Object
GetLifetimeService Inherited from System.MarshalByRefObject
GetSchema Returns schema information for the data source of the OracleConnection
GetSessionInfo Returns or refreshes the property values of the OracleGlobalization object that represents the globalization settings of the session (Overloaded)
GetType Inherited from System.Object
InitializeLifetimeService Inherited from System.MarshalByRefObject
Open Opens a database connection with the property settings specified by the ConnectionString
OpenAsync Returns a Task-based asynchronous version of OracleConnection.Open (Overloaded)
OpenWithNewClientSecret

Opens a new connection using a new Microsoft Entra ID client secret

Not available in ODP.NET, Unmanaged Driver

OpenWithNewPassword Opens a new connection with the new password (Overloaded)
OpenWithNewPasswordAsync A Task-based asynchronous version of OracleConnection.OpenWithNewPassword(), which opens a new connection with the new password. (Overloaded)
OpenWithNewToken This method can be used to open a new connection by providing the refreshed/updated access token directly to ODP.NET (Overloaded)
PurgeStatementCache Flushes the Statement Cache by closing all open cursors on the database, when statement caching is enabled
ResumeSessionlessTransaction

Resumes a sessionless transaction using the provided unique transaction identifier

Not Available in ODP.NET, Unmanaged Driver

Rollback Rolls back the local transaction
Save(String) Creates a savepoint in the database
SetEndUserSecurityContext

Applies the Deep Data Security end-user security context to a database session

Not available in ODP.NET, Unmanaged Driver

SetP12

Sets the OracleP12 instance for the OracleConnection to use

Not available in ODP.NET, Unmanaged Driver

SetPEM

Sets the OraclePEM instance for the OracleConnection to use

Available in ODP.NET Core only

SetSessionInfo Alters the session’s globalization settings with the property values provided by the OracleGlobalization object
SetShardingKey(OracleShardingKey, OracleShardingKey) Enables applications to set the sharding key and super sharding key before requesting a connection
SetSSO

Sets the OracleSSO instance for the OracleConnection to use

Not available in ODP.NET, Unmanaged Driver

SuspendSessionlessTransaction

Suspends the active sessionless transaction immediately from the session.

Not available in ODP.NET, Unmanaged Driver

ToString Inherited from System.Object
UseAzureTokenAuthentication

Associates the Microsoft Entra ID token authentication settings with the OracleConnection object for use upon the next connection open

Not available in ODP.NET, Unmanaged Driver

UseOciTokenAuthentication

Associates the OCI IAM token authentication settings with the OracleConnection object for use upon the next connection open

Not available in ODP.NET, Unmanaged Driver

OracleConnection Events

OracleConnection events are listed in Table 6-48.

Table 48 OracleConnection Events

Event Name Description
ConnectionOpen This event is triggered upon the OracleConnection.Open() method
Disposed Inherited from System.ComponentModel.Component
Failover

An event that is triggered when an Oracle failover occurs

Not Available in ODP.NET, Managed Driver and ODP.NET Core

HAEvent An event that is triggered when an HA event occurs
InfoMessage An event that is triggered for any message or warning sent by the database
StateChange An event that is triggered when the connection state changes

See Also: