Avatar of Jayesh Acharya
Jayesh Acharya
Flag 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 ...

Oracle Database

Avatar of undefined
Last Comment

8/22/2022 - Mon

SID:    select sys_context('USERENV','SID') from dual;

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

You may also have a v$mystat and v$sesstat view, depending on which catalog views / synonyms exist in your db.

Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck