configure shared server

shiyihai發表於2008-06-02

Required parameter:dispatchers
optional parameters:
shared_servers、max_shared_servers、circuits、shared_server_sessions
這5個引數均是動態引數,可以動態修改。

[@more@]

DISPATCHERS = “(PROTOCOL=TCP)(DISPATCHERS=2)(PROTOCOL=IPC)(DISPATCHERS=1)”
dispatchers的屬性值中還可以有如下引數
service:dispatcher註冊的net service name,沒有給出採用services_name中的;
listener:監聽動態註冊,非預設埠1521或沒有在local_listener中給出時需使用;
sessions:每個dispacther的會話數
connections:每個dispacther連線數

透過查詢v$circuit看是否使用到dispacther,也即是否是shared server模式,
另外也可透過lsnrctl services來檢視是否shared server模式。
SQL> alter system set circuits=8;

System altered.

SQL> alter system set max_shared_servers=8
2 ;

System altered.

SQL> alter system set shared_servers=8;

System altered.

SQL> alter system set max_dispatchers=8;

System altered.

SQL> alter system set dispatchers='(PROTOCOL=TCP) (SERVICE=racdb1XDB) (PROTOCOL=TCP) (SERVICE=racdb1)';

System altered.

SQL> select count(*) from v$circuit;

COUNT(*)
----------
1

SQL>
SQL> show parameter disp

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=racdb1
XDB) (PROTOCOL=TCP) (SERVICE=r
acdb1)
max_dispatchers integer 8
SQL> show parameter shared_serv

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_shared_servers integer 8
shared_server_sessions integer
shared_servers integer 8
SQL>

監聽的services狀態中有如下資訊:
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.168)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "racdb1" has 2 instance(s).
Instance "racdb1", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "racdb1", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:3 refused:0 state:ready
LOCAL SERVER
"D000" established:1 refused:0 current:1 max:1022 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.ocm.com)(PORT=33253))
Service "racdb1XDB" has 1 instance(s).
Instance "racdb1", status READY, has 0 handler(s) for this service...
Service "racdb1_XPT" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:3 refused:0 state:ready
LOCAL SERVER
The command completed successfully
LSNRCTL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-1004985/,如需轉載,請註明出處,否則將追究法律責任。

相關文章