0

试图刷新一个数据库,该数据库在删除 AQ 表 'SYSTEM.DEF$_AQCALL' 时失败并出现此错误。

//------------

1. SqlBRuntimeException: Dropping Tables failed after 6/179 items (1 errors)

2. SqlBException: Fatal error executing resource: clean\tables\def$_aqcall

3. QueryException: Error executing resource (delimiter = '/'): clean\tables\def$_aqcall

4. QueryException: Error executing SQL statement (errcode=24005, sqlstate=99999: ORA-24005: Inappropriate utilities used to perform DDL on AQ table SYSTEM.DEF$_AQCALL):

DROP TABLE def$_aqcall CASCADE CONSTRAINTS

5. SQLException: errorcode=24005, sqlstate=99999, line=-1: ORA-24005: Inappropriate utilities used to perform DDL on AQ table SYSTEM.DEF$_AQCALL

//------------

然后尝试手动停止队列并删除队列表,即使使用“强制”选项,但没有运气。

停止队列时,这是我遇到的错误。

//---------------------------

Error starting at line 5 in command:
BEGIN
   DBMS_AQADM.STOP_QUEUE(
      queue_name        => 'SYSTEM.DEF$_AQCALL');
END;

Error report:
ORA-04063: package body "SYS.DBMS_AQADM_SYS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_AQADM_SYS"
ORA-06512: at "SYS.DBMS_AQADM", line 464
ORA-06512: at line 2
04063. 00000 -  "%s has errors"
*Cause:    Attempt to execute a stored procedure or use a view that has
           errors.  For stored procedures, the problem could be syntax errors
           or references to other, non-existent procedures.  For views,
           the problem could be a reference in the view's defining query to
           a non-existent table.
           Can also be a table which has references to non-existent or
           inaccessible types.
*Action:   Fix the errors and/or create referenced objects as necessary.

//--------

使用检查“DBMS_AQADM_SYS”包;

select owner,object_name,object_type,status from dba_objects where object_name='DBMS_AQADM_SYS';

显示“包正文”的状态为“无效”,我认为这可能是上述错误的原因。

下一步是重新编译这个包以修复包中的任何问题。

我将包重新编译为 SYSDBA;

EXECUTE UTL_RECOMP.RECOMP_SERIAL();

根据http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/u_recomp.htm#i1000051

这完成没有任何错误,但包体的状态仍然是“无效”。

尝试使用

sqlplus / as sysdba @?/rdbms/admin/utlrp 

根据DBMS_METADATA 和其他包无效但仍然没有运气。

检查了几个论坛,每个人都建议重新编译包。

感谢您对这个问题有任何见解。

谢谢。

4

1 回答 1

0

以下是一些想法,按照我尝试的顺序:

  1. 尝试找出它无效的原因。如果你幸运的话,错误信息会给你一个线索:select * from dba_errors where name = 'DBMS_AQADM_SYS';
  2. 寻找其他可能导致问题的无效对象:select * from dba_objects where status <> 'VALID';
  3. 运行utlrp多次。(这是某些流程中的官方 Oracle 建议;多次执行相同的操作。)
  4. 像这样手动重新编译对象:alter package sys.dbms_aqadm_sys compile;. 重新编译对象可能会使其他对象无效,您可能需要按特定顺序手动重新编译它们。
  5. 与您的 DBA 交谈,了解服务器最近是否有任何维护。我唯一一次必须执行第 4 步是在升级之后。
  6. 联系 Oracle 支持。
于 2014-12-10T02:49:15.567 回答