1.场景
数据库版本:11.2.0.4
当执行@?/rdbms/admin/awrextr.sql
进行awr性能分析数据导出时,报错:
ORA-20115: datapump export encountered error:
ORA-39127: unexpected error from call to export_string
:=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$EXPRESS','SYS',1,2,0,'SYS',1,'11.02.00.04.00',newblock)
ORA-04063: package body "SYS.DBMS_CUBE_EXP" ha
s errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line
1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string
:=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_E
XP
Exception encountered in AWR_EXTRACT
begin
*
ERROR at line 1:
ORA-31623: a job is not attached to this session via the specified handle
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 1137
ORA-06512: at "SYS.DBMS_DATAPUMP", line 5658
ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 781
ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 1372
ORA-06512: at line 3
2.解决方法
经网上查找资料,可按如下方案进行解决:
SQL> conn / as sysdba
connected
SQL>select * from sys.exppkgact$ where package='DBMS_CUBE_EXP' order by 1,2;
PACKAGE SCHEMA CLASS LEVEL#
------------------------------ ------------------------------ ------------ ------------
DBMS_CUBE_EXP SYS 2 1050
DBMS_CUBE_EXP SYS 4 1050
DBMS_CUBE_EXP SYS 6 1050
-- create a backup of the table SYS.EXPPKGACT$
create table sys.exppkgact$_bkup as select * from sys.exppkgact$;
-- remove the references to DBMS_CUBE_EXP
delete from sys.exppkgact$ where package='DBMS_CUBE_EXP' and schema='SYS';
commit;
然后重新执行脚本,发现可正常导出了
标签:Body,DBMS,CUBE,SYS,EXP,line,ORA From: https://www.cnblogs.com/dclogs/p/18172484