-
Schema trigger
This is what I did to create schema/user trigger:
=================================================
a. connect scott/tiger.
b.
create or replace trigger tr_after_logon
after logon on schema
begin
raise_application_error(-2001, 'You Cannot Login as a scott');
end;
c. I log off scott.
d. shutdown database and restarted to make sure that scott could not login--I know I donot have to do that.
E. connect scott/tiger.
connected.
1. Why is SCOTT allowed to login?
2. why the Trigger didnot FIRE?
..
Please help...
===============================================================
NOTE:
=========
If I do:
a. connect scott/tiger.
b.
create or replace trigger tr_after_logon
after logon on database
begin
raise_application_error(-2001, 'You Cannot Login as a scott');
end;
c. I log off scott.
If I try this :
========
connect scott/tiger ...It would fail with this error:
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-21000: error number argument to raise_application_error of -2001 is out of range
ORA-06512: at line 2
xuduro_2000
-
hi,
i think; i am not sure.
create or replace trigger tr_after_logon
after logon on schema
begin
raise_application_error(-2001, 'You Cannot Login as a scott');
end;
the code does not seem to have a check to see
whether the logon user is 'SCOTT'.
i think this will not allow any user to login.
is this not a danger?
-Raja
-
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-21000: error number argument to raise_application_error of -2001 is out of range
ORA-06512: at line 2
You should not use error number greater as -20000 for command raise_application_error.
Aleš Orehek
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|