Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Process running within Oracle?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello

Could someone tell me how I can find out if a process we have is still running within oracle?

Is there some SQL that can do this or is it through unix with a ps -ef | grep <name of process>??

Thanks

Thiko!
 
If you know what the unix pid is/was, you can run this query...
select s.username, s.osuser, s.status, s.sid, s.serial#, p.pid
from v$session s, v$process p
where s.paddr = p.addr
and p.spid = &system_id;

If you get a return sid, the process is still running. (be sure you aren't using the parent pid process, but the unix pid that corresponded to the sqlplus child process).
 
Hi,

Try this query from sql prompt.

Select sid,serial#,substr(machine,1,20) from v$session where status = 'ACTIVE' ;

It will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top