Re: What stupid mistake am I making with this onlogin trigger?

From: Kurt Franke <>
Date: Tue, 26 Feb 2008 12:16:12 +0100
Message-Id: <>

code addings inline

> After going back an forth on this for a while today I figured a few more sets of eyes couldn't hurt.
> I need to track connections from a specific module (not SQL*Plus but that was easiest for testing purposes). This trigger compiles but does not create any rows. The insert statement works if run from a sql*plus prompt. I'm sure I'm missing something really obvious here...
> Does the onlogin trigger possibly execute as the user logging in as opposed to as sys?
> Trigger created:
> SQL> create or replace trigger sys.trace_php_onlogin after logon on database

   insert into wsidba.php_logins
    select sid,username,module

      from sys.v_$session
      where sid = (select unique(sid) from v$mystat)
          and upper(module) like '%SQL%';
  • must close the autonomous transaction to get the correct error message outside ROLLBACK; RAISE; end; /
    > Trigger created.
    > Doesn't enter any data to table:
    > usnjc01urp001:/services/home/oracle<lass> $ sqlplus wsidba
    > TIA,
    > Jay Miller



Received on Tue Feb 26 2008 - 05:16:12 CST

Original text of this message