Home » SQL & PL/SQL » SQL & PL/SQL » After Logon Produces No Error even with Raise_application_error
After Logon Produces No Error even with Raise_application_error [message #39231] Thu, 27 June 2002 22:40 Go to next message
Tony Ho
Messages: 1
Registered: June 2002
Junior Member
Hi,
I created a script to test on the after logon trigger as follow :

create or replace trigger SYS.T_CONNECT_RESTRICTIONS_T
AFTER LOGON ON DATABASE
DECLARE
BEGIN
RAISE_APPLICATION_ERROR (-20999, 'test' );
EXECUTE IMMEDIATE 'DISCONNECT';
END;

After successful compilation, i used sqlplus.exe to log into the database instance. I discovered that the raise_application_error was executed but the strange thing is that i can still get myself connected in sqlplus. I did a select statement and the connection is intact.

Any assistance/advice is greatly appreciated.
Re: After Logon Produces No Error even with Raise_application_error [message #39235 is a reply to message #39231] Fri, 28 June 2002 09:05 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
I'm not sure what your 'disconnect' statement is supposed to do, but anyone with the DBA role (and the account you tested with probably has this role, right?) will not be blocked by logic in a logon trigger. This is a feature, and is to prevent the situation where _no one_ can login to the database.
Previous Topic: Re: date function
Next Topic: Restrictive access to Porcedures
Goto Forum:
  


Current Time: Tue Apr 16 07:04:38 CDT 2024