-
my seesion id, username etc
hi all
i am using win2k/oracle 8i
when i connect to oracle i want to know my sessionid etc.
i don't want to use
terminal=?
osuser = ? etc.
by
-
Code:
select userenv('sessionid') from dual;
or
Code:
select sys_context('userenv','sessionid') from dual;
Last edited by SANJAY_G; 07-18-2003 at 02:42 AM.
Sanjay G.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
-
there is a table called v$session
u can give like this
select sid,serial#,username,machine,terminal from v$session where username='Ur username';
u will get ur session id details.
Eat , Drink & Enjoy life -
pravin_kini@hotmail.com
-
Originally posted by pravin
there is a table called v$session
u can give like this
select sid,serial#,username,machine,terminal from v$session where username='Ur username';
u will get ur session id details.
What if there are multiple sessions for same username??
Sanjay G.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
-
if multiple sessions are connected from same username then the sid and serial# various.
-
Originally posted by shashikumar
if multiple sessions are connected from same username then the sid and serial# various.
True. But read the original question again.
Sanjay G.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
-
If you only need sid, I use:
select sid from V$mystat where rownum =1;
-
Originally posted by sysdba
If you only need sid, I use:
select sid from V$mystat where rownum =1;
that if you have the privilege which by default you dont
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
|