Solved

Process taking cpu

Posted on 2013-06-13
9
407 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 35

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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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 35

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 35

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 35

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creation date for a PDB 5 80
Oracle function to insert records? 15 81
Migration from sql server to oracle 5 50
Oracle Join issue. 3 47
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

732 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