Database

Check usage resource in Oracle

Sometimes you want to check, which process that make your oracle database heavy and what program is it ?

You can use this script to check your Oracle DB process


SELECT s.status “Status”, s.serial# “Serial#”, s.TYPE “Type”, s.username
“DB User”, s.osuser “Client User”, s.server “Server”, s.machine
“Machine”, s.module “Module”, s.client_info “Client Info”, s.terminal
“Terminal”, s.ROW_WAIT_BLOCK# “Resources” ,s.program “Program”, p.program “O.S. Program”, s.logon_time
“Connect Time”, lockwait “Lock Wait”, si.physical_reads “Physical Reads”, si.block_gets “Block Gets”, si.consistent_gets
“Consistent Gets”, si.block_changes “Block Changes”, si.consistent_changes “Consistent Changes”, s.process “Process”,
p.spid, p.pid, si.sid, s.audsid, s.sql_address “Address”, s.sql_hash_value “Sql Hash”, s.action
FROM v$session s, v$process p, sys.v_$sess_io si
WHERE s.paddr = p.addr(+) AND si.sid(+) = s.sid
ORDER BY s.ROW_WAIT_BLOCK# DESC

Advertisements

Discussion

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

Twitter Updates

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: