Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

UX-process info vs. ORA-session info

SOLVED
Go to solution
rbiorn
Advisor

UX-process info vs. ORA-session info

Hello!
I need a SELECT statement to combine UX-process information with ORA-session information. I'am trying to use v$process and v$session, but I don't seem to find the field to combine the tables. Are there any other tables to use?

Rgds Ragnar
"You cannot achieve anything beyond your wildest dreams --- if you don't have any wild dreams"
7 REPLIES
Madhu Sudhan_1
Respected Contributor

Re: UX-process info vs. ORA-session info

Ragnar,
I think this is the one you are looking for.

select SID,PROCESS,SERIAL#,OSUSER from v$session;

Where PROCESS is OS process id, OSUSER is OS User.

Thanks,
Madhu
Think Positive
T G Manikandan
Honored Contributor

Re: UX-process info vs. ORA-session info

Graham Cameron_1
Honored Contributor
Solution

Re: UX-process info vs. ORA-session info

I don't think Madhu is correct.
If you want the UNIX PID, it comes from the SPID col of v$session.

Here's a contributed script which may do what you want:

select ' Sid, Serial#, Aud sid : '|| s.sid||' , '||s.serial#||' , '||
s.audsid||chr(10)|| 'DB User / OS User : '||s.username||
' / '||s.osuser||chr(10)|| ' Machine - Terminal : '||
s.machine||' - '|| s.terminal||chr(10)||
' OS Process Ids : '||
s.process||' (Client) '||p.spid||' (Server)'|| chr(10)||
' Client Program Name : '||s.program "Session Info"
from v$process p,v$session s
where p.addr = s.paddr
/

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
rbiorn
Advisor

Re: UX-process info vs. ORA-session info

Thank you Graham!
You have given me the two fields I was looking for. ADDR from V$PROCESS and PADDR from V$SESSION. I can now author the SELECT statement to my liking. Thanks again.

Rgds Ragnar
"You cannot achieve anything beyond your wildest dreams --- if you don't have any wild dreams"
Madhu Sudhan_1
Respected Contributor

Re: UX-process info vs. ORA-session info

Graham,
:) Thanks ! Getting to know the databases.

-Madhu
Think Positive
Madhu Sudhan_1
Respected Contributor

Re: UX-process info vs. ORA-session info

I love this fourm. Somehow I couldn't participate in this forum for sometime. Now Iam back to learn.

Thanks Graham Again. !!!
-Madhu
Think Positive
Arturo Galbiati
Esteemed Contributor

Re: UX-process info vs. ORA-session info

Hi Ragnar,
I've the same problem in the past and I've develloped this Unix script that shows me all the activities done at Oracle level by a unix pid.
Feel free to chnage it as you prefer.
In case you will foind some error, please, could you notify them to me?
TIA.
Art