[oracle@database-001 ~]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Nov 7 17:15:54 2022
Version 19.17.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.16.00.00 in TARGET database is not current
PL/SQL package SYS.DBMS_RCVMAN version 19.16.00.00 in TARGET database is not current
connected to target database: DCPFARDB (DBID=2411995666)
*********************************************************************************************************************
PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.16.00.00 in TARGET database is not current
PL/SQL package SYS.DBMS_RCVMAN version 19.16.00.00 in TARGET database is not current
*********************************************************************************************************************
-- 报了上面的错误,是因为版本没有更新的原因
RMAN>
解决方法:
上面报错解决方案如下:
[oracle@pet-datalex-ecs-database-001 ~]$ export ORACLE_SID=dcpfardb
[oracle@pet-datalex-ecs-database-001 ~]$ sqlplus / as sysdba
-- 切换日志
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
-- 将缓冲数据写入到数据文件中
SQL> alter system checkpoint;
System altered.
SQL> /
System altered.
SQL> /
System altered.
-- 然后执行下面的四个sql
SQL> @$ORACLE_HOME/rdbms/admin/dbmsrman.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtrmns.plb
SQL> @$ORACLE_HOME/rdbms/admin/dbmsbkrs.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtbkrs.plb
SQL> exit
然后, 重新rman登录就好了
[oracle@database-001 ~]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Nov 7 17:15:54 2022
Version 19.17.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: DCPFARDB (DBID=2411995666)
RMAN>
PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.16.00.00 in TARGET database is not currentPL/SQL
PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.16.00.00 in TARGET database is not currentPL/SQL package SYS.DBMS_RCVMAN version 19.16.00.00 in TARGET database is not current