I had trouble to create a system trigger. The following is how that happened.
SQL> create or replace trigger sys_test
2 after logon on sys
3 begin
4 null;
5 end;
6 /
after logon on sys
*
ERROR at line 2:
ORA-30506: system triggers cannot be based on tables or views.
By following Oracle documentation, I have run the scripts dbmsstdx.sql and catproc.sql in advance.
First thing is if you execute ur code making a minor change in the code which I done it for you
create or replace trigger sys_test
after logon on sys.schema
begin
null;
end;
this code is fine only change I have made is I have made sys to sys.schema the .schema has to be explictily stated.when you execute the above trigger you will still end with an error it will give you a error stating that
system trigger cannot be defined on the schema of sys user
so try the above code as follows on a different user let take scott as the user it will work for example
create or replace trigger sys_test
after logon on scott.schema
begin
null;
end;
Bookmarks