SQL*Plus: Release 19.0.0.0.0 - Production on Tue May 23 06:15:14 2023
Version 19.03.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
SQL> @$ORACLE_HOME/rdbms/admin/dbmsrman.sql
Session altered.
Package created.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
PL/SQL procedure successfully completed.
Synonym dropped.
View dropped.
Function dropped.
Type dropped.
Type dropped.
Type dropped.
Type created.
Type created.
Type created.
Type body created.
Function created.
View created.
Synonym created.
Synonym created.
Grant succeeded.
Synonym dropped.
View dropped.
Synonym dropped.
View dropped.
Synonym dropped.
View dropped.
Function dropped.
Type dropped.
Type dropped.
Type dropped.
Type created.
Type created.
Type created.
Type body created.
Function created.
View created.
View created.
Synonym created.
Synonym created.
View created.
View created.
Synonym created.
Synonym created.
View created.
View created.
Synonym created.
Synonym created.
Grant succeeded.
Grant succeeded.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
Session altered.
SQL> @$ORACLE_HOME/rdbms/admin/dbmsbkrs.sql
Session altered.
Package created.
Session altered.
SQL> @$ORACLE_HOME/rdbms/admin/prvtrmns.plb
Session altered.
Package body created.
Session altered.
SQL> @$ORACLE_HOME/rdbms/admin/prvtbkrs.plb
Session altered.
Package body created.
Session altered.
SQL> set pagesize 1000
select 'alter '||decode(object_type,'PACKAGE BODY','PACKAGE',object_type)||'
'||owner||'.'||object_name||' compile '||
decode(object_type,'PACKAGE BODY','body','PACKAGE','BODY')||';'
from dba_objects
where status = 'INVALID' AND object_type <>'SYNONYM';
SQL> 2 3 4
'ALTER'||DECODE(OBJECT_TYPE,'PACKAGEBODY','PACKAGE',OBJECT_TYPE)||''||OWNER||'.'
--------------------------------------------------------------------------------
alter VIEW BACKUP_MGR.RMAN_BACKUP_ARCHIVELOG_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_ARCHIVELOG_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_CONTROLFL_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_CONTROLFL_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_DATAFILE_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_DATAFILE_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_FILES compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_JOB_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SET_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SET_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SPFILE_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SPFILE_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SUBJOB_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_UNUSABLE_BACKUP_DETAILS compile ;
14 rows selected.
SQL> alter VIEW BACKUP_MGR.RMAN_BACKUP_ARCHIVELOG_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_ARCHIVELOG_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_CONTROLFL_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_CONTROLFL_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_DATAFILE_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_DATAFILE_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_FILES compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_JOB_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SET_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SET_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SPFILE_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SPFILE_SUMMARY compile ;
alter VIEW BACKUP_MGR.RMAN_BACKUP_SUBJOB_DETAILS compile ;
alter VIEW BACKUP_MGR.RMAN_UNUSABLE_BACKUP_DETAILS compile ;
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
SQL>
View altered.
And voila, problem solved! I hope this post comes in handy for you!
References:
MOS note: PL/SQL package SYS.DBMS_BACKUP_RESTORE Version is Not Current (Doc ID 2741760.1)