ORA-04098 Error Resolution method

Source: Internet
Author: User
Tags stack trace
Error | resolution
ORA-04098 Error Resolution method

Database version: 8.1.5
Platform: SOLARIS 5.7



Background:

The user has established a trigger:
Create or Replace Trigger Ddl_deny
Before create or alter or drop on database
Declare
Begin
INSERT into ddl_logs values (ora_dict_obj_owner,ora_dict_obj_name,sysdate);
exception
When No_data_found Then
Null
End
The goal is probably to record all the DDL operations, but the trigger is built with errors and finds:

11:30:08 System@ora250>alter trigger Ddl_deny disable;
ALTER TRIGGER Ddl_deny Disable
*
ERROR is on line 1th:
ORA-04098: Invalid trigger ' Ddl_deny ' and failed to authenticate
11:31:45 System@ora250>drop trigger Ddl_deny;
Drop Trigger Ddl_deny
*
ERROR is on line 1th:
ORA-04098: Invalid trigger ' Ddl_deny ' and failed to authenticate



The trigger cannot be compiled at this time, nor can it be deleted, because the trigger itself defines a DDL operation, resulting in ORA-04098: the trigger ' Ddl_deny ' is invalid and not validated.



Workaround:

1, first check the user's permissions are correct:

Select owner, object_name, object_type, status from dba_objects where object_name = ' <TRIGGER_NAME> ';

12:42:38 system@ora250>select owner, object_name, object_type, status from Dba_o
bjects where object_name= ' Ddl_deny ';
OWNER object_name object_type STATUS
------------------------------------ --------------
SYSTEM Ddl_deny TRIGGER INVALID

There is no problem discovering user permissions.

2, then set the diagnostic event alter session set events= ' 4098 trace name Errorstack Level 3 ', view the contents of the trace file as follows:

Dump FILE/DB1/APP/ORACLE/ADMIN/ORA250/UDUMP/ORA250_ORA_6834.TRC
Oracle8i Enterprise Edition Release 8.1.5.0.0-production
With the partitioning and Java options
Pl/sql Release 8.1.5.0.0-production
Oracle_home =/db1/app/oracle/product/8.1.5
System Name:sunos
Node name:db250
release:5.7
version:generic_106541-08
Machine:sun4u
Instance name:ora250
Redo thread mounted by this instance:1
Oracle Process Number:17
Unix process pid:6834, image:oracle@db250 (TNS v1-v3)
Session ID30.829) 2004.11.17.20.53.38.000
2004.11.17.20.53.38.000
Ksedmp:internal or fatal error
ORA-04098: Invalid trigger ' Ddl_deny ' and failed to authenticate
Current SQL statement for this session:
ALTER TRIGGER Ddl_deny Disable
-----Call Stack Trace-----
Calling call entry argument values in hex
Location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
KSEDMP () +160 call KSEDST () +0 508? 1? Ffbeb31c?
FFBEADC0? FFBEADA4? 0?
Ksddoa () +248 Ptr_call 00000000 3? 0? 0? 16594FC?
C0000025? 0?
KSDPCG () +212 call Ksddoa () +0 16eb0ac? 16e4c24? 3?
24939C? 16eb0ac? 16eb090?
Ksdpec () +236 call KSDPCG () +0 1002? Ffbeb8e4? 16e4c24?
0? 0? 0?
Ksfpec () +136 call Ksdpec () +0 1002? 165a800? 165a800?
7f3? 1659995? 16594FC?
Kgesev () +100 Ptr_call 00000000 1659494? 1002? 262f80?
1002? 1? 0?
KSESEC1 () +48 call Kgesev () +0 1659494? 16e8ca4? 1002?
1? FFBEBA60? 1?
Kkttrex () +2112 call KSESEC1 () +0 1002? 1? 8? 8e859d26? 2?
2?
KKTEXEEVT () +616 call Kkttrex () +0 8e996a20? 8e973b48?
FFBEBAE4? 1659000?
8e859d6c? 165E800?.....

Found to be a serious internal error, others do not see too many error messages, so think of the use of hidden parameters _system_trigger_enabled=false, when the database started to make all triggers do not work, and then delete. Database 8.1.5 Not this parameter, so the query:

14:28:32 System@ora815>select ksppinm from X$ksppi where substr (ksppinm,1,1) = ' _ '
and ksppinm like '%tri% ' order by KSPPINM;
Ksppinm
-------------------------------------------------------------------------------
_cleanup_rollback_entries
_distributed_lock_timeout
_distributed_recovery_connection_hold_time
_number_cached_attributes
_system_trig_enabled

The 8.1.5 version of the parameter was found to be _system_trig_enabled, so the user set this parameter to FALSE in the initialization parameter file, then restart the database, delete the trigger, and delete the success.

Solve this problem.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.