Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: login trigger
CREATE OR REPLACE TRIGGER sys.XXX_onlogon
AFTER LOGON ON DATABASE
DECLARE
USUARIOW VARCHAR2(25) := '';
COMPUTADORAW VARCHAR2(25) := '';
BEGIN
SELECT OSUSER, MACHINE INTO USUARIOW, COMPUTADORAW
FROM V$SESSION
WHERE
AUDSID = USERENV('SESSIONID');
INSERT INTO SYSTEM.CONTROL_USUARIOS
(USUARIO, USUARIO_OS,
FECHA, COMPUTADORA)
VALUES
(ORA_LOGIN_USER, USUARIOW,
SYSDATE, COMPUTADORAW);
END;
You add whatever you need more !!
Luck !!
-----Original Message-----
George
Sent: Tuesday, October 22, 2002 1:44 PM
To: Multiple recipients of list ORACLE-L
Hi all
I need to record the time, sun process id and oracle proc id when a user connects.
This needs to be done via a trigger, does someone have something like this handy, I am battling trying to find out in a trigger what the user's information is.
thx
George
You Have The Obligation to Inform One Honestly of the risk, And As a
Person
You Are Committed to Educate Yourself to the Total Risk In Any Activity!
Once Informed & Totally Aware of the Risk, Every Fool Has the Right to
Kill or Injure Themselves as They See Fit!
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ramon E. Estevez INET: com.banilejas_at_codetel.net.do Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Tue Oct 22 2002 - 14:53:39 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).