Open
This method opens a connection to an Oracle database.
Declaration
// C# public overide void Open();
Implements
IDbConnection
Exceptions
ObjectDisposedException
- The object is already disposed.
InvalidOperationException
- The connection is already opened or the connection string is null or empty.
OracleException
– For token authentication, errors include "ORA-25707: The token is invalid.", "ORA-25708: The token has expired.", and "ORA-50109: Configuration for token-based authentication is invalid."
Remarks
The connection is obtained from the pool if connection pooling is enabled. Otherwise, a new connection is established.
It is possible that the pool does not contain any unused connections when the Open()
method is invoked. In this case, a new connection is established.
If no connections are available within the specified connection timeout value, when the Max
Pool
Size
is reached, an OracleException
is thrown.
For client-side validation of an access token:
-
The access token must be 16KB bytes or less.
-
There needs to be two periods, "
.
". -
It must be valid base 64.
-
It must be valid JSON.
-
There must be "sub" and "exp" claims.
The opened connection will have same AutoCommit
property value as set by the application.
If the opened connection enlists in a distributed transaction, auto-commit will be disabled regardless of the AutoCommit
value. Once that transaction completes, auto-commit functionality resets to the AutoCommit
value.
The opened connection has the same IsolationLevel
value as set by the application. If that connection enlists in a distributed transaction created using TransactionScope
, then the application’s IsolationLevel
value is overridden. The connection object’s IsolationLevel
remains overridden once that transaction is over.