oracle 12.1.0.2版本对象ku$_user_view是失效状态的修复

AIX+oracle 12.1.0.2环境,发现对象ku$_user_view是失效状态。
两套库上失效对象的LAST_DDLTIME均为20141107 20:26:33:

select owner,object_name,object_type,status,to_char(LAST_DDL_TIME,'yyyymmdd hh24:mi:ss') from dba_objects where object_name='KU$_USER_VIEW' ;

OWNER
--------------------------------------------------------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE STATUS TO_CHAR(LAST_DDL_
----------------------- ------- -----------------
SYS
KU$_USER_VIEW
VIEW INVALID 20141107 20:26:33


##############
执行以下语句,重新编译无效对象:

connect as SYSDBA
@?/rdbms/admin/catmeta.sqlKU$_USER_VIEW对象状态已经恢复正常;但是出现了新的无效对象,请问如何处理?
--------------
脚本执行后新出现这几个的无效对象仍为失效。

select owner,object_name,object_type,status,to_char(LAST_DDL_TIME,'yyyymmdd hh24:mi:ss') from dba_objects where object_name='KU$_USER_VIEW' ;

OWNER
--------------------------------------------------------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE STATUS TO_CHAR(LAST_DDL_
----------------------- ------- -----------------
SYS
KU$_USER_VIEW
VIEW VALID 20170120 11:12:24

 select owner,object_name,object_type,status from dba_objects where status <> 'VALID' order by owner;

OWNER OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------------------ ----------------------- -------
SYS KUPW$WORKER PACKAGE BODY INVALID
SYS DBMS_METADATA PACKAGE BODY INVALID
SYS DBMS_METADATA_UTIL PACKAGE BODY INVALID

解决:
Dbms_metadata Package Body Invalid After CPU Installation ( Doc ID 334645.1 )

alter package dbms_metadata compile body;
How to validate the packages DBMS_METADATA_INT and DBMS_METADATA_UTIL ( Doc ID 1586673.1 )

Please run the following script which will re-create those packages and type bodies :

$ORACLE_HOME/rdbms/admin/catpprvt.sql

#########
用alter package dbms_metadata compile body; 这种命令对三个失效对象重新编译后,目前均已经恢复为正常valid状态。
未使用catpprvt.sql 脚本。

你可能感兴趣的:(ORACLE,故障排查,ORACLE,12c)