How To Deal With Pooling In Oracle

This article deals with connection string related to pooling mechanism in oracle.
  • 2822

Pooling parameters

Pooling is done to to avoid the making of new connections every time an object has to make a connection to a database. The command given below makes use of the Connection String property to identify the pool.

Data Source=myOracle;User Id=Username;Password=user_Password;Min Pool Size=20;Connection Lifetime=240;Connection Timeout=120;Incr Pool Size=7;Decr Pool Size=2;

NOTE: By default connection pooling is enabled.

The Incr Pool Size determines the number of new connections to be made when they are required. The Decr Pool Size determines the maximum number of connections that can be closed every 3 minutes. (3 minutes is by default)

Pool size Restriction

The string given below is used for restricting the maximum size of the pool.

Data Source=myOracle;User Id=Username;Password=user_Password;Max Pool Size=50;Connection Timeout=100;
 
NOTE: If the max pool size has been utilized then connection pooling service waits for a specific time as specified by the Connection Timeout attribute.

Disable Pooling

The command given below is used for disabling the pool.

Data Source=myOracle;User Id=Username;Password=user_Password;Pooling=False;

Further Readings

You may also want to read these related articles.

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.