Custom Search : Technical Guides Sybase Oracle UNIX Javascript

Technical Guides

Of Interest

Be responsible for your future
Enter the USA legally!

Visa, Green Card, Citizenship, Passport
Consultation Services

Oracle » Monitoring » Tools »

What is going on in the database?


This SQL will display the commands that are currently executing.

set serverout on size 999999

set linesize 155

dbms_output.put_line(' ');
dbms_output.put_line('------------- Start report for waiting sessions with current SQL ---------------');
for x in (select vs.inst_id, vs.sid || ',' || vs.serial# sidser, vs.sql_address, vs.sql_hash_value,
vs.last_call_et, vsw.seconds_in_wait, vsw.event, vsw.state
from gv$session_wait vsw, gv$session vs
where vsw.sid = vs.sid
and vsw.inst_id = vs.inst_id
and vs.type <> 'BACKGROUND'
and vsw.event NOT IN ('rdbms ipc message'
,'smon timer'
,'pmon timer'
,'SQL-Net message from client'
,'lock manager wait for remote message'
,'ges remote message'
,'gcs remote message'
,'gcs for action'
,'client message'
,'pipe get'
,'Null event'
,'PX Idle Wait'
,'single-task message'
,'PX Deq: Execution Msg'
,'KXFQ: kxfqdeq - normal deqeue'
,'listen endpoint status'
,'slave wait'
,'wakeup time manager'))
dbms_output.put_line('Event WaitState InstID SidSerial LastCallEt SecondsInWait');
dbms_output.put_line('------------------------- -------------------- ------ ----------- ---------- -------------');
dbms_output.put_line(rpad(x.event,25) ||' '|| rpad(x.state,20) ||' '|| lpad(x.inst_id,6) ||' '|| lpad(x.sidser,11) ||'
'|| lpad(x.last_call_et,10) ||' '|| lpad(x.seconds_in_wait,13));
dbms_output.put_line(' SQLText ');
for y in (select sql_text
from gv$sqltext
where address = x.sql_address
and hash_value = x.sql_hash_value
and inst_id = x.inst_id
order by piece)
end loop;
end loop;
dbms_output.put_line('-------------- End report for sessions waiting with current SQL ----------------');
dbms_output.put_line(' ');

Oracle : Related Topics

Oracle : Monitoring : Version information
Oracle : Monitoring : List free and used space in database
Oracle : Monitoring : List session information
Oracle : Monitoring : List names and default storage parameters for all tablespaces
Oracle : Monitoring : List information about tablespace to which datafiles belong
Oracle : Monitoring : List data file information
Oracle : Monitoring : List tablespace fragmentation information
Oracle : Monitoring : Check the current number of extents and blocks allocated to a seg
Oracle : Monitoring : Extent information
Oracle : Monitoring : Extent information for a table
Oracle : Monitoring : List segments with fewer than 5 extents remaining
Oracle : Monitoring : List segments reaching extent limits
Oracle : Monitoring : List table blocks, empty blocks, extent count, and chain block count
Oracle : Monitoring : Information about all rollback segments in the database
Oracle : Monitoring : Statistics of the rollback segments currently used by instance
Oracle : Monitoring : Active sorts in instance
Oracle : Monitoring : Index & constraint information
Oracle : Monitoring : List tables and synonyms
Oracle : Monitoring : Constraint columns
Oracle : Monitoring : Constraint listing
Oracle : Monitoring : Indexed column listing
Oracle : Monitoring : Trigger listing
Oracle : Monitoring : Tuning: library cache
Oracle : Monitoring : Tuning: data dictionary cache
Oracle : Monitoring : Tuning: buffer cache
Oracle : Monitoring : Tuning: sorts
Oracle : Monitoring : Tuning: rollback segments
Oracle : Monitoring : Tuning: physical file placement
Oracle : Monitoring : Archive Log Mode Status
Oracle : Monitoring : List log file information
Oracle : Monitoring : A Simple Monitoring Tool
Oracle : Monitoring : Connection Errors
Oracle : Monitoring : List Space Allocated by Table
Oracle : Monitoring : Tablespace types, and availability of data files
Oracle : Monitoring : List sessions with active transactions
Oracle : Monitoring : Tuning: dynamic extension
Oracle : Monitoring : Check the extents for a given segment
Oracle : Monitoring : Explain Plan: syntax

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site

Get the latest Rocket99 news and tech tips via

Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site

Copyright © 2019 Stoltenbar Inc All Rights Reserved.