Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: login trigger

RE: login trigger

From: Ramon E. Estevez <com.banilejas_at_codetel.net.do>
Date: Tue, 22 Oct 2002 11:53:39 -0800
Message-ID: <F001.004F03CA.20021022115339@fatcity.com>


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



George Leonard
Oracle Database Administrator
Dimension Data (Pty) Ltd
(Reg. No. 1987/006597/07)

Tel: (+27 11) 575 0573
Fax: (+27 11) 576 0573
E-mail:george.leonard_at_za.didata.com
Web: http://www.didata.co.za  

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-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Oct 22 2002 - 14:53:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US