Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Logon trigger isn 't restricting logon

Logon trigger isn 't restricting logon

2005-03-02       - By Hostetter, Jay M

Reply:     1     2     3  

I'm not quite sure what I'm missing here.  I created a logon trigger,
did some debugging and I confirmed that it does indeed fire. The problem
seems to be with RAISE_APPLICATION_ERROR.  This trigger is supposed to
prevent certain connections from occuring.  Instead, a trace file is
generated with the following:

Skipped error 604 during the execution of JMH.ON_LOGON
*** 2005-03-02 09:19:41.326
ksedmp: internal or fatal error
ORA-00604 (See ORA-00604.ora-code.com): error occurred at recursive SQL level 1
ORA-20001 (See ORA-20001.ora-code.com): You are not allowed to login
ORA-06512 (See ORA-06512.ora-code.com): at line 8

Now, from what I can see, this behavior is expected if the user has
ADMINISTER DATABASE TRIGGER or ALTER ANY TRIGGER (Note 265012.1).  I
think this also happens if you have certain roles (this user does not
have any special roles).=20
So I'm trying to figure out why the error is skipped and login is
allowed.  Here is my trigger:

CREATE OR REPLACE TRIGGER on_logon
AFTER LOGON
ON jmh.schema
declare
hname varchar2(50);
BEGIN
select sys_context('userenv','host') into hname from dual;
IF upper(hname) like '%TESTBOX%' THEN
  RAISE_APPLICATION_ERROR(-20001, 'You are not allowed to login');
END IF;
END;
/

Any help would be appreciated.

Thank you,
Jay


**DISCLAIMER
This e-mail message and any files transmitted with it are intended for the =
use of the individual or entity to which they are addressed and may contain=
information that is privileged, proprietary and confidential. If you are n=
ot the intended recipient, you may not use, copy or disclose to anyone the =
message or any information contained in the message. If you have received t=
his communication in error, please notify the sender and delete this e-mail=
message. The contents do not represent the opinion of D&E except to the ex=
tent that it relates to their official business.
--
http://www.freelists.org/webpage/oracle-l