[20130730]11G的DRCP特性.txt
[20130730]11G的DRCP特性.txt
Database Resident Connection Pool (DRCP) in Oracle Database 11g Release 1
The database resident connection pool (DRCP) reduces the resource requirements of applications that currently don't
support connection pooling, either because it is not supported by the application infrastructure, or it has not been
implemented. The pool is managed using the DBMS_CONNECTION_POOL package. Although the package appears to support multiple
connection pools, the document states that it currently only supports the default pool name (SYS_DEFAULT_CONNECTION_POOL).
The DRCP is started and stopped using the START_POOL and STOP_POOL procedures respectively.
--參考以上鍊接做一些測試:
--以sys使用者啟動。
SQL> execute dbms_connection_pool.start_pool;
PL/SQL procedure successfully completed.
$ ps -ef | grep -e ora_l0 -e ora_n0 | grep -v grep
503 26281 1 0 15:49 ? 00:00:00 ora_n000_test
503 27178 1 0 16:04 ? 00:00:00 ora_l000_test
503 27180 1 0 16:04 ? 00:00:00 ora_l001_test
503 27182 1 0 16:04 ? 00:00:00 ora_l002_test
503 27184 1 0 16:04 ? 00:00:00 ora_l003_test
ora_n000_XXX => Connection Broker Process
ora_l000_XXX => Pooled Server Process(Handles client requests in Database Resident Connection Pooling)
--使用ezconnect建立OK。
sqlplus scott/xxxx@192.168.100.XXX:1521/test.com:pooled
--也修改tnsnames.ora檔案,加入如下:
testpool =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.XXX)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test.com)
(SERVER=pooled)
~~~~~~~~~~~~~~~
)
)
--按照文件介紹,If a session remains idle for longer than the inactivity_timeout it is killed to free up space in the connection pool.
PL/SQL procedure successfully completed.
--INACTIVITY_TIMEOUT=300秒,如果300秒就會退出。
--做一個事務,等待300秒看看:
SQL> create table t ( a number);
Table created.
SQL> insert into t values (1);
1 row created.
SQL> select sysdate from dual ;
select sysdate from dual
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 27182
Session ID: 13 Serial number: 349
--重新登入,發現斷開連線時使用的是rollback。
SQL> select * from t;
no rows selected
--可以修改引數,例子:
exec dbms_connection_pool.alter_param( POOL_NAME=>'SYS_DEFAULT_CONNECTION_POOL', PARAM_NAME=>'INACTIVITY_TIMEOUT', PARAM_VALUE=>'1000');
PL/SQL procedure successfully completed.
--停止drcp使用。
SQL> execute dbms_connection_pool.stop_pool;
Database Resident Connection Pool (DRCP) in Oracle Database 11g Release 1
The database resident connection pool (DRCP) reduces the resource requirements of applications that currently don't
support connection pooling, either because it is not supported by the application infrastructure, or it has not been
implemented. The pool is managed using the DBMS_CONNECTION_POOL package. Although the package appears to support multiple
connection pools, the document states that it currently only supports the default pool name (SYS_DEFAULT_CONNECTION_POOL).
The DRCP is started and stopped using the START_POOL and STOP_POOL procedures respectively.
--參考以上鍊接做一些測試:
SQL> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
--以sys使用者啟動。
SQL> execute dbms_connection_pool.start_pool;
PL/SQL procedure successfully completed.
$ ps -ef | grep -e ora_l0 -e ora_n0 | grep -v grep
503 26281 1 0 15:49 ? 00:00:00 ora_n000_test
503 27178 1 0 16:04 ? 00:00:00 ora_l000_test
503 27180 1 0 16:04 ? 00:00:00 ora_l001_test
503 27182 1 0 16:04 ? 00:00:00 ora_l002_test
503 27184 1 0 16:04 ? 00:00:00 ora_l003_test
ora_n000_XXX => Connection Broker Process
ora_l000_XXX => Pooled Server Process(Handles client requests in Database Resident Connection Pooling)
--使用ezconnect建立OK。
sqlplus scott/xxxx@192.168.100.XXX:1521/test.com:pooled
--也修改tnsnames.ora檔案,加入如下:
testpool =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.XXX)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test.com)
(SERVER=pooled)
~~~~~~~~~~~~~~~
)
)
--按照文件介紹,If a session remains idle for longer than the inactivity_timeout it is killed to free up space in the connection pool.
SQL> exec print_table('select * from dba_cpool_info');
CONNECTION_POOL : SYS_DEFAULT_CONNECTION_POOL
STATUS : ACTIVE
MINSIZE : 4
MAXSIZE : 40
INCRSIZE : 2
SESSION_CACHED_CURSORS : 20
INACTIVITY_TIMEOUT : 300
MAX_THINK_TIME : 120
MAX_USE_SESSION : 500000
MAX_LIFETIME_SESSION : 86400
NUM_CBROK : 1
MAXCONN_CBROK : 40000
-----------------
PL/SQL procedure successfully completed.
--INACTIVITY_TIMEOUT=300秒,如果300秒就會退出。
--做一個事務,等待300秒看看:
SQL> create table t ( a number);
Table created.
SQL> insert into t values (1);
1 row created.
SQL> select sysdate from dual ;
select sysdate from dual
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 27182
Session ID: 13 Serial number: 349
--重新登入,發現斷開連線時使用的是rollback。
SQL> select * from t;
no rows selected
--可以修改引數,例子:
exec dbms_connection_pool.alter_param( POOL_NAME=>'SYS_DEFAULT_CONNECTION_POOL', PARAM_NAME=>'INACTIVITY_TIMEOUT', PARAM_VALUE=>'1000');
SQL> exec scott.print_table('select * from dba_cpool_info');
CONNECTION_POOL : SYS_DEFAULT_CONNECTION_POOL
STATUS : ACTIVE
MINSIZE : 4
MAXSIZE : 40
INCRSIZE : 2
SESSION_CACHED_CURSORS : 20
INACTIVITY_TIMEOUT : 1000
MAX_THINK_TIME : 120
MAX_USE_SESSION : 500000
MAX_LIFETIME_SESSION : 86400
NUM_CBROK : 1
MAXCONN_CBROK : 40000
-----------------
PL/SQL procedure successfully completed.
--停止drcp使用。
SQL> execute dbms_connection_pool.stop_pool;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-767493/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g 新特性之DRCPOracle
- [20170824]11G備庫啟用DRCP連線.txt
- [20170825]11G備庫啟用DRCP連線3.txt
- Oracle 11g DRCP配置與使用(上)Oracle
- Oracle 11g DRCP配置與使用(下)Oracle
- Oracle 11g DRCP連線跟蹤配置Oracle
- Oracle 11g DRCP連線方式——基本原理Oracle
- [20131017]11G下truncate的新特性.txt
- DRCP總結
- [20111220]listagg 11G的新特性.txt
- 11G DRCP(Database Resident Connection Pooling)的一些問題DatabaseIDE
- oracle 11g 的新特性Oracle
- 【ORACLE新特性】11G 分割槽新特性Oracle
- Oracle 11g 新特性Oracle
- oracle 11g中的 oracle restart特性OracleREST
- 11g data guard 新特性
- 11g新特性--active dataguard
- 11G新特性:FLASHBACK ARCHIVEHive
- Oracle 11g 鎖特性增加Oracle
- 11g Dataguard中的snapshot standby特性
- oracle 11g中的snapshot standby特性Oracle
- 11G新特性,待定的統計資訊
- 11G Flashback Data Archive新特性的研究Hive
- [20170410]11G ora_sql_txt是否有效.txtSQL
- goldengate 11g patch set 1的新特性Go
- Oracle 11g的新特性分割槽:System PartitionOracle
- 11g新特性:Pending Statistics
- Oracle 11g 新特性簡介Oracle
- 11g 新特性—— Active Database DuplicationDatabase
- Oracle 11g新特性:Result CacheOracle
- 11g新特性--result caching
- Oracle 11g 新特性(轉載)Oracle
- 11G新特性:FLASHBACK ARCHIVE - 01Hive
- 11G新特性:FLASHBACK ARCHIVE – 02Hive
- Oracle 11g新特性之SecureFilesOracle
- 11g新特性:不可視索引索引
- 11g新特性--pending statistics
- 新特性:/dev/shm對Oracle 11g的影響devOracle