Oracle 11g 10g Database SQL Script to Find Out Active Sessions Waits

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
This script outputs the current wait states for all active database sessions.
COLUMN dbusername FORMAT A12
COLUMN osuser FORMAT A12
COLUMN sid FORMAT 999999
COLUMN OS_pid FORMAT 999999
COLUMN serial# FORMAT 99999999
COLUMN wait_class FORMAT A12
COLUMN state FORMAT A17
COLUMN logon_time FORMAT A19
SET LINESIZE 250
SET PAGESIZE 500
SELECT NVL(sess.username, 'OracleSess') dbusername,
       sess.osuser,
       sess.sid,
       sess.serial#,
       proc.spid OS_pid,
       sess.seconds_in_wait,
       sess.wait_class,
       sess.blocking_session,
       sess.blocking_session_status,
       sess.module,
       TO_CHAR(sess.logon_Time,'DD-MON-YYYY HH24:MI:SS') logon_time
FROM   v$session sess, v$process proc
WHERE  sess.paddr  = proc.addr
AND    sess.status = 'ACTIVE'
ORDER BY 1, 2;

_____________________________________________________________________________________________________________________

A visitor from Amiens viewed 'Use of Expdp Impdp nologfile=y' 15 mins ago
A visitor from Northampton viewed 'How to Exclude MLOG$ Materialized View Log Tables ' 28 mins ago
A visitor from Ibadan viewed 'How to Configure Tablespace / Monitoring Alert Ema' 39 mins ago
A visitor from Gloucester viewed 'How to Enable or Disable the Supplemental Logging ' 1 hr 30 mins ago
A visitor from Alcaudete viewed 'How to Find out / Check SGA and PGA size of Oracle' 1 hr 33 mins ago

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-25 All Rights Reserved | Site Map | Contact | Disclaimer