Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue in OracleConnection.ClearPool() while upgrading from Oracle12c to Oracle19c

73f0f6a7-281c-443e-8ee2-877e99fa829dSep 11 2020 — edited Sep 11 2020

We are in a process of upgrading our Oracle12c to Oracle 19c. while doing so we are facing issue when we clear the connection pool.

Below are the client dll version (Oracle.DataAccess.dll)

  • 12c - 4.122.1.0
  • 19c - 4.122.19.1

refer below code snippet, same code is clearing the connection pool with 12c oracle client dll but it's not working with 19c oracle client. tried debugging the dlls using reflactor and found that there is a slight change in implementation of ClearPool method between those 2 versions. Can anyone help - what would be equivalent code in oracle 19c? Is there any additional parameter needs to be set for 19c? in below code when ClearPool method gets called a connection created by that user in v$session is gone in 12c but the same does not work in 19c

select * from v$session where username = 'XYZ' -- user for which the connection was created

Code Snippet:

public bool ClearConnectionPool(ref string connectioString)
  
{
  bool flag
= false;
  OracleConnection objConn
;
  try
  
{
  objConn
= new OracleConnection(connectioString);
  OracleConnection
.ClearPool(objConn);

  flag
= true;
  
}
  catch
(InvalidOperationException iex)
  
{
  ExceptionHelper
.HandleException(iex);
  flag
= false;
  
}
  catch
(Exception ex)
  
{
  ExceptionHelper
.HandleException(ex);
  flag
= false;
  
}

  
return flag;
  
}

Comments
Post Details
Added on Sep 11 2020
0 comments
316 views