Solved

Process taking cpu

Posted on 2013-06-13
9
404 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
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.

 

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
 
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

Suggested Solutions

Title # Comments Views Activity
oracle 11g 23 106
selective queries 7 37
Can anyone please tell me what does below Stored Procedure does? 4 33
having some issue on pl sql procedure 1 23
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

808 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