Do You PHP はてブロ

Do You PHPはてなからはてブロに移動しました

DRCPの紹介記事

Oracleから離れてしばらく経ちますが。。。Oracle11gの新機能紹介記事にDRCPの解説があります。


Oracle Database 11g comes preinstalled with a default connection pool but it is shut down. To start it, use:

execute dbms_connection_pool.start_pool;

うーん。これはインスタンス起動時に有効になるのかなぁ。
これがクリアできれば、

Now to connect to the pooled connections instead of a regular session, all you have to do is add a line (SERVER=POOLED) to the TNS entry as shown below:

PRONE3_POOL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = prolin3.proligence.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = POOLED)
(SID = PRONE3)
)
)
Now change the connect string in the code where it connects to the database. Using the example code shown in the above section on Client-Side Result Cache:

private String jdbcURL = "jdbc:oracle:oci8:@PRONE3_POOL";
That's it. Now your apps will connect to the pool instead of the server. If you use thin client and use the standard JDBC connection string, you can use the POOLED clause:

prolin3. proligence.com:1521/PRONE3:POOLED

と、TNSレベルの話になりそうです。