You can store your variables in a specific table if you want.
CREATE OR REPLACE TRIGGER SYS.db_logon_audit_trigger AFTER LOGON ON DATABASE DECLARE i_process varchar(160); BEGIN if (user='SYS' and sys_context('USERENV','AUTHENTICATION_METHOD')<>'JOBS') then select process into i_process from v$session where audsid = SYS_CONTEXT('USERENV','SESSIONID') and sid = SYS_CONTEXT('USERENV','SID') and rownum=1; --sys_context('USERENV', 'HOST') --sys_context('USERENV', 'OS_USER') --sys_context('USERENV', 'TERMINAL') --sys_context('USERENV', 'INSTANCE_NAME') --sys_context('USERENV', 'SESSIONID') --to_char(systimestamp,'YYYY-MM-DD HH24:MI:SS.FF6') --i_process end if; END; /
MarcelaT wrote:If it's the web server connecting to the database, you can't. The database is only going to see the web server, and not the user connected to the web server. The information you want is on the web server, and you'll need to pass it to the database as part of the operation.
Thank you very much for your help.
I have audit tables already. These tables are completed by triggers before update.
I need the information about how to receive ip and machine name from a user, NOT from the server.
On cliente/server I obtained data using sys_context and the information was ok. But now on web, the data obtained are about the server instead the user.