I tried this and DID NOT work(metalink is wrong about this)=20
it returns SYS's sessionid always...
so i use the following..
WHERE username =3D user
and logon_time =3D (select max(logon_time) from sys.v_$session where
username=3Duser)
> ----------
> From: Schoen Volker[SMTP:v.schoen_at_inplan.de]
> Sent: Friday, September 22, 2000 3:13 PM
> To: 'Vergara, Michael (TEM)'; 'Oracle DBA List (Quickdoc)'
> Subject: AW: Anybody ever tried to use ON_LOGON triggers?
>=20
> Hi Mike,
>=20
> try to select the infos from v$session, I think it should work, =
haven't
> tested it with logon trigger, but with normal trigger.
>=20
> select SID,SERIAL# from v$session where audsid =3D =
userenv('SESSIONID');
>=20
> Regards
>=20
> Volker Sch=F6n
> E-Mail: mailto:v.schoen_at_inplan.de
> http://www.inplan.de
>=20
>=20
>=20
> -----Urspr=FCngliche Nachricht-----
> Von: Vergara, Michael (TEM) [mailto:mvergara_at_guidant.com]
> Gesendet: 21. September 2000 19:51
> An: 'Oracle DBA List (Quickdoc)'
> Betreff: Anybody ever tried to use ON_LOGON triggers?
>=20
>=20
> Hi DBAs!
>=20
> I experimenting with ON_LOGON triggers, learning about them as a step
> in setting up a 'Virtual Private Database' in Oracle 8i. However,=20
> I cannot get something to work.
>=20
> I'm trying to get the user's session id from within the trigger. =
I've
> tried to use SYS_CONTEXT('USERENV','SESIONID') and=20
> USERENV('SESSIONID') and both return '0' from within the trigger. =
Now
> since this is an 'AFTER LOGON' trigger I think it should know the=20
> session id. It DOES know the IP_ADDRESS, so why not the SESSION_ID?
> And if that doesn't work, what else doesn't work?
>=20
> Anybody?
>=20
> TIA,
> Mike
>=20
> ---
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Michael P. Vergara | I do it for the stories I can tell
> Guidant Corporation | - John Sebastian
> Oracle DBA |
>=20
>=20
>=20
> --------
> If you're bored, then visit the list's website: =
http://www.lazydba.com
> (updated daily)
> to unsubscribe, send a blank email to =
oracledba-unsubscribe_at_quickdoc.co.uk
> to subscribe send a blank email to oracledba-subscribe_at_quickdoc.co.uk
>=20
> --------
> If you're bored, then visit the list's website: =
http://www.lazydba.com
> (updated daily)
> to unsubscribe, send a blank email to =
oracledba-unsubscribe_at_quickdoc.co.uk
Received on Fri Sep 22 2000 - 04:06:55 CDT