Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

C# .Net 4.0 Applications and Oracle 11g Database Resident Connection Pool

$
0
0

The 11g version of Oracle brings for the first time the "Database Resident Connection Pool" (from now “DRCP”) functionality, a connection pool that resides at Oracle instance level.

DRCP complements middle-tier connection pools (such as ADO.Net) allowing sharing connections established from different executable processes, and even from different machines. Thus achieved share connections between different instances of executable batch with monolithic code (not Multithreading) or WEB applications that run on different Web servers.

Unfortunately in my tests with 4.0 aplicaciones.Net I could not integrate this functionality of Oracle.

Further down in this post I present the technical details of the tests carried out with the aim that someone comes to do something different to make applications. Net to make use of Oracle DRCP

thanks in advance,

Alexander Wolff

 

Technical details

 

Oracle version that was used for the test:

select * from v $ version;

Oracle Database 11g Express Edition Release 11.2.0.2.0

 

I used the pool that is already preconfigured installation, just activated the pool with the following statement:

execute dbms_connection_pool.start_pool,

For applications that use the pool DRCP, I modified the tnsnames.ora file, the Oracle instance corresponding to the entry in which the test was performed.

As you can see below, the amendment was to add the string (SERVER = POOLED)



XEPooled =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP) (HOST = NBKAW) (PORT = 1521))

   (CONNECT_DATA =

     (SERVER = POOLED)

     (SERVICE_NAME =

   XE)))

 

 

Then execute an application command line C # windows. Net 4.0 ("batch") using "microsoft ADO.Net" driver to communicate with Oracle

The application successfully executed SQL statements but..unfortunately the connection was not made of DRCP pool.

This could be verified by consulting the V$CPOOL_STATS dictionary view containing pool usage statistics:

 

select NUM_REQUESTS, NUM_HITS from V $ CPOOL_STATS;

 

NUM_REQUESTSNUM_HITS

30

 

The NUM_REQUESTS field indicates the number of connections that were established Oracle (regardless of whether they took the pool or not) and NUM_HITS field indicates, how many of these connections were made through DRCP pool.

In this case the program was executed 3 times and none of them used the pool, it would have been desirable to NUM_HITS is 3 instead of 0


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>