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.”, and “ORA-25708: The token has expired.”

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.