【實驗】【Shared Server Mode】專有伺服器連線還是共享伺服器連線確認方法

secooler發表於2009-07-23
1.為比較乾淨的演示這個過程,先重啟一下資料庫
sys@ora10g> startup force;
ORACLE instance started.

Total System Global Area  562036736 bytes
Fixed Size                  2022312 bytes
Variable Size             176161880 bytes
Database Buffers          377487360 bytes
Redo Buffers                6365184 bytes
Database mounted.
Database opened.
sys@ora10g>

2.使用v$session中的server欄位就可以看出連線方式了
sys@ora10g> select server,program,status from v$session order by 1;

SERVER    PROGRAM                                          STATUS
--------- ------------------------------------------------ --------
DEDICATED oracle@testdb (q001)                             ACTIVE
DEDICATED oracle@testdb (PSP0)                             ACTIVE
DEDICATED oracle@testdb (MMAN)                             ACTIVE
DEDICATED oracle@testdb (DBW0)                             ACTIVE
DEDICATED oracle@testdb (PMON)                             ACTIVE
DEDICATED oracle@testdb (q000)                             ACTIVE
DEDICATED oracle@testdb (QMNC)                             ACTIVE
DEDICATED oracle@testdb (ARC2)                             ACTIVE
DEDICATED oracle@testdb (ARC0)                             ACTIVE
DEDICATED oracle@testdb (ARC1)                             ACTIVE
DEDICATED oracle@testdb (J000)                             ACTIVE
DEDICATED sqlplus@testdb (TNS V1-V3)                       ACTIVE
DEDICATED oracle@testdb (MMNL)                             ACTIVE
DEDICATED oracle@testdb (MMON)                             ACTIVE
DEDICATED oracle@testdb (CJQ0)                             ACTIVE
DEDICATED oracle@testdb (RECO)                             ACTIVE
DEDICATED oracle@testdb (SMON)                             ACTIVE
DEDICATED oracle@testdb (CKPT)                             ACTIVE
DEDICATED oracle@testdb (LGWR)                             ACTIVE
NONE      OMS                                              INACTIVE
NONE      OMS                                              INACTIVE
NONE      OMS                                              INACTIVE
SHARED    emagent@testdb (TNS V1-V3)                       ACTIVE

23 rows selected.

這裡可以看到,所有oralce的後臺程式都是以專有伺服器連線的方式連線資料庫的
三個OMS的狀態都是非活動狀態

3.使用共享伺服器連線連線一次後,再次檢視一次連線狀態
sys@ora10g> conn sec/sec@ora10g
Connected.
sec@ora10g> select server,program,status from v$session order by 1;

SERVER    PROGRAM                                          STATUS
--------- ------------------------------------------------ --------
DEDICATED oracle@testdb (J000)                             ACTIVE
DEDICATED oracle@testdb (PSP0)                             ACTIVE
DEDICATED oracle@testdb (MMAN)                             ACTIVE
DEDICATED oracle@testdb (DBW0)                             ACTIVE
DEDICATED oracle@testdb (LGWR)                             ACTIVE
DEDICATED oracle@testdb (CKPT)                             ACTIVE
DEDICATED oracle@testdb (SMON)                             ACTIVE
DEDICATED oracle@testdb (q001)                             ACTIVE
DEDICATED oracle@testdb (q000)                             ACTIVE
DEDICATED oracle@testdb (QMNC)                             ACTIVE
DEDICATED oracle@testdb (ARC2)                             ACTIVE
DEDICATED oracle@testdb (ARC0)                             ACTIVE
DEDICATED oracle@testdb (ARC1)                             ACTIVE
DEDICATED oracle@testdb (PMON)                             ACTIVE
DEDICATED oracle@testdb (MMNL)                             ACTIVE
DEDICATED oracle@testdb (MMON)                             ACTIVE
DEDICATED oracle@testdb (CJQ0)                             ACTIVE
DEDICATED oracle@testdb (RECO)                             ACTIVE
NONE      OMS                                              INACTIVE
NONE      OMS                                              INACTIVE
NONE      OMS                                              INACTIVE
NONE      emagent@testdb (TNS V1-V3)                       INACTIVE
SHARED    sqlplus@testdb (TNS V1-V3)                       ACTIVE
SHARED    OMS                                              ACTIVE
SHARED    emagent@testdb (TNS V1-V3)                       ACTIVE

25 rows selected.


這裡面的這一條資訊:
SHARED    sqlplus@testdb (TNS V1-V3)                       ACTIVE
就能夠看到已經使用共享伺服器方式連線到資料庫中了,同時一個OMS程式的狀態已經是活動狀態。
SHARED    OMS                                              ACTIVE


-- The End --

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

相關文章