了解Maclean Liu|向Maclean Liu提问 Oracle ALLSTARS 全明星(群内有多位Oracle高级售后support,N位OCM和ACE) QQ群 # QQ群号:23549328 # 已经升级到 2000人群,空位多多。欢迎有一定基础的Oracle骨友加入,现在入群需要经过Maclean的技术面试,欢迎面试,请加QQ号:47079569 为好友参加面试 2群基础群 适合刚入门的同学,会共享最佳入门实践和资料 QQ群 # QQ群号:171092051 # 已经升级到 500人的超级群,空位多多,无需面试

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';

posted on 2013-03-19 00:47  Oracle和MySQL  阅读(134)  评论(0编辑  收藏  举报

导航