Solved

Process taking cpu

Posted on 2013-06-13
9
401 Views
Last Modified: 2013-06-20
Hi Gurus,

How to identified a db process is a ran away one from unix ,will there be an active session in DB for this process and what could be the value v$session.last_call_et for it?

How can we prevented a db process from running away?

Thanks
0
Comment
Question by:monto1
9 Comments
 

Assisted Solution

by:tindavid
tindavid earned 84 total points
ID: 39246871
I assume the definition of a runaway oracle process is a "oracle" owned process But unable to find a record in v$session table.  The situation is quite unusual as Oracle will always rollback if a session is disconnected from the DB session.

It will be impossible of a process doing Oracle work but not connecting to Oracle as active session.

The value of LAST_CALL_ET indicates the elapse time since last SQL command ended (in ms ?)
0
 
LVL 37

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 83 total points
ID: 39246949
a runaway process can be many things:
> an infinite loop
  this is usually a programming problem and requires some knowledge of the actual process

> an orphaned process
not sure if you actually have orphaned processes
check support.oracle.com for orphaned processes

a public link describing orphaned processes:
http://troubleshootingappsdba.blogspot.be/2008/02/orphan-processes-in-oracle-databases.html
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 333 total points
ID: 39247376
I think you need to be a little more specific in what you are asking, because I read this a little differently.  What are you trying to do?

Do you have a process on the OS side that you have identified as an Oracle session and you want to figure out what it is?  If so, then you need to look in V$PROCESS.  The SPID column will match to the OS process id, then you can join that back to V$SESSION on V$PROCESS.ADDR = V$SESSION.PADDR
0
 

Author Comment

by:monto1
ID: 39248875
I see an OS process which is using lot of  thousands of cpu secs and its an oracle process and when i map it to v$session i see the last_call_et very high and  gets incremented and the session state is active. so my question is ,is it a ran away process?will ran away process have a db session?

How can i make sure that it is not ran away and how to prevent any ran away process in oracle.

Thanks
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 333 total points
ID: 39252023
Which oracle process?  What session is it attached to?  What is the last query that it ran?

If it is a background process and your database has been up for a very long time, the fact that the process has a large number of accumulated cpu seconds is not all that out of normal.
0
 

Author Comment

by:monto1
ID: 39252094
It was a user process and was still executing with last_call_et very high along .It was running for more than a day.

 AFAIK  there should not be a db session attached for a ran away process but in this case the session was active in db.

Thanks
Syed
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 333 total points
ID: 39253020
What query is running in that process?  What is the plan for that query?  I have seen queries that run for a day that are not a problem.
0
 

Author Comment

by:monto1
ID: 39253443
That was an report query which generally runs for 10 mins but was running for more than a day ,the reason i suspected it to be ran away one was TOAD was not showing up anything in sessions tab but from sqlplus i could see a session(active) attached to the process.The plan for the query didn't change(PHV).

Regards
0
 
LVL 34

Accepted Solution

by:
johnsone earned 333 total points
ID: 39253522
If it is the same query with the same plan, then what is the session waiting for?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now