OracleConnection Members

OracleConnection members are listed in the following tables.

OracleConnection Constructors

OracleConnection constructors are listed in Table 6-38.

Table 6-38 OracleConnection Constructors

Constructor Description

OracleConnection Constructors

Instantiates a new instance of the OracleConnection class (Overloaded)

OracleConnection Static Properties

The OracleConnection static property is listed in Table 6-40.

Table 6-39 OracleConnection Static Property

Property Description

IsAvailable

Indicates whether or not the implicit database connection is available for use

OracleConnection Static Methods

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

Table 6-40 OracleConnection Static Methods

Method Description

Equals

Inherited from System.Object (Overloaded)

ClearPool

Clears the connection pool that is associated with the provided OracleConnection object

Not supported in a .NET stored procedure

ClearAllPools

Clears all connections from all the connection pools

Not supported in a .NET stored procedure

OracleConnection Properties

OracleConnection properties are listed in Table 6-41.

Table 6-41 OracleConnection Properties

Property Description

ActionName

Specifies the action name for the connection

ClientId

Specifies the client identifier for the connection

ClientInfo

Specifies the client information for the connection

ConnectionString

Specifies connection information 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

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

DatabaseName

Specifies the name of the database to which the connection is set

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)

HostName

Specifies the name of the host to which the connection is set

InstanceName

Specifies the name of the instance to which the connection is set

ModuleName

Specifies the module name for the connection

PDBName

Used to set and get the name of the pluggable database to which the session is connected to

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

Site

Inherited from System.ComponentModel.Component

State

Specifies the current state of the connection

StatementCacheSize

Specifies the current size of the statement cache associated with this connection

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

OracleConnection Public Methods

OracleConnection public methods are listed in Table 6-42.

Table 6-42 OracleConnection Public Methods

Public Method Description

BeginTransaction

Begins a local transaction (Overloaded)

Not supported in a .NET stored procedure for context connection

ChangeDatabase

Not Supported

Clone

Creates a copy of an OracleConnection object

Not supported in a .NET stored procedure

Close

Closes the database connection

CreateCommand

Creates and returns an OracleCommand object associated with the OracleConnection object

CreateObjRef

Inherited from System.MarshalByRefObject

Dispose

Inherited from System.ComponentModel.Component

EnlistDistributedTransaction

Enables applications to explicitly enlist in a specified distributed transaction

Not supported in a .NET stored procedure and .NET Core

EnlistTransaction

Enables applications to enlist in a specified distributed transaction

Not supported in a .NET stored procedure

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

OpenWithNewPassword

Opens a new connection with the new password (Overloaded)

Not supported in a .NET stored procedure for context connection

PurgeStatementCache

Flushes the Statement Cache by closing all open cursors on the database, when statement caching is enabled

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

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

ToString

Inherited from System.Object

OracleConnection Events

OracleConnection events are listed in Table 6-43.

Table 6-43 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 supported in a .NET stored procedure

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