Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.oracle -> HELP HELP : ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

HELP HELP : ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

From: tracy <tracykim10_at_yahoo.com.hk>
Date: 6 Feb 2004 00:57:34 -0800
Message-ID: <5c91cce9.0402060057.3d6ca551@posting.google.com>

Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist

create table log_errors_tab (

	error     varchar2(30),
	timestamp date,
	username  varchar2(30),
        osuser    varchar2(30),
        machine   varchar2(64),
	process   varchar2(8),
	program   varchar2(48));

create or replace trigger log_errors_trig 
	after servererror on database
declare
	var_user     varchar2(30);
	var_osuser   varchar2(30);
	var_machine  varchar2(64);
	var_process  varchar2(8);
	var_program  varchar2(48);
begin
	select username, osuser, machine, process, program
	into   var_user, var_osuser, var_machine, var_process, var_program
	from   sys.v_$session
	where  audsid = userenv('sessionid');

	insert into log_errors_tab
	  values(dbms_standard.server_error(1),sysdate,var_user,
	         var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.

SQL>roll back;
Rollback complete.

After that i got error message in my SQL: ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed re-validation

I check under user_objects & user_errors, result as below:   1 select * from user_objects
  2* WHERE STATUS <>'VALID'
SQL> / OBJECT_NAME


SUBOBJECT_NAME                 OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE   

    CREATED LAST_DDL_
------------------------------ --------- --------------

SQL> select * from user_errors;
NAME                           TYPE          SEQUENCE      LINE 
POSITION
------------------------------ ------------ --------- ---------


TEXT
LOG_ERRORS_TRIG                TRIGGER              1        10       
13
PL/SQL: ORA-00942: table or view does not exist
LOG_ERRORS_TRIG                TRIGGER              2         8       
 2
PL/SQL: SQL Statement ignored

How can i fix this problem? I roll back after I run the trigger, why this still happened?

Regards.
tracy kim Received on Fri Feb 06 2004 - 02:57:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US