Home » RDBMS Server » Server Administration » Howto relate dba_jobs table jobno with processid
Howto relate dba_jobs table jobno with processid [message #146387] Thu, 10 November 2005 02:42 Go to next message
francoisadt
Messages: 1
Registered: November 2005
Junior Member
Howto relate dba_jobs table jobno with processid:
==================================================
I have a problem with process running and not able to kill
them properly.

In Enterprise Manager(EM) I viw all instances of a user SUPER.
This user is the user we as developers can login but also
the user an oracle process is execute/running under.

So in EM I see list of all process running as SUPER.
Of all the users SUPER I go down the list and see which
machine is loged in and the query. When all is done
their was no query/procedure that is running under
DBA_JOBS showing in Enterprise Manager, but
when I query select jobno, this_sex, last_sec, what from dba_jobs
I still see this processes running since yesterday.
and the this_sec column showing 03:00:05.

How can I query from tables to know
what sid, serial, psid ect.. is the job no column
for a what in dba_jobs table.

I'm not DBA , but an advanced Developer, so I need to do
maintenance of these processes.

I search internet but to no avail. Most queries
assume that the program name will indicate the sid, serial
but I can't just kill a user session of SUPER
under Linux if I don not know exact which one
of the what value on the dba_jobs table
for a jobno in dba_jobs is the serial, sid, spid
ect..

I found a qry on the internet:
SELECT p.spid "OS Th", b.name "Name-User", s.osuser,
s.program, s.terminal
FROM v$process p, v$session s, v$bgprocess b
WHERE p.addr = s.paddr
AND p.addr = b.paddr
UNION ALL
SELECT p.spid "OS Th", s.username "Name-User",
s.osuser, s.program, s.terminal
FROM v$process p, v$session s
WHERE p.addr = s.paddr
AND s.username IS NOT NULL
ORDER BY 2 ASC

How do I then know which job from dba_jobs table
is the OS Thread , is the spid?

Is their a query table one can link the dba_jobs
table with this query above??

Please help. I run out of time and processes, killing
starting, can't compile a procedure becuase of active
process of what(procedure) keeps be busy whole week.
Re: Howto relate dba_jobs table jobno with processid [message #146851 is a reply to message #146387] Mon, 14 November 2005 03:56 Go to previous message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Use the following query to identify currently running jobs:

SELECT r.sid, r.job, r.this_date, r.this_sec, SUBSTR(what,1,40) what
FROM dba_jobs_running r,dba_jobs j
WHERE r.job = j.job;

Now use this sid value in your query to identify the process.

--Girish
Previous Topic: Can't change character set in oracle10g
Next Topic: strange issue ....!!!
Goto Forum:
  


Current Time: Fri Jan 10 12:41:40 CST 2025