Read carefully :-)

[EMAIL PROTECTED] wrote:
> 
> I did that trigger, it works if the only is logged in just once.
> It gives me the errors of more rows returned 1422.
> 
> How can I know in what session he is.
> 
> CREATE OR REPLACE TRIGGER CONTROL_DDL
>    BEFORE DDL ON DATABASE
> DECLARE
>    NOMBRE_MAQUINA         VARCHAR2(20);
>    USUARIO_MAQUINA        VARCHAR2(20);
> BEGIN
>    SELECT MACHINE, OSUSER INTO NOMBRE_MAQUINA, USUARIO_MAQUINA
>       FROM V$SESSION
>    WHERE

LOOK HERE ===>  AUDSID = SYS_CONTEXT('USERENV', 'SESSIONID')

> 
>    INSERT INTO CONTROL_OBJETOS (USUARIO,      BASE_DATOS,
>                                 HORA,         OPERACION,
>                                 ESQUEMA,      TIPO_OBJETO,
>                                 OBJETO,       MAQUINA,
>                                 USUARIO_OS)
>    VALUES
>                                (ORA_LOGIN_USER,     ORA_DATABASE_NAME,
>                                 SYSDATE,            ORA_SYSEVENT,
>                                 ORA_DICT_OBJ_OWNER, ORA_DICT_OBJ_TYPE,
>                                 ORA_DICT_OBJ_NAME,  NOMBRE_MAQUINA,
>                                 USUARIO_MAQUINA);
> END;
> 
> 
>     TIA
> 
> Ramon E. Estevez
> 
> /


HTH,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (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).

Reply via email to