Link to home
Start Free TrialLog in
Avatar of Jayesh Acharya
Jayesh AcharyaFlag for United States of America

asked on

find out what SID and SERIAL# i am 10g when i connect

is there a simple way for me to know what
sid / serial # i am when i connect to oracle.

Currently The same user id will connect a few times and will connect using the same program

I am really trying to find out if I can get the information from sys.v_$session, but i want it for the session I am currently connected to.

I was going to record this information in a log, so that if I have an issue with a process that was developed, I would be able to quickly look for the SID and Serial# to use the ALTER SYSTEM KILL SESSION '$SID,&SERIAL' command.

Any help would be apprecieated ...

Avatar of mrjoltcola
mrjoltcola
Flag of United States of America image

SID:    select sys_context('USERENV','SID') from dual;
SOLUTION
Avatar of mrjoltcola
mrjoltcola
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You may also have a v$mystat and v$sesstat view, depending on which catalog views / synonyms exist in your db.

http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2098.htm
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial