oracle程序包或函数处于无效状态,ORA-06575: 程序包或函数 NO_VM_DROP_PROC 处于无效状态...

SQL>

metlink引用文档

200491d1ae6203cbdf7e02dca39a75b1.png

ORA-06576 error during Drop User (文档 ID 1498610.1)

In this Document

APPLIES TO:

Oracle Server - Enterprise Edition - Version 10.2.0.1 and later

Information in this document applies to any platform.

SYMPTOMS

Dropping a user schema results in below errors:

SQL> drop user GG_ADMIN;

DROP USER "GG_ADMIN"

Error at line 2

ORA-00604: error occurred at recursive SQL level 1

ORA-06576: not a valid function or procedure name

ORA-06512: at line 21 gg_admin cascade;

CAUSE

A DDL trigger is defined on the drop statement.

Next query will get you the definition of the DDL Triggers in the system.

SQL> connect / as sysdba

SQL> SELECT a.obj#, a.sys_evts, b.name FROM trigger$ a,obj$ b WHERE a.sys_evts > 0 AND a.obj#=b.obj# AND baseobject = 0;

OBJ#       SYS_EVTS NAME

---------- ---------- ------------------------------

81794             8 LOGON_DATE

81795          8416 NO_VM_DDL

81796           128 NO_VM_DROP_A

13177          8192 AW_REN_TRG

13179           128 AW_DROP_TRG

11990        524256 LOGMNRGGC_TRIGGER

13175          4096 AW_TRUNC_TRG

71787             1 MGMT_STARTUP

Get an errorstack for ORA-06576 error:

SQL> alter system set events=‘6576 trace name errorstack level 3‘;

SQL> drop user

When executing ‘drop user gg_admin‘, the resultant trace file shows the failing statement is a call to wmsys.no_vm_drop_proc(‘USER‘, ‘GG_ADMIN‘, ‘‘).

From errorstack trace file we could observe the following:

if (s_event=‘CREATE‘) then

execute immediate ‘call wmsys.no_vm_create_proc(‘‘‘ || sys.dictionary_obj_type || ‘‘‘, ‘‘‘ ||

sys.dictionary_obj_name || ‘‘‘, ‘‘‘ || sys.dictionary_obj_owner || ‘‘‘)‘ ;

elsif (s_event=‘DROP‘) then

execute immediate ‘call wmsys.no_vm_drop_proc(‘‘‘ || sys.dictionary_obj_type || ‘‘‘, ‘‘‘ ||

sys.dictionary_obj_name || ‘‘‘, ‘‘‘ || sys.dictionary_obj_owner || ‘‘‘)‘ ;

The triggers enabled for this were in this case NO_VM_DDL and NO_VM_DROP_A

SOLUTION

Check if there are any DROP BEFORE triggers enabled. Once you drop the trigger, it will allow you to drop the user.

Workaround would be:

SQL> ALTER TRIGGER NO_VM_DDL DISABLE;

SQL> ALTER TRIGGER NO_VM_DROP_A DISABLE;

SQL> drop user gg_admin;

REFERENCES

NOTE:75206.1- OERR: ORA-6576 not a function or procedure

原文:http://blog.csdn.net/itdba/article/details/38921465

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值