ORA-00604/ORA-01422/ORA-06512 Error on trigger
644317Mar 19 2009 — edited Mar 23 2009Hi,
I have an database which is of version 10.2.0.3.0 on Enterprise Edition.
I want to restrict a user from usage of an schema . Therefore i have written a trigger but i have encountered with another errors:
ORA-00604: error occurred at recursive SQL level 1
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 5
Trigger Being::
--------------------
SQL> create or replace trigger session_access
2 after logon on database
3 declare
4 v_username varchar2(30);
5 v_osuser varchar2(30);
6 begin
7 select username,osuser into v_username,v_osuser from v$session;
8 if v_username = 'SUSANJO' and v_osuser= 'ORACLE' then
9 raise_application_error (-20001,'Access restricted for this USER');
10 end if;
11 end;
12 /
Trigger created.
SQL> show errors;
No errors.
SQL> connect susanjo
Enter password:
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 5
Warning: You are no longer connected to ORACLE.
i have run out of ideas of whats to be done onto the trigger now.
Regards.
Susan John