Try userenv('SESSIONID')  to discover your own session's audsid

SQL> select userenv('SESSIONID') from dual;

USERENV('SESSIONID')
--------------------
               13591

SQL> select sid,serial#,audsid,program from v$session where audsid=13591;

       SID    SERIAL#     AUDSID  PROGRAM
---------- ---------- ----------  ------------------------------------------
        13       2904      13591  sqlplus@sunclient1 (TNS V1-V2)


Dan

-----Original Message-----
From:   Jay Strauss [SMTP:[EMAIL PROTECTED]]
Sent:   Tuesday, September 11, 2001 12:38 PM
To:     [EMAIL PROTECTED]
Subject:        This connection with DBD::Oracle

Hi,

Is there any attribute(s) of the database handle that identify the sid and
serial# of the connection?  That is, I want to use DBI to kill some sessions
(but I don't want to kill myself).

Or is there a table/view like dual that contains this session's information?

I can probably find my current session by selecting from v$session using a
combination of username, logon_time, type, program... but it seems
inelegant.

Thanks
Jay

Jay Strauss
[EMAIL PROTECTED]


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to