Database Hung due to CPU utilization [message #409203] |
Sat, 20 June 2009 06:56 |
balaji1482
Messages: 312 Registered: July 2007 Location: INDIA
|
Senior Member |
|
|
Hi all,
I have a question which i would like to ask you.
Say for example ,my database got hanged.The reason was ,a session has 100% CPU utilization .What could be the solution for this?
Should i kill the session or something else?
Thanks in advance
|
|
|
|
|
Re: Database Hung due to CPU utilization [message #409246 is a reply to message #409203] |
Sun, 21 June 2009 02:13 |
amitzil
Messages: 9 Registered: June 2009
|
Junior Member |
|
|
Hi,
It's not that easy to reduce the CPU, since there are many reasons for high CPU usage (it can be very utilized SQL, latch problem, Oracle bug, etc.)
First, try to find the problematic session and what it does (assuming you're running linux and have the process id):
select sid,
username,
program,
machine,
sql_id,
event,
p1,
p2
from v$session
where paddr = (select addr from v$process where spid=<process_id>);
Execute this several times with the id of the process that consumes the CPU, paste the output (especially the event)
You can also find the SQL text from v$sql using the sql_id from the query.
This will help us to analyze the problem.
Liron Amitzi
Senior DBA consultant
[Updated on: Sun, 21 June 2009 02:36] by Moderator Report message to a moderator
|
|
|
|