-
O/S Process
How can I get the SID from an O/S process on UNIX??
E.g my O/S pid id is 1234, how can I find out the sid???
Thanks in advance
-
just bring up OEM's dbastudio. problem solved.
And don't say you don't have OEM if you have the Oracle Product you have OEM go find it
Oracle it's not just a database it's a lifestyle!
--------------
BTW....You need to get a girlfriend who's last name isn't .jpg
-
Thank you for reply. What are the way to find it without OEM??
No good sometime if too rely on OEM
-
You will need to connect to a database for that. You can query the v$session table.
-
Thomasp,
Could u be more specific how i could use the OS process ID to get the oracle session id from v$session???
thanx
-
If u are in oracle then
select sid,serial#,osuser,username,status
from v$session;or goto .profile u can see oracle sid in unix.in unix
u get your sid by ps -ef |grep login_id , Just check the syntax.
I hope it will solve your problem.
Last edited by jaya111; 11-18-2004 at 11:11 PM.
-
If OS user => oracle
what is the OS "login_id" related on this?? What happen if there is a lot of oracle user connection in the database?? so from the v$session you can see a lot of osuser & we are not able to identified from v$session..
-
Code:
$ ps -ef |grep $ORACLE_SID
dbadmin 1441896 1060872 0 10:19:33 - 0:00 oracledbatest9 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
$ sqlplus /
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Nov 19 10:21:31 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
SQL> set linesize 132
SQL> select s.username,s.osuser,s.sid,s.serial#, p.spid UNIX_PID
from v$session s, v$process p
where p.addr = s.paddr and
p.spid = &pid ;
Enter value for pid: 1441896
old 4: p.spid = &pid
new 4: p.spid = 1441896
USERNAME OSUSER SID SERIAL# UNIX_PID
------------------------------ ------------------------------ ---------- ---------- ------------
OPS$DBADMIN dbadmin 10 3106 1441896
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|