ORA-00604: error occurred at recursive SQL level 1, ora-00604recursive

Source: Internet
Author: User

ORA-00604: error occurred at recursive SQL level 1, ora-00604recursive

When you use an account ESCMOWNER in the test environment to ALTER the database, the following error is always reported:

ORA-00604: error occurred at recursive SQL level 1

ORA-20016: (ALTER) Action denied as it is a protected object!

ORA-06512: at line 7

I don't know what happened, so I want to track the current session, view the specific reason, and check that the SID of the current session is 967

SELECT USERENV('SID') FROM DUAL;

Log on to the system and view the SID of session ID = 967, SERIAL #

SELECT SID, SERIAL# FROM V$SESSION WHERE SID=967;

 

Trace sessions with the session ID and SERIAL #967,2276 as follows:

SQL> exec dbms_system.set_sql_trace_in_session(967,2276,true);
 
PL/SQL procedure successfully completed.
 

Enable the trace identifier in session 967, as shown below:

ALTER SESSION SET TRACEFILE_IDENTIFIER='kerry_test'

The ORACLE 10g trace file is located under $ ORACLE_BASE/admin/SID/udump to view the trace file,

[Oracle @ get-linux01 udump] $ ls * kerry *

Epps_ora_1960_kerry_test.trc

[Oracle @ get-linux01 udump] $ more epps_ora_1960_kerry_test.trc

The specific content is as follows:

View SELECT * FROM DBA_OBJECTS WHERE OBJECT_NAME = 'Protect _ ESCMOWNER_BTR 'and find PROTECT_ESCMOWNER_BTR as the trigger. The specific script is as follows:

CREATE OR REPLACE TRIGGER PROTECT_ESCMOWNER_BTR
BEFORE DDL
ON ESCMOWNER.SCHEMA
BEGIN
   if sys.sysevent = 'ALTER' and sys.dictionary_obj_type in ('TRIGGER','VIEW','PACKAGE','PACKAGE BODY','PROCEDURE','FUNCTION','SYNONYM') then
      NULL;
   elsif sys.sysevent = 'ANALYZE' then
        NULL;
      else
        RAISE_APPLICATION_ERROR(-20016,'('||sys.sysevent||') Action denied as it is a protected object!');
   end if;
END PROTECT_ESCMOWNER_BTR;

 


Conclusion:

This database trigger should be set by the former DBA, and I have been using the system update script, so this trigger has not been triggered. The problem is solved after the trigger is disabled.

Related Article

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.