If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

After Logon Trigger Not Firing

I am on Oracle 9.2. My actual goal is to trace certain SCHEMA.
In the script below, both insert and execute immediate do not work, independently or together. The Schema name is TEST.

Am I missing something? Test has DBA Privs. Also there is some thing more that is happening. When I put any line in the trigger (any valid line at all) except NULL, I get a trace file for about 700 bytes. But further actions in the same session are not getting recorded in the Trace File.

Originally posted by slimdave I believe that logon triggers do not fire for DBA users.

Logon triggers do fire for DBA users (they don't fire only for users that connect AS SYSDBA/SYOPER). However for DBA users, they simply ignore any possible failure that might occure during execution of the logon trigger. In other words, if something fails inside the trigger, the non-DBA users are prevented from loging in to the database, while DBA users are not.

Patnams, I belive you have to use authonomous transaction for that kind of operations inside your trigger - put "PRAGMA AUTOMOMOUS_TRANSACTION;" inside your DECLARATION section.

Jurij ModicASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?

this format works

I just used this format of trigger (see script below) and it works, but the earlier question still remains. I was looking on AskTom, some one got it working by "compiling the trigger from a schema that has Create Any Trigger and other privileges but NOT DBA role".

I tried and it did not work.

this one works though,

CREATE OR REPLACE TRIGGER TEST.trace_test
AFTER LOGON
ON DATABASE WHEN (USER='TEST')
..
..