Script:诊断MTS shared server

Script:诊断MTS shared server,以下脚本用于诊断Oracle MTS shared server共享服务器模式会话:

 

 

  set linesize 120 pagesize 1400
  col name for a30
  col value for a70

 select name,value
   from v$system_parameter
  where name in ('dispatchers',
                 'max_dispatchers',
                 'max_shared_servers',
                 'shared_server_sessions',
                 'shared_servers');

SELECT MAXIMUM_CONNECTIONS "MAX CONN",
       MAXIMUM_SESSIONS    "MAX SESS",
       SERVERS_STARTED     "STARTED",
       SERVERS_TERMINATED  "TERMINATED",
       SERVERS_HIGHWATER   "HIGHWATER"
  FROM V$SHARED_SERVER_MONITOR;

SELECT NAME "NAME", PADDR, REQUESTS, (BUSY/(BUSY + IDLE)) * 100 "%TIME BUSY", STATUS  FROM V$SHARED_SERVER;

SELECT SADDR, CIRCUIT, DISPATCHER, SERVER, SUBSTR(QUEUE,1,8) "QUEUE", WAITER FROM V$CIRCUIT;

SELECT D.NAME,
       Q.QUEUED,
       Q.WAIT,
       Q.TOTALQ,
       DECODE(Q.TOTALQ, 0, 0, (Q.WAIT / Q.TOTALQ) / 100) "AVG WAIT"
  FROM V$QUEUE Q, V$DISPATCHER D
 WHERE D.PADDR = Q.PADDR;

 SELECT SERVER,
        SUBSTR(USERNAME, 1, 15) "USERNAME",
        SUBSTR(OSUSER, 1, 8) "OS USER",
        SUBSTR(MACHINE, 1, 7) "MACHINE",
        SUBSTR(PROGRAM, 1, 35) "PROGRAM"
   FROM V$SESSION
  WHERE TYPE = 'USER';

Comment

*

沪ICP备14014813号-2

沪公网安备 31010802001379号