当前位置: 首页 > news >正文

Rman单实例迁移到单实例

关于同平台同版本数据库之间的迁移操作的实验

---Source DB[root@oracle-db-19cs ~]# cat /etc/redhat-release
CentOS Stream release 8
[root@oracle-db-19cs ~]# --- Target DB[root@oracle-db-19ct ~]# cat /etc/redhat-release
CentOS Stream release 8
[root@oracle-db-19ct ~]# 
--- Source DB Version[root@oracle-db-19cs ~]# 
[root@oracle-db-19cs ~]# su - oracle
[oracle@oracle-db-19cs ~]$ 
[oracle@oracle-db-19cs ~]$ sqlplus -vSQL*Plus: Release 19.0.0.0.0 - Production
Version 19.3.0.0.0[oracle@oracle-db-19cs ~]$ --- Target DB Version[root@oracle-db-19ct ~]# 
[root@oracle-db-19ct ~]# su - oracle
[oracle@oracle-db-19ct ~]$ 
[oracle@oracle-db-19ct ~]$ sqlplus -vSQL*Plus: Release 19.0.0.0.0 - Production
Version 19.3.0.0.0[oracle@oracle-db-19ct ~]$ 

Step1: 环境检查

1.1 确认归档是否开启

--- Source DB[oracle@oracle-db-19cs ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Wed Mar 1 19:40:45 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle.  All rights reserved.Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0SQL> 
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     254
Next log sequence to archive   256
Current log sequence           256
SQL> --- Target DB[oracle@oracle-db-19ct ~]$ 
[oracle@oracle-db-19ct ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Wed Mar 1 19:41:44 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle.  All rights reserved.Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0SQL> 
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     255
Next log sequence to archive   257
Current log sequence           257
SQL> 

以上若为关闭状态,则需要进行以下操作开启归档模式,并设置归档地址。Source DB/Target 需进行同样的操作,开启归档,设置归档地址注意: 需在数据库mount状态下进行开启归档

[oracle@ol7s arch]$ 
[oracle@ol7s arch]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Fri Feb 24 14:22:35 2023Copyright (c) 1982, 2016, Oracle.  All rights reserved.Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Productionsys@cdb$root:cdb1> show user;
USER is "SYS"
sys@cdb$root:cdb1> show con_name;CON_NAME
------------------------------
CDB$ROOT
sys@cdb$root:cdb1> alter system set log_archive_dest_1 = 'LOCATION=/u01/app/oracle/product/12.1.0.2/db_1/dbs/arch';System altered.sys@cdb$root:cdb1> archive log list; 
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/12.1.0.2/db_1/dbs/arch
Oldest online log sequence     2
Current log sequence           4
sys@cdb$root:cdb1>     
sys@cdb$root:cdb1> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@cdb$root:cdb1> 
sys@cdb$root:cdb1> startup mount;
ORACLE instance started.Total System Global Area 1644167168 bytes
Fixed Size                  8793400 bytes
Variable Size            1056965320 bytes
Database Buffers          570425344 bytes
Redo Buffers                7983104 bytes
Database mounted.
sys@cdb$root:cdb1> 
sys@cdb$root:cdb1> alter database archivelog;Database altered.sys@cdb$root:cdb1> 
sys@cdb$root:cdb1> alter database open;Database altered.sys@cdb$root:cdb1> set pagesize 200 linesize 200
sys@cdb$root:cdb1> 
sys@cdb$root:cdb1> select log_mode from v$database;LOG_MODE
------------
ARCHIVELOG1 row selected.sys@cdb$root:cdb1> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/12.1.0.2/db_1/dbs/arch
Oldest online log sequence     2
Next log sequence to archive   4
Current log sequence           4
sys@cdb$root:cdb1> 
sys@cdb$root:cdb1> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@ol7s arch]$ 

创建测试表: 

SQL> create table maxwell_db as select * from emp;Table created.SQL> select * from maxwell_db;EMPNO ENAME                          JOB                                MGR HIREDATE               SAL       COMM     DEPTNO
---------- ------------------------------ --------------------------- ---------- --------------- ---------- ---------- ----------7369 SMITH                          CLERK                             7902 17-DEC-80              800                    207499 ALLEN                          SALESMAN                          7698 20-FEB-81             1600        300         307521 WARD                           SALESMAN                          7698 22-FEB-81             1250        500         307566 JONES                          MANAGER                           7839 02-APR-81             2975                    207654 MARTIN                         SALESMAN                          7698 28-SEP-81             1250       1400         307698 BLAKE                          MANAGER                           7839 01-MAY-81             2850                    307782 CLARK                          MANAGER                           7839 09-JUN-81             2450                    107788 SCOTT                          ANALYST                           7566 24-JAN-87             3000                    207844 TURNER                         SALESMAN                          7698 08-SEP-81             1500          0         307876 ADAMS                          CLERK                             7788 02-APR-87             1100                    207900 JAMES                          CLERK                             7698 03-DEC-81              950                    307902 FORD                           ANALYST                           7566 03-DEC-81             3000                    207934 MILLER                         CLERK                             7782 23-JAN-82             1300                    1013 rows selected.SQL>

Step2:备份准备

2.1 全库备份

1. 创建备份所需要的目录

[root@oracle-db-19cs /]# su - oracle
[oracle@oracle-db-19cs ~]$ pwd
/home/oracle
[oracle@oracle-db-19cs ~]$ mkdir rmanback
[oracle@oracle-db-19cs ~]$ ls -ltr
total 2989100
-rw-r--r--. 1 root   root     3059705302 Nov  2 13:56 LINUX.X64_193000_db_home.zip
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Templates
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Public
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Downloads
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Documents
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Desktop
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Videos
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Pictures
drwxr-xr-x. 2 oracle oinstall          6 Nov 26 10:45 Music
-rw-r--r--. 1 root   root         313139 Nov 26 10:54 rlwrap-0.43.tar.gz
drwxr-xr-x. 2 oracle oinstall        136 Jan  1 12:33 expbk
drwxr-xr-x. 2 oracle oinstall         35 Jan 31 14:02 Backup
drwxr-xr-x. 3 oracle oinstall         24 Jan 31 22:28 DBA
drwxr-xr-x. 2 oracle oinstall          6 Feb  1 11:43 ArchLog
-rw-r--r--. 1 oracle oinstall     781446 Feb  1 21:37 test_maxwell_report.html
-rw-r--r--. 1 oracle oinstall       3982 Feb  1 23:24 cgf95c3k5mszx_txt1.txt
drwxr-xr-x. 2 oracle oinstall         27 Feb 16 11:50 rmanbk
-rw-r--r--. 1 oracle oinstall       4840 Feb 21 18:46 hr_schema.lst
-rw-r--r--. 1 oracle oinstall      18821 Feb 21 18:52 pubs_hr_schema.lst
drwxr-xr-x. 2 oracle oinstall          6 Mar  1 20:10 rmanback
[oracle@oracle-db-19cs ~]$ 

2.备份数据文件

[root@oracle-db-19cs /]# su - oracle
[oracle@oracle-db-19cs ~]$ 
[oracle@oracle-db-19cs ~]$ rman target /Recovery Manager: Release 19.0.0.0.0 - Production on Wed Mar 1 20:06:29 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.connected to target database: CDB1 (DBID=1093429351)RMAN> 

3.切日志,管理员权限操作

[root@oracle-db-19cs ~]# su - oracle
[oracle@oracle-db-19cs ~]$ 
[oracle@oracle-db-19cs ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 2 10:41:40 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle.  All rights reserved.Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     257
Next log sequence to archive   259
Current log sequence           259
SQL> alter system switch logfile;System altered.SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     258
Next log sequence to archive   260
Current log sequence           260
SQL>  

4.备份数据库文件

数据文件的备份:

[oracle@oracle-db-19cs rmanback]$ rman target /Recovery Manager: Release 19.0.0.0.0 - Production on Thu Mar 2 10:40:55 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.connected to target database: CDB1 (DBID=1093429351)RMAN> backup database format '/home/oracle/rmanback/data_%U.dbf';Starting backup at 02-MAR-23
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=142 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/u02/oradata/CDB1/sysaux01.dbf
input datafile file number=00001 name=/u02/oradata/CDB1/system01.dbf
input datafile file number=00004 name=/u02/oradata/CDB1/undotbs01.dbf
input datafile file number=00007 name=/u02/oradata/CDB1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 02-MAR-23
channel ORA_DISK_1: finished piece 1 at 02-MAR-23
piece handle=/home/oracle/rmanback/data_241m1fkn_1_1.dbf tag=TAG20230302T114839 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00126 name=/u02/oradata/CDB1/pdb1/TBS_MAXWELL_01.dbf
input datafile file number=00010 name=/u02/oradata/CDB1/pdb1/sysaux01.dbf
input datafile file number=00009 name=/u02/oradata/CDB1/pdb1/system01.dbf
input datafile file number=00012 name=/u02/oradata/CDB1/pdb1/users01.dbf
input datafile file number=00127 name=/u02/oradata/CDB1/pdb1/undotbs02.dbf
input datafile file number=00011 name=/u02/oradata/CDB1/pdb1/undotbs01.dbf
input datafile file number=00085 name=/u02/oradata/CDB1/pdb1/data01.dbf
input datafile file number=00163 name=/u02/oradata/CDB1/pdb1/TBS_TOOLS01.dbf
input datafile file number=00169 name=/u02/oradata/CDB1/pdb1/rman01.dbf
channel ORA_DISK_1: starting piece 1 at 02-MAR-23
channel ORA_DISK_1: finished piece 1 at 02-MAR-23
piece handle=/home/oracle/rmanback/data_251m1fmo_1_1.dbf tag=TAG20230302T114839 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00014 name=/u02/oradata/CDB1/pdb2/sysaux01.dbf
input datafile file number=00013 name=/u02/oradata/CDB1/pdb2/system01.dbf
input datafile file number=00016 name=/u02/oradata/CDB1/pdb2/users01.dbf
input datafile file number=00015 name=/u02/oradata/CDB1/pdb2/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 02-MAR-23
channel ORA_DISK_1: finished piece 1 at 02-MAR-23
piece handle=/home/oracle/rmanback/data_261m1fn0_1_1.dbf tag=TAG20230302T114839 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00164 name=/u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_sysaux_kyv81s6v_.dbf
input datafile file number=00162 name=/u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_system_kyv81s6t_.dbf
input datafile file number=00165 name=/u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_undotbs1_kyv81s6w_.dbf
input datafile file number=00166 name=/u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_users_kyv82cng_.dbf
channel ORA_DISK_1: starting piece 1 at 02-MAR-23
channel ORA_DISK_1: finished piece 1 at 02-MAR-23
piece handle=/home/oracle/rmanback/data_271m1fnp_1_1.dbf tag=TAG20230302T114839 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/u02/oradata/CDB1/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/u02/oradata/CDB1/pdbseed/system01.dbf
input datafile file number=00008 name=/u02/oradata/CDB1/pdbseed/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 02-MAR-23
channel ORA_DISK_1: finished piece 1 at 02-MAR-23
piece handle=/home/oracle/rmanback/data_281m1fo8_1_1.dbf tag=TAG20230302T114839 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 02-MAR-23Starting Control File and SPFILE Autobackup at 02-MAR-23
piece handle=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/c-1093429351-20230302-01 comment=NONE
Finished Control File and SPFILE Autobackup at 02-MAR-23RMAN> 

[oracle@oracle-db-19cs rmanback]$ pwd
/home/oracle/rmanback
[oracle@oracle-db-19cs rmanback]$ ls -ltr
total 4374040
-rw-r-----. 1 oracle oinstall 1672699904 Mar  2 11:49 data_241m1fkn_1_1.dbf
-rw-r-----. 1 oracle oinstall 1032208384 Mar  2 11:49 data_251m1fmo_1_1.dbf
-rw-r-----. 1 oracle oinstall  642031616 Mar  2 11:50 data_261m1fn0_1_1.dbf
-rw-r-----. 1 oracle oinstall  548913152 Mar  2 11:50 data_271m1fnp_1_1.dbf
-rw-r-----. 1 oracle oinstall  583163904 Mar  2 11:50 data_281m1fo8_1_1.dbf

[oracle@oracle-db-19cs rmanback]$ 
 


 

控制文件的备份:

RMAN> RMAN> backup current controlfile format '/home/oracle/rmanback/control_%f.dbf';Starting backup at 02-MAR-23
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 02-MAR-23
channel ORA_DISK_1: finished piece 1 at 02-MAR-23
piece handle=/home/oracle/rmanback/control_0.dbf tag=TAG20230302T115246 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 02-MAR-23Starting Control File and SPFILE Autobackup at 02-MAR-23
piece handle=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/c-1093429351-20230302-02 comment=NONE
Finished Control File and SPFILE Autobackup at 02-MAR-23RMAN>

[oracle@oracle-db-19cs rmanback]$ ls -ltr
total 4392664
-rw-r-----. 1 oracle oinstall 1672699904 Mar  2 11:49 data_241m1fkn_1_1.dbf
-rw-r-----. 1 oracle oinstall 1032208384 Mar  2 11:49 data_251m1fmo_1_1.dbf
-rw-r-----. 1 oracle oinstall  642031616 Mar  2 11:50 data_261m1fn0_1_1.dbf
-rw-r-----. 1 oracle oinstall  548913152 Mar  2 11:50 data_271m1fnp_1_1.dbf
-rw-r-----. 1 oracle oinstall  583163904 Mar  2 11:50 data_281m1fo8_1_1.dbf
-rw-r-----. 1 oracle oinstall   19070976 Mar  2 11:52 control_0.dbf
[oracle@oracle-db-19cs rmanback]$ 
 

复制一下参数文件:

确认源数据库参数文件

[oracle@oracle-db-19cs ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 2 11:54:19 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle.  All rights reserved.Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0SQL> set pagesize 200 linesize 200
SQL> 
SQL> show parameter spfileNAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
spfile                               string                            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/spfilecdb1.ora
SQL> 

确认目标数据库是否有与源数据库相同的参数文件路径,若无,则需创建。

[oracle@oracle-db-19ct ~]$ cd /u01/app/oracle/product/19.3.0/dbhome_1/dbs
[oracle@oracle-db-19ct dbs]$ pwd
/u01/app/oracle/product/19.3.0/dbhome_1/dbs
[oracle@oracle-db-19ct dbs]$ 

关闭目标数据库

[oracle@oracle-db-19ct dbs]$ 
[oracle@oracle-db-19ct dbs]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Wed Mar 1 20:35:51 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle.  All rights reserved.Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> 

删除目标数据库中的参数文件

[oracle@oracle-db-19ct dbs]$ pwd
/u01/app/oracle/product/19.3.0/dbhome_1/dbs
[oracle@oracle-db-19ct dbs]$ ls -ltr
total 18576
-rw-r--r--. 1 oracle oinstall     3079 May 14  2015 init.ora.bkp
-rw-r--r--. 1 oracle oinstall     3079 May 14  2015 init.ora
-rw-r-----. 1 oracle oinstall       24 Nov  2 15:03 lkCDB1
-rw-r-----. 1 oracle oinstall     3584 Nov 27 16:55 spfilecdb1.ora.bkp
-rw-r-----. 1 oracle oinstall     3072 Feb  1 13:41 orapwcdb1
-rw-r--r--. 1 oracle oinstall     1188 Feb  2 19:19 initcdb1.ora
-rw-r-----. 1 oracle oinstall     3584 Mar  1 19:01 spfilecdb1.ora
-rw-r-----. 1 oracle oinstall 18989056 Mar  1 19:32 snapcf_cdb1.f
-rw-rw----. 1 oracle oinstall     1544 Mar  1 20:36 hc_cdb1.dat
[oracle@oracle-db-19ct dbs]$ rm -rf init.ora  spfilecdb1.ora initcdb1.ora
[oracle@oracle-db-19ct dbs]$ ls -ltr
total 18564
-rw-r--r--. 1 oracle oinstall     3079 May 14  2015 init.ora.bkp
-rw-r-----. 1 oracle oinstall       24 Nov  2 15:03 lkCDB1
-rw-r-----. 1 oracle oinstall     3584 Nov 27 16:55 spfilecdb1.ora.bkp
-rw-r-----. 1 oracle oinstall     3072 Feb  1 13:41 orapwcdb1
-rw-r-----. 1 oracle oinstall 18989056 Mar  1 19:32 snapcf_cdb1.f
-rw-rw----. 1 oracle oinstall     1544 Mar  1 20:36 hc_cdb1.dat
[oracle@oracle-db-19ct dbs]$ 

源库复制参数文件到目标数据库

[oracle@oracle-db-19cs dbs]$ scp /u01/app/oracle/product/19.3.0/dbhome_1/dbs/init.ora 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs
[oracle@oracle-db-19cs dbs]$ scp /u01/app/oracle/product/19.3.0/dbhome_1/dbs/spfilecdb1.ora 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs

[oracle@oracle-db-19cs dbs]$ scp /u01/app/oracle/product/19.3.0/dbhome_1/dbs/initcdb1.ora 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs

[oracle@oracle-db-19cs dbs]$ pwd
/u01/app/oracle/product/19.3.0/dbhome_1/dbs
[oracle@oracle-db-19cs dbs]$ scp /u01/app/oracle/product/19.3.0/dbhome_1/dbs/init.ora 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs
The authenticity of host '192.168.8.152 (192.168.8.152)' can't be established.
ECDSA key fingerprint is SHA256:iMPMqJJ05A6sDUZU/YufKG7Mws49aWtXJK7HICebAz0.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.8.152' (ECDSA) to the list of known hosts.
oracle@192.168.8.152's password: 
init.ora                                                                                                                                                                                               100% 3079    48.1KB/s   00:00    
[oracle@oracle-db-19cs dbs]$ scp /u01/app/oracle/product/19.3.0/dbhome_1/dbs/spfilecdb1.ora 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs
oracle@192.168.8.152's password: 
spfilecdb1.ora                                                                                                                                                                                         100% 3584     1.7MB/s   00:00    
[oracle@oracle-db-19cs dbs]$ scp /u01/app/oracle/product/19.3.0/dbhome_1/dbs/initcdb1.ora 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs
oracle@192.168.8.152's password: 
initcdb1.ora                                                                                                                                                                                           100% 1188    76.9KB/s   00:00    
[oracle@oracle-db-19cs dbs]$ 

 [oracle@oracle-db-19ct dbs]$ ls -ltr
total 18576
-rw-r--r--. 1 oracle oinstall     3079 May 14  2015 init.ora.bkp
-rw-r-----. 1 oracle oinstall       24 Nov  2 15:03 lkCDB1
-rw-r-----. 1 oracle oinstall     3584 Nov 27 16:55 spfilecdb1.ora.bkp
-rw-r-----. 1 oracle oinstall     3072 Feb  1 13:41 orapwcdb1
-rw-r-----. 1 oracle oinstall 18989056 Mar  1 19:32 snapcf_cdb1.f
-rw-rw----. 1 oracle oinstall     1544 Mar  1 20:36 hc_cdb1.dat
-rw-r--r--. 1 oracle oinstall     3079 Mar  1 20:44 init.ora
-rw-r-----. 1 oracle oinstall     3584 Mar  1 20:45 spfilecdb1.ora
-rw-r--r--. 1 oracle oinstall     1188 Mar  1 20:46 initcdb1.ora

[oracle@oracle-db-19ct dbs]$ 

删除目标数据库对应的数据库文件及目录

 [oracle@oracle-db-19ct oradata]$ rm -rf /u02/oradata/CDB1
[oracle@oracle-db-19ct oradata]$ ls -ltr
total 0
drwxr-xr-x. 2 oracle oinstall  6 Feb  2 19:34 logfiles
drwxr-xr-x. 3 oracle oinstall 18 Feb  2 19:43 fra
[oracle@oracle-db-19ct oradata]$ 

Step3:复制归档文件

1.查看归档文件路径

源数据库做如下操作:

[oracle@oracle-db-19cs ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Wed Mar 1 21:12:29 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle.  All rights reserved.Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0SQL> select name from v$archived_log order by 1;NAME
--------------------------------------------------------------------------------
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_127_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_128_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_129_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_130_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_131_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_132_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_133_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_134_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_135_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_136_1119711914.dbf
/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_137_1119711914.dbf132 rows selected.SQL> 

2. 复制归档文件

目标数据库中删除归档日志

[oracle@oracle-db-19ct dbs]$ pwd
/u01/app/oracle/product/19.3.0/dbhome_1/dbs
[oracle@oracle-db-19ct dbs]$ rm -rf arch1*.dbf
[oracle@oracle-db-19ct dbs]$ ls -ltr arch1*.dbf
ls: cannot access 'arch1*.dbf': No such file or directory
[oracle@oracle-db-19ct dbs]$ 

源数据库如下操作:

[oracle@oracle-db-19cs dbs]$ scp -r /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch* 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs/
oracle@192.168.8.152's password: 
arch1_127_1119711914.dbf                                                                                                                                                                               100%   37MB  80.1MB/s   00:00    
arch1_128_1119711914.dbf                                                                                                                                                                               100%   34MB  95.4MB/s   00:00    
arch1_129_1119711914.dbf                                                                                                                                                                               100%   36MB  94.3MB/s   00:00    
arch1_130_1119711914.dbf                                                                                                                                                                               100%   41MB  93.0MB/s   00:00    
arch1_131_1119711914.dbf                                                                                                                                                                               100%   41MB  98.1MB/s   00:00    
arch1_132_1119711914.dbf                                                                                                                                                                               100%   31MB  92.3MB/s   00:00    
arch1_133_1119711914.dbf                                                                                                                                                                               100%   35MB  94.6MB/s   00:00    
arch1_134_1119711914.dbf                                                                                                                                                                               100%   39MB  75.8MB/s   00:00    
arch1_135_1119711914.dbf                                                                                                                                                                               100%   37MB  39.7MB/s   00:00    
arch1_136_1119711914.dbf                                                                                                                                                                               100%   41MB  48.1MB/s   00:00    
arch1_137_1119711914.dbf                                                                                                                                                                               100%   38MB  28.8MB/s   00:01    
arch1_138_1119711914.dbf                                                                                                                                                                               100%   31MB  48.3MB/s   00:00    
arch1_139_1119711914.dbf                                                                                                                                                                               100%   39MB  26.2MB/s   00:01    
arch1_140_1119711914.dbf                                                                                                                                                                               100%   41MB  23.6MB/s   00:01    
arch1_141_1119711914.dbf                                                                                                                                                                               100%   36MB  25.7MB/s   00:01    
arch1_142_1119711914.dbf                                                                                                                                                                               100%   41MB  44.4MB/s   00:00    
arch1_143_1119711914.dbf                                                                                                                                                                               100%   41MB 103.9MB/s   00:00    
arch1_144_1119711914.dbf                                                                                                                                                                               100%   41MB  44.9MB/s   00:00    
arch1_145_1119711914.dbf                                                                                                                                                                               100%   37MB  94.5MB/s   00:00    
arch1_146_1119711914.dbf                                                                                                                                                                               100%   37MB  33.9MB/s   00:01    
arch1_147_1119711914.dbf                                                                                                                                                                               100%   37MB  35.5MB/s   00:01    
arch1_148_1119711914.dbf                                                                                                                                                                               100%   41MB  22.7MB/s   00:01    
arch1_149_1119711914.dbf                                                                                                                                                                               100%   38MB  46.8MB/s   00:00    
arch1_150_1119711914.dbf                                                                                                                                                                               100%   37MB  64.1MB/s   00:00    
arch1_151_1119711914.dbf                                                                                                                                                                               100%   41MB  24.3MB/s   00:01    
arch1_152_1119711914.dbf                                                                                                                                                                               100%   41MB  30.5MB/s   00:01    
arch1_153_1119711914.dbf                                                                                                                                                                               100%   36MB  41.4MB/s   00:00    
arch1_154_1119711914.dbf                                                                                                                                                                               100%   34MB  60.4MB/s   00:00    
arch1_155_1119711914.dbf                                                                                                                                                                               100%   41MB  35.7MB/s   00:01    
arch1_156_1119711914.dbf                                                                                                                                                                               100%   39MB  37.4MB/s   00:01    
arch1_157_1119711914.dbf                                                                                                                                                                               100%   33MB  51.9MB/s   00:00    
arch1_158_1119711914.dbf                                                                                                                                                                               100%   33MB  24.2MB/s   00:01    
arch1_159_1119711914.dbf                                                                                                                                                                               100%   30MB  25.5MB/s   00:01    
arch1_160_1119711914.dbf                                                                                                                                                                               100%   33MB  32.2MB/s   00:01    
arch1_161_1119711914.dbf                                                                                                                                                                               100%   41MB  33.0MB/s   00:01    
arch1_162_1119711914.dbf                                                                                                                                                                               100%   40MB  67.2MB/s   00:00    
arch1_163_1119711914.dbf                                                                                                                                                                               100%   41MB  19.8MB/s   00:02    
arch1_164_1119711914.dbf                                                                                                                                                                               100%   34MB  13.1MB/s   00:02    
arch1_165_1119711914.dbf                                                                                                                                                                               100%   32MB  42.9MB/s   00:00    
arch1_166_1119711914.dbf                                                                                                                                                                               100%   31MB  40.5MB/s   00:00    
arch1_167_1119711914.dbf                                                                                                                                                                               100%   34MB  21.4MB/s   00:01    
arch1_168_1119711914.dbf                                                                                                                                                                               100%   32MB  31.5MB/s   00:01    
arch1_169_1119711914.dbf                                                                                                                                                                               100%   30MB  90.6MB/s   00:00    
arch1_170_1119711914.dbf                                                                                                                                                                               100%   41MB  50.8MB/s   00:00    
arch1_171_1119711914.dbf                                                                                                                                                                               100%   31MB  37.9MB/s   00:00    
arch1_172_1119711914.dbf                                                                                                                                                                               100%   32MB  35.2MB/s   00:00    
arch1_173_1119711914.dbf                                                                                                                                                                               100%   33MB  25.5MB/s   00:01    
arch1_174_1119711914.dbf                                                                                                                                                                               100%   33MB  58.3MB/s   00:00    
arch1_175_1119711914.dbf                                                                                                                                                                               100%   30MB  22.1MB/s   00:01    
arch1_176_1119711914.dbf                                                                                                                                                                               100%   32MB  47.7MB/s   00:00    
arch1_177_1119711914.dbf                                                                                                                                                                               100%   31MB  14.1MB/s   00:02    
arch1_178_1119711914.dbf                                                                                                                                                                               100%   41MB  19.5MB/s   00:02    
arch1_179_1119711914.dbf                                                                                                                                                                               100%   32MB  69.0MB/s   00:00    
arch1_180_1119711914.dbf                                                                                                                                                                               100%   33MB  35.4MB/s   00:00    
arch1_181_1119711914.dbf                                                                                                                                                                               100%   35MB  82.3MB/s   00:00    
arch1_182_1119711914.dbf                                                                                                                                                                               100%   30MB  39.2MB/s   00:00    
arch1_183_1119711914.dbf                                                                                                                                                                               100%   32MB  72.3MB/s   00:00    
arch1_184_1119711914.dbf                                                                                                                                                                               100%   30MB  33.6MB/s   00:00    
arch1_185_1119711914.dbf                                                                                                                                                                               100%   31MB  46.0MB/s   00:00    
arch1_186_1119711914.dbf                                                                                                                                                                               100%   31MB  29.1MB/s   00:01    
arch1_187_1119711914.dbf                                                                                                                                                                               100% 5458KB  33.7MB/s   00:00    
arch1_188_1119711914.dbf                                                                                                                                                                               100%   31MB  20.8MB/s   00:01    
arch1_189_1119711914.dbf                                                                                                                                                                               100%   32MB  28.4MB/s   00:01    
arch1_190_1119711914.dbf                                                                                                                                                                               100%   35MB  49.1MB/s   00:00    
arch1_191_1119711914.dbf                                                                                                                                                                               100%   37MB  27.2MB/s   00:01    
arch1_192_1119711914.dbf                                                                                                                                                                               100%   40MB  19.0MB/s   00:02    
arch1_193_1119711914.dbf                                                                                                                                                                               100%   32MB  23.0MB/s   00:01    
arch1_194_1119711914.dbf                                                                                                                                                                               100%   36MB  40.1MB/s   00:00    
arch1_195_1119711914.dbf                                                                                                                                                                               100%   41MB  80.8MB/s   00:00    
arch1_196_1119711914.dbf                                                                                                                                                                               100%   39MB  30.1MB/s   00:01    
arch1_197_1119711914.dbf                                                                                                                                                                               100%   35MB  33.4MB/s   00:01    
arch1_198_1119711914.dbf                                                                                                                                                                               100%   37MB  54.0MB/s   00:00    
arch1_199_1119711914.dbf                                                                                                                                                                               100%   41MB  31.1MB/s   00:01    
arch1_200_1119711914.dbf                                                                                                                                                                               100%   35MB  26.0MB/s   00:01    
arch1_201_1119711914.dbf                                                                                                                                                                               100%   36MB  18.1MB/s   00:01    
arch1_202_1119711914.dbf                                                                                                                                                                               100%   41MB  33.8MB/s   00:01    
arch1_203_1119711914.dbf                                                                                                                                                                               100%   32MB  33.5MB/s   00:00    
arch1_204_1119711914.dbf                                                                                                                                                                               100%   35MB  39.9MB/s   00:00    
arch1_205_1119711914.dbf                                                                                                                                                                               100%   34MB  67.3MB/s   00:00    
arch1_206_1119711914.dbf                                                                                                                                                                               100%   33MB  33.6MB/s   00:00    
arch1_207_1119711914.dbf                                                                                                                                                                               100%   32MB  22.5MB/s   00:01    
arch1_208_1119711914.dbf                                                                                                                                                                               100%   33MB  34.9MB/s   00:00    
arch1_209_1119711914.dbf                                                                                                                                                                               100%   34MB  37.6MB/s   00:00    
arch1_210_1119711914.dbf                                                                                                                                                                               100%   36MB  48.0MB/s   00:00    
arch1_211_1119711914.dbf                                                                                                                                                                               100%   33MB  27.0MB/s   00:01    
arch1_212_1119711914.dbf                                                                                                                                                                               100%   36MB  15.5MB/s   00:02    
arch1_213_1119711914.dbf                                                                                                                                                                               100%   31MB  96.7MB/s   00:00    
arch1_214_1119711914.dbf                                                                                                                                                                               100%   35MB  84.1MB/s   00:00    
arch1_215_1119711914.dbf                                                                                                                                                                               100%   37MB  36.9MB/s   00:01    
arch1_216_1119711914.dbf                                                                                                                                                                               100%   29MB  86.7MB/s   00:00    
arch1_217_1119711914.dbf                                                                                                                                                                               100%   16MB  63.1MB/s   00:00    
arch1_218_1119711914.dbf                                                                                                                                                                               100%   31MB  38.4MB/s   00:00    
arch1_219_1119711914.dbf                                                                                                                                                                               100%   31MB  26.7MB/s   00:01    
arch1_220_1119711914.dbf                                                                                                                                                                               100%   33MB  44.9MB/s   00:00    
arch1_221_1119711914.dbf                                                                                                                                                                               100%   32MB  28.7MB/s   00:01    
arch1_222_1119711914.dbf                                                                                                                                                                               100%   31MB  34.5MB/s   00:00    
arch1_223_1119711914.dbf                                                                                                                                                                               100%   30MB  48.0MB/s   00:00    
arch1_224_1119711914.dbf                                                                                                                                                                               100%   33MB  24.7MB/s   00:01    
arch1_225_1119711914.dbf                                                                                                                                                                               100%   32MB  17.9MB/s   00:01    
arch1_226_1119711914.dbf                                                                                                                                                                               100%   35MB  17.0MB/s   00:02    
arch1_227_1119711914.dbf                                                                                                                                                                               100%   38MB  32.0MB/s   00:01    
arch1_228_1119711914.dbf                                                                                                                                                                               100%   33MB  72.9MB/s   00:00    
arch1_229_1119711914.dbf                                                                                                                                                                               100%   41MB  59.2MB/s   00:00    
arch1_230_1119711914.dbf                                                                                                                                                                               100%   33MB  55.8MB/s   00:00    
arch1_231_1119711914.dbf                                                                                                                                                                               100%   33MB  33.9MB/s   00:00    
arch1_232_1119711914.dbf                                                                                                                                                                               100%   33MB  28.5MB/s   00:01    
arch1_233_1119711914.dbf                                                                                                                                                                               100%   30MB  51.3MB/s   00:00    
arch1_234_1119711914.dbf                                                                                                                                                                               100%   33MB  22.2MB/s   00:01    
arch1_235_1119711914.dbf                                                                                                                                                                               100%   32MB  17.3MB/s   00:01    
arch1_236_1119711914.dbf                                                                                                                                                                               100%   31MB  16.4MB/s   00:01    
arch1_237_1119711914.dbf                                                                                                                                                                               100%   30MB  10.3MB/s   00:02    
arch1_238_1119711914.dbf                                                                                                                                                                               100%   30MB  19.4MB/s   00:01    
arch1_239_1119711914.dbf                                                                                                                                                                               100%   35MB  19.7MB/s   00:01    
arch1_240_1119711914.dbf                                                                                                                                                                               100%   30MB  77.1MB/s   00:00    
arch1_241_1119711914.dbf                                                                                                                                                                               100%   31MB  66.6MB/s   00:00    
arch1_242_1119711914.dbf                                                                                                                                                                               100%   30MB  21.7MB/s   00:01    
arch1_243_1119711914.dbf                                                                                                                                                                               100%   31MB  25.9MB/s   00:01    
arch1_244_1119711914.dbf                                                                                                                                                                               100%   31MB  64.7MB/s   00:00    
arch1_245_1119711914.dbf                                                                                                                                                                               100%   33MB  36.6MB/s   00:00    
arch1_246_1119711914.dbf                                                                                                                                                                               100%   30MB  23.9MB/s   00:01    
arch1_247_1119711914.dbf                                                                                                                                                                               100%   33MB  30.2MB/s   00:01    
arch1_248_1119711914.dbf                                                                                                                                                                               100%   39MB  28.4MB/s   00:01    
arch1_249_1119711914.dbf                                                                                                                                                                               100%   41MB  26.7MB/s   00:01    
arch1_250_1119711914.dbf                                                                                                                                                                               100%   40MB  24.2MB/s   00:01    
arch1_251_1119711914.dbf                                                                                                                                                                               100%   31MB  20.3MB/s   00:01    
arch1_252_1119711914.dbf                                                                                                                                                                               100%   33MB  16.9MB/s   00:01    
arch1_253_1119711914.dbf                                                                                                                                                                               100%   16MB   9.2MB/s   00:01    
arch1_254_1119711914.dbf                                                                                                                                                                               100%   41MB  23.0MB/s   00:01    
arch1_255_1119711914.dbf                                                                                                                                                                               100%   38MB  20.2MB/s   00:01    
arch1_256_1119711914.dbf                                                                                                                                                                               100%   32MB  67.0MB/s   00:00    
arch1_257_1119711914.dbf                                                                                                                                                                               100%   35MB  27.8MB/s   00:01    
arch1_258_1119711914.dbf                                                                                                                                                                               100%   31MB  24.8MB/s   00:01    
arch1_259_1119711914.dbf                                                                                                                                                                               100% 7283KB  18.8MB/s   00:00    
[oracle@oracle-db-19cs dbs]$ 
[oracle@oracle-db-19cs dbs]$ scp -r /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch* 192.168.8.152:/u01/app/oracle/product/19.3.0/dbhome_1/dbs/
[oracle@oracle-db-19ct dbs]$ ls -ltr arch1*.dbf | wc -l
133
[oracle@oracle-db-19ct dbs]$ 

 3. 复制所有的备份文件

目标数据库文件夹需创建:

[oracle@oracle-db-19ct ~]$ pwd
/home/oracle
[oracle@oracle-db-19ct ~]$ mkdir /home/oracle/rmanback
[oracle@oracle-db-19ct ~]$ cd /home/oracle/rmanback
[oracle@oracle-db-19ct rmanback]$ 
[oracle@oracle-db-19cs rmanback]$ ls -ltr
total 4392664
-rw-r-----. 1 oracle oinstall 1672699904 Mar  2 11:49 data_241m1fkn_1_1.dbf
-rw-r-----. 1 oracle oinstall 1032208384 Mar  2 11:49 data_251m1fmo_1_1.dbf
-rw-r-----. 1 oracle oinstall  642031616 Mar  2 11:50 data_261m1fn0_1_1.dbf
-rw-r-----. 1 oracle oinstall  548913152 Mar  2 11:50 data_271m1fnp_1_1.dbf
-rw-r-----. 1 oracle oinstall  583163904 Mar  2 11:50 data_281m1fo8_1_1.dbf
-rw-r-----. 1 oracle oinstall   19070976 Mar  2 11:52 control_0.dbf
[oracle@oracle-db-19cs rmanback]$ scp * 192.168.8.152:/home/oracle/rmanback/
oracle@192.168.8.152's password: 
control_0.dbf                                                                                                                                                                                          100%   18MB  79.3MB/s   00:00    
data_241m1fkn_1_1.dbf                                                                                                                                                                                  100% 1595MB  53.8MB/s   00:29    
data_251m1fmo_1_1.dbf                                                                                                                                                                                  100%  984MB  58.5MB/s   00:16    
data_261m1fn0_1_1.dbf                                                                                                                                                                                  100%  612MB  52.7MB/s   00:11    
data_271m1fnp_1_1.dbf                                                                                                                                                                                  100%  523MB  38.9MB/s   00:13    
data_281m1fo8_1_1.dbf                                                                                                                                                                                  100%  556MB  36.0MB/s   00:15    
[oracle@oracle-db-19cs rmanback]$ 

Step4: 备份恢复

1.恢复控制文件

[oracle@oracle-db-19ct dbs]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 2 13:37:44 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup nomount
ORACLE instance started.Total System Global Area  629145392 bytes
Fixed Size                  9137968 bytes
Variable Size             423624704 bytes
Database Buffers          180355072 bytes
Redo Buffers               16027648 bytes
SQL> 

注意:数据库启动到nomount状态下,先确认参数文件里目录是否都存在,查看参数文件可以使用 strings spfilecdb1.ora

[oracle@oracle-db-19ct ~]$ cd rmanback
[oracle@oracle-db-19ct rmanback]$ ls -ltr
total 4387872
-rw-r-----. 1 oracle oinstall   19070976 Mar  1 21:28 control_0.dbf
-rw-r-----. 1 oracle oinstall 1667801088 Mar  1 21:28 data_231lvot2_1_1.dbf
-rw-r-----. 1 oracle oinstall 1032216576 Mar  1 21:28 data_241lvou5_1_1.dbf
-rw-r-----. 1 oracle oinstall  642015232 Mar  1 21:28 data_251lvov8_1_1.dbf
-rw-r-----. 1 oracle oinstall  548913152 Mar  1 21:28 data_261lvp02_1_1.dbf
-rw-r-----. 1 oracle oinstall  583163904 Mar  1 21:28 data_271lvp0h_1_1.dbf
[oracle@oracle-db-19ct rmanback]$ pwd
/home/oracle/rmanback
[oracle@oracle-db-19ct rmanback]$ 
[oracle@oracle-db-19ct rmanback]$ rman target /Recovery Manager: Release 19.0.0.0.0 - Production on Wed Mar 1 21:38:48 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.connected to target database: CDB1 (not mounted)RMAN> restore controlfile from '/home/oracle/rmanback/control_0.dbf';Starting restore at 01-MAR-23
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=262 device type=DISKchannel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u02/oradata/CDB1/control01.ctl
output file name=/u02/oradata/CDB1/control02.ctl
Finished restore at 01-MAR-23RMAN> 

2.恢复数据文件

数据库启动到mount 状态, 在RMAN中启动即可。

[oracle@oracle-db-19ct rmanback]$ rman target /Recovery Manager: Release 19.0.0.0.0 - Production on Wed Mar 1 21:38:48 2023
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.connected to target database: CDB1 (not mounted)RMAN> RMAN> sql 'alter database mount';sql statement: alter database mount
released channel: ORA_DISK_1RMAN> restore database;Starting restore at 01-MAR-23
Starting implicit crosscheck backup at 01-MAR-23
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=264 device type=DISK
Crosschecked 28 objects
Finished implicit crosscheck backup at 01-MAR-23Starting implicit crosscheck copy at 01-MAR-23
using channel ORA_DISK_1
Crosschecked 2 objects
Finished implicit crosscheck copy at 01-MAR-23searching for all files in the recovery area
cataloging files...
no files catalogedusing channel ORA_DISK_1channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u02/oradata/CDB1/system01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u02/oradata/CDB1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u02/oradata/CDB1/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /u02/oradata/CDB1/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/rmanback/data_231lvot2_1_1.dbf
channel ORA_DISK_1: piece handle=/home/oracle/rmanback/data_231lvot2_1_1.dbf tag=TAG20230301T201426
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00009 to /u02/oradata/CDB1/pdb1/system01.dbf
channel ORA_DISK_1: restoring datafile 00010 to /u02/oradata/CDB1/pdb1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00011 to /u02/oradata/CDB1/pdb1/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00012 to /u02/oradata/CDB1/pdb1/users01.dbf
channel ORA_DISK_1: restoring datafile 00085 to /u02/oradata/CDB1/pdb1/data01.dbf
channel ORA_DISK_1: restoring datafile 00126 to /u02/oradata/CDB1/pdb1/TBS_MAXWELL_01.dbf
channel ORA_DISK_1: restoring datafile 00127 to /u02/oradata/CDB1/pdb1/undotbs02.dbf
channel ORA_DISK_1: restoring datafile 00163 to /u02/oradata/CDB1/pdb1/TBS_TOOLS01.dbf
channel ORA_DISK_1: restoring datafile 00169 to /u02/oradata/CDB1/pdb1/rman01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/rmanback/data_241lvou5_1_1.dbf
channel ORA_DISK_1: piece handle=/home/oracle/rmanback/data_241lvou5_1_1.dbf tag=TAG20230301T201426
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00013 to /u02/oradata/CDB1/pdb2/system01.dbf
channel ORA_DISK_1: restoring datafile 00014 to /u02/oradata/CDB1/pdb2/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00015 to /u02/oradata/CDB1/pdb2/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00016 to /u02/oradata/CDB1/pdb2/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/rmanback/data_251lvov8_1_1.dbf
channel ORA_DISK_1: piece handle=/home/oracle/rmanback/data_251lvov8_1_1.dbf tag=TAG20230301T201426
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00162 to /u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_system_kyv81s6t_.dbf
channel ORA_DISK_1: restoring datafile 00164 to /u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_sysaux_kyv81s6v_.dbf
channel ORA_DISK_1: restoring datafile 00165 to /u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_undotbs1_kyv81s6w_.dbf
channel ORA_DISK_1: restoring datafile 00166 to /u02/oradata/CDB1/F4C9A1F8230F2E5CE0538A08A8C02747/datafile/o1_mf_users_kyv82cng_.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/rmanback/data_261lvp02_1_1.dbf
channel ORA_DISK_1: piece handle=/home/oracle/rmanback/data_261lvp02_1_1.dbf tag=TAG20230301T201426
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /u02/oradata/CDB1/pdbseed/system01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u02/oradata/CDB1/pdbseed/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00008 to /u02/oradata/CDB1/pdbseed/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/rmanback/data_271lvp0h_1_1.dbf
channel ORA_DISK_1: piece handle=/home/oracle/rmanback/data_271lvp0h_1_1.dbf tag=TAG20230301T201426
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 01-MAR-23RMAN> 

 检查控制文件和实际物理文件的差别 

crosscheck archivelog all;
---由于校验归档日志之前被删掉了,因此校验不成功。
RMAN> crosscheck archivelog all;released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_127_1119711914.dbf RECID=2 STAMP=1127667631
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_128_1119711914.dbf RECID=3 STAMP=1127685612
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_129_1119711914.dbf RECID=4 STAMP=1127685624
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_130_1119711914.dbf RECID=5 STAMP=1127689973
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_131_1119711914.dbf RECID=6 STAMP=1127689974
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_132_1119711914.dbf RECID=7 STAMP=1127724774
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_133_1119711914.dbf RECID=8 STAMP=1127728754
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_134_1119711914.dbf RECID=9 STAMP=1127728793
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_135_1119711914.dbf RECID=10 STAMP=1127728812
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_136_1119711914.dbf RECID=11 STAMP=1127728827
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_137_1119711914.dbf RECID=12 STAMP=1127729004
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_138_1119711914.dbf RECID=13 STAMP=1127729025
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_139_1119711914.dbf RECID=14 STAMP=1127729046
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_140_1119711914.dbf RECID=15 STAMP=1127729058
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_141_1119711914.dbf RECID=16 STAMP=1127729073
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_142_1119711914.dbf RECID=17 STAMP=1127729136
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_143_1119711914.dbf RECID=18 STAMP=1127729157
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_144_1119711914.dbf RECID=19 STAMP=1127729172
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_145_1119711914.dbf RECID=20 STAMP=1127729188
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_146_1119711914.dbf RECID=21 STAMP=1127730005
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_147_1119711914.dbf RECID=22 STAMP=1127730023
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_148_1119711914.dbf RECID=23 STAMP=1127730035
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_149_1119711914.dbf RECID=24 STAMP=1127730108
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_150_1119711914.dbf RECID=25 STAMP=1127730131
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_151_1119711914.dbf RECID=26 STAMP=1127730147
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_152_1119711914.dbf RECID=27 STAMP=1127730161
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_153_1119711914.dbf RECID=28 STAMP=1127730514
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_154_1119711914.dbf RECID=29 STAMP=1127730532
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_155_1119711914.dbf RECID=30 STAMP=1127730546
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_156_1119711914.dbf RECID=31 STAMP=1127730562
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_157_1119711914.dbf RECID=32 STAMP=1127741455
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_158_1119711914.dbf RECID=33 STAMP=1127743219
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_159_1119711914.dbf RECID=34 STAMP=1127750437
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_160_1119711914.dbf RECID=35 STAMP=1127757631
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_161_1119711914.dbf RECID=36 STAMP=1127758186
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_162_1119711914.dbf RECID=37 STAMP=1127759256
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_163_1119711914.dbf RECID=38 STAMP=1127759364
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_164_1119711914.dbf RECID=39 STAMP=1127850117
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_165_1119711914.dbf RECID=40 STAMP=1127939816
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_166_1119711914.dbf RECID=41 STAMP=1127939848
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_167_1119711914.dbf RECID=42 STAMP=1127946046
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_168_1119711914.dbf RECID=43 STAMP=1127946067
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_169_1119711914.dbf RECID=44 STAMP=1128379323
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_170_1119711914.dbf RECID=45 STAMP=1128380785
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_171_1119711914.dbf RECID=46 STAMP=1128450621
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_172_1119711914.dbf RECID=47 STAMP=1128457847
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_173_1119711914.dbf RECID=48 STAMP=1128693769
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_174_1119711914.dbf RECID=49 STAMP=1128695040
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_175_1119711914.dbf RECID=50 STAMP=1128700467
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_176_1119711914.dbf RECID=51 STAMP=1128710557
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_177_1119711914.dbf RECID=52 STAMP=1128769172
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_178_1119711914.dbf RECID=53 STAMP=1128780015
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_179_1119711914.dbf RECID=54 STAMP=1128785420
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_180_1119711914.dbf RECID=55 STAMP=1128857420
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_181_1119711914.dbf RECID=56 STAMP=1128866414
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_182_1119711914.dbf RECID=57 STAMP=1128870346
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_183_1119711914.dbf RECID=58 STAMP=1128888298
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_184_1119711914.dbf RECID=59 STAMP=1128895223
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_185_1119711914.dbf RECID=60 STAMP=1128895253
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_186_1119711914.dbf RECID=61 STAMP=1128897235
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_187_1119711914.dbf RECID=62 STAMP=1128933711
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_188_1119711914.dbf RECID=63 STAMP=1128934471
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_189_1119711914.dbf RECID=64 STAMP=1128934495
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_190_1119711914.dbf RECID=65 STAMP=1128934522
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_191_1119711914.dbf RECID=66 STAMP=1128934552
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_192_1119711914.dbf RECID=67 STAMP=1128934696
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_193_1119711914.dbf RECID=68 STAMP=1128934714
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_194_1119711914.dbf RECID=69 STAMP=1128934742
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_195_1119711914.dbf RECID=70 STAMP=1128934764
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_196_1119711914.dbf RECID=71 STAMP=1128934835
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_197_1119711914.dbf RECID=72 STAMP=1128934856
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_198_1119711914.dbf RECID=73 STAMP=1128934880
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_199_1119711914.dbf RECID=74 STAMP=1128934901
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_200_1119711914.dbf RECID=75 STAMP=1128936384
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_201_1119711914.dbf RECID=76 STAMP=1128936396
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_202_1119711914.dbf RECID=77 STAMP=1128936409
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_203_1119711914.dbf RECID=78 STAMP=1128936627
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_204_1119711914.dbf RECID=79 STAMP=1128937421
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_205_1119711914.dbf RECID=80 STAMP=1128937515
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_206_1119711914.dbf RECID=81 STAMP=1128938432
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_207_1119711914.dbf RECID=82 STAMP=1128951129
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_208_1119711914.dbf RECID=83 STAMP=1128952817
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_209_1119711914.dbf RECID=84 STAMP=1128952835
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_210_1119711914.dbf RECID=85 STAMP=1128952862
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_211_1119711914.dbf RECID=86 STAMP=1128952898
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_212_1119711914.dbf RECID=87 STAMP=1128952928
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_213_1119711914.dbf RECID=88 STAMP=1128953060
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_214_1119711914.dbf RECID=89 STAMP=1128953084
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_215_1119711914.dbf RECID=90 STAMP=1128953111
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_216_1119711914.dbf RECID=91 STAMP=1128959588
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_217_1119711914.dbf RECID=92 STAMP=1128963955
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_218_1119711914.dbf RECID=93 STAMP=1129030207
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_219_1119711914.dbf RECID=94 STAMP=1129039232
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_220_1119711914.dbf RECID=95 STAMP=1129044659
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_221_1119711914.dbf RECID=96 STAMP=1129059052
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_222_1119711914.dbf RECID=97 STAMP=1129108942
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_223_1119711914.dbf RECID=98 STAMP=1129109032
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_224_1119711914.dbf RECID=99 STAMP=1129113025
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_225_1119711914.dbf RECID=100 STAMP=1129123476
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_226_1119711914.dbf RECID=101 STAMP=1129126314
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_227_1119711914.dbf RECID=102 STAMP=1129127442
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_228_1119711914.dbf RECID=103 STAMP=1129131040
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_229_1119711914.dbf RECID=104 STAMP=1129140015
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_230_1119711914.dbf RECID=105 STAMP=1129210305
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_231_1119711914.dbf RECID=106 STAMP=1129211074
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_232_1119711914.dbf RECID=107 STAMP=1129212010
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_233_1119711914.dbf RECID=108 STAMP=1129219235
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_234_1119711914.dbf RECID=109 STAMP=1129226917
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_235_1119711914.dbf RECID=110 STAMP=1129233659
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_236_1119711914.dbf RECID=111 STAMP=1129271414
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_237_1119711914.dbf RECID=112 STAMP=1129282238
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_238_1119711914.dbf RECID=113 STAMP=1129288681
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_239_1119711914.dbf RECID=114 STAMP=1129300997
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_240_1119711914.dbf RECID=115 STAMP=1129312445
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_241_1119711914.dbf RECID=116 STAMP=1129320035
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_242_1119711914.dbf RECID=117 STAMP=1129366220
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_243_1119711914.dbf RECID=118 STAMP=1129377604
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_244_1119711914.dbf RECID=119 STAMP=1129384843
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_245_1119711914.dbf RECID=120 STAMP=1129395657
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_246_1119711914.dbf RECID=121 STAMP=1129407269
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_247_1119711914.dbf RECID=122 STAMP=1129984935
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_248_1119711914.dbf RECID=123 STAMP=1129984942
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_249_1119711914.dbf RECID=124 STAMP=1129984949
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_250_1119711914.dbf RECID=125 STAMP=1129984960
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_251_1119711914.dbf RECID=126 STAMP=1129989635
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_252_1119711914.dbf RECID=127 STAMP=1129998632
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_253_1119711914.dbf RECID=128 STAMP=1130351543
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_254_1119711914.dbf RECID=129 STAMP=1130351881
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_255_1119711914.dbf RECID=130 STAMP=1130351894
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_256_1119711914.dbf RECID=131 STAMP=1130355775
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_257_1119711914.dbf RECID=132 STAMP=1130365209
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_258_1119711914.dbf RECID=133 STAMP=1130408117
validation succeeded for archived log
archived log file name=/u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch1_259_1119711914.dbf RECID=134 STAMP=1130409728
Crosschecked 133 objectsRMAN> 

 源数据库

 若上面归档日志校验失败, 则执行下面指令 。

等到归档日志校验成功后,恢复数据库。

RMAN> recover database;Starting recover at 01-MAR-23
using channel ORA_DISK_1starting media recoveryunable to find archived log
archived log thread=1 sequence=258
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/01/2023 22:01:41
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 258 and starting SCN of 22442313RMAN> 

此时报错,则通过以下命令执行:

RMAN> recover database;Starting recover at 01-MAR-23
using channel ORA_DISK_1starting media recoveryunable to find archived log
archived log thread=1 sequence=258
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/01/2023 22:01:41
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 258 and starting SCN of 22442313RMAN> RMAN> recover database until sequence 258;Starting recover at 01-MAR-23
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/01/2023 22:03:49
RMAN-06556: datafile 1 must be restored from backup older than SCN 22441179RMAN> 

最后进行的是不完全恢复。参考链接如下:

相关文章:

Rman单实例迁移到单实例

关于同平台同版本数据库之间的迁移操作的实验 ---Source DB[rootoracle-db-19cs ~]# cat /etc/redhat-release CentOS Stream release 8 [rootoracle-db-19cs ~]# --- Target DB[rootoracle-db-19ct ~]# cat /etc/redhat-release CentOS Stream release 8 [rootoracle-db-19ct…...

毕业设计 基于stm32舞台彩灯控制器设计app控制系统

基于stm32舞台彩灯控制器设计app控制1、项目简介1.1 系统构成1.2 系统功能2、部分电路设计2.1 STM32F103C8T6核心系统电路设计2.2 WS2812RGB彩灯电路设计3、部分代码展示3.1 控制WS2812显示颜色3.2 设置RGB灯的颜色,角度,亮度实物图1、项目简介 选题指导…...

【MyBatis】篇一.

文章目录1、MyBatis概述2、环境搭建1、MyBatis概述 认识: JavaEE开发的一个套件SSM,即: MyBatis是一个持久层的框架,是对JDBC的一个封装,是一个半自动的ORM框架。 ORM即实体类对象和数据库中的数据的一个映射关系&am…...

【JavaScript速成之路】JavaScript流程控制

📃个人主页:「小杨」的csdn博客 🔥系列专栏:【JavaScript速成之路】 🐳希望大家多多支持🥰一起进步呀! 文章目录前言1,流程控制2,分支结构2.1,if语句2.2&…...

18、基准测试,sysbench

基准测试,sysbench 1. sysbench1.1 用途1.2 安装1.3 版本1.4 查看帮助1.5 测试过程阶段2 CPU 性能测试2.1 测试原理2.2 查看帮助2.3 测试3. 内存性能测试3.1 查看帮助信息3.2 测试过程4.磁盘性能基准测试4.1 查看帮助4.2 生成文件(prepare)4.3 测试文件io(run)4.4 结果分析4.5…...

3D,点云拼接2

文章目录 点云配准方法自动配准技术PCL实现的配准算法两两配准1.关键点提取2.特征描述符3. 对应关系估计4. 对应关系去除5. 变换矩阵估算在上篇文章中对于拼接的概念、拼接精度的评价做了详细的介绍。本文是对拼接(配准)的进一步介绍,涉及更多原理层面的东西。 主要围绕以下三…...

jmeter学习笔记一(http基础知识)

HTTP请求:客户端同通过发送http请求向服务器请求资源的访问。http请求由三部分组成:请求行、请求头、请求正文 ​ 请求行包括:请求方法 URI 协议/版本 ​ 请求头:Content-type、Cookie、Authorization、User-Agent、Accept、Acc…...

【Java】CompletableFuture 并发顺序调度

前言 Java CompletableFuture 提供了一种异步编程的方式,可以在一个线程中执行长时间的任务,而不会堵塞主线程。 和Future相比,CompletableFuture不仅实现了Future接口,也实现了 CompletionStage接口。Future接口不用多说&#…...

职场人必备的6款实用办公app,每一款都是心头爱

打工人不容易啊,不提高工作效率怕是要被淘汰了。今天给大家分享6款职场人必备的实用办公APP,免费效率神器让工作事半功倍。这些APP每一款都是我的心头爱,肯定会让人大开眼界的,超级实用,直接往下看吧。1、向日葵远程控…...

小丑改造计划之复习一

1.函数重载 根据参数个数 参数顺序 参数类型 的不同 可以在同一个域存在多个同名函数 但是不可以根据返回值 缺省参数的不同去重载函数 2.指针和引用的区别 第一点 指针是内存地址,会开辟内存空间,而引用和它所引用的变量共享同一块内存 第二点 引用必须…...

final修饰符使用中遇到的一些问题

文章目录final修饰符1. final不能用来修饰构造方法2. final修饰变量的一些注意问题2.1 final修饰成员变量2.2 final修饰引用类型2.2.1 演示代码中lombok链式编程介绍final修饰符 final具有“不可改变”的含义,它可以修饰非抽象类、非抽象成员方法和变量。 用final…...

好记又实用的获取电脑型号方法

个人常用的方法 方法二最好记又好用。 方法一 dxdiag命令 按下键盘WINR调出运行在输入框输入dxdiag命令后,按下回车;进入DirectX诊断工具,便可查看系统型号等信息。 这里就会显示系统型号。 方法二 设备和打印机 控制面板-查看方式-小图…...

@Transactional配置详解

一:事务注解Transactional,属性propagation的7个配置 PROPAGATION_REQUIRED -- 支持当前事务,如果当前没有事务,就新建一个事务。,默认配置,也是常用的选择。 PROPAGATION_SUPPORTS -- 支持当前事务&#…...

性能测试面试题汇总

稳定性测试的怎么挑选的接口? 1、频繁使用的接口:选择那些被频繁使用的接口,因为这些接口可能会面临更大的负载和并发访问,从而可能导致性能问题。 2、核心功能接口:选择那些实现系统核心功能的接口,因为这…...

vue权限控制和动态路由

思路 登录:当用户填写完账号和密码后向服务端验证是否正确,验证通过之后,服务端会返回一个token,拿到token之后(我会将这个token存贮到localStore中,保证刷新页面后能记住用户登录状态)&#xf…...

利用正则表达式删掉代码中的所有注释-pycharm为例

首先删除注释 打开您想要删除注释的Python文件。 使用快捷键 Ctrl Shift R 打开 "Replace in Files"(在文件中替换)对话框。 在 "Find"(查找)框中输入以下正则表达式,以查找所有行中的注释内容…...

【java基础】内部类、局部内部类、匿名内部类、静态内部类

内部类 内部类就是定义在另一个类中的类。我们使用内部类的原因主要有以下两点 内部类可以对同一个包中的其他类隐藏内部类方法可以访问定义这个类的作用域中的数据,包括原本私有的数据 public class A {class B {} }我们使用内部类可以访问外部类的所有属性&…...

react renderProps学习记录

react renderProps学习记录1.引入2.改一下呢3.再改一下呢4.总结一下如何向组件内部动态传入带内容的结构(标签)?children propsrender props1.引入 上代码: import React, { Component } from react import ./index.css export default class Parent extends Com…...

关于tf.gather函数batch_dims参数用法的理解

关于tf.gather函数batch_dims参数用法的理解0 前言1. 不考虑batch_dims2. 批处理(考虑batch_dims)2.1 batch_dims12.2 batch_dims02.3 batch_dims>22.4 batch_dims再降为12.5 再将axis降为12.6 batch_dims<02.7 batch_dims总结3. 补充4. 参数和返回值5. 其他相关论述6. 附…...

日常操作linux常用命令

cd /mnt/opt/cqstt/logs/stt-erp docker logs -f --tail1000 stt-erp # 查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l # 查看每个物理CPU中core的个数(即核数) cat /proc/cpuinfo| grep "cpu cores"| uniq # 查看逻辑CPU的…...

【Java集合框架】篇二:Collection接口方法

JDK不提供此接口的任何直接实现类&#xff0c;而是提供更具体的子接口&#xff08;如&#xff1a;Set和List&#xff09;去实现。 Collection 接口是 List和Set接口的父接口&#xff0c;该接口里定义的方法既可用于操作 Set 集合&#xff0c;也可用于操作 List 集合。方法如下…...

PHP入门指南:简单易学的语法和丰富的调试工具与安全性最佳实践

PHP是一种非常流行的服务器端编程语言&#xff0c;它被广泛地应用于Web开发中。如果您想学习Web开发&#xff0c;那么PHP是一个非常好的选择。在本文中&#xff0c;我将介绍PHP的一些基础知识&#xff0c;包括语法、变量、函数、数组、数据库连接、调试和安全性等。PHP的语法PH…...

前端面试题--HTML篇

一、src和href的区别src指向外部资源的位置&#xff0c;指向的内容会嵌入到文档中当前标签所在的位置&#xff1b;href指向网络资源的位置&#xff0c;建立和当前元素或当前文档之间的链接。二、对HTML语义化的理解根据内容的结构化&#xff0c;选择合适的标签。优点&#xff1…...

SpringBoot集成ElasticSearch,实现模糊查询,批量CRUD,排序,分页,高亮

导入elasticsearch依赖在pom.xml里加入如下依赖&#xff1a;<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-elasticsearch</artifactId> </dependency>非常重要&#xff1a;检查依赖版本…...

常用Swagger注解汇总

常用Swagger注解汇总 前言 在实际编写后端代码的过程中&#xff0c;我们可能经常使用到 swagger 注解&#xff0c;但是会用不代表了解&#xff0c;你知道每个注解都有什么属性吗&#xff1f;你都用过这些属性吗&#xff1f;了解它们的作用吗&#xff1f;本文在此带大家总结一下…...

关于 TypeScript 声明文件

declare var 声明全局变量declare function 声明全局方法declare class 声明全局类declare enum 声明全局枚举类型declare namespace 声明&#xff08;含有子属性的&#xff09;全局对象interface 和 type 声明全局类型export 导出变量export namespace 导出&#xff08;含有子…...

SpringBoot学习-原理篇

SpringBoot原理篇springboot技术本身就是为了加速spring程序的开发的&#xff0c;可以大胆的说&#xff0c;springboot技术没有自己的原理层面的设计&#xff0c;仅仅是实现方案进行了改进。将springboot定位成工具&#xff0c;你就不会去想方设法的学习其原理了。就像是将木头…...

目标检测YOLOv5数据集怎么找?

完整的配置-标注-训练-识别在我这篇博客小白YOLOv5全流程-训练实现数字识别_yolov5数字识别_牛大了2022的博客-CSDN博客 模型部分剖析可以看我每周深度学习笔记部分。关于训练的数据集怎么搞很多人问过我&#xff0c;我在这篇文章给大家一点我的经验和建议。 数据集是什么 简…...

安卓短信自动填充踩坑

安卓短信自动填充踩坑 前言 最近弄了个短信自动填充功能&#xff0c;一开始觉得很简单&#xff0c;不就是动态注册个广播接收器去监听短信消息不就可以了吗&#xff1f;结果没这么简单&#xff0c;问题就出在机型的适配上。小米的短信权限、荣耀的短信监听都是坑&#xff0c;…...

【抽象类和接口的区别】

抽象类和接口都是Java中实现多态的机制&#xff0c;它们都是用来约束子类必须要实现的方法。但是它们有以下区别&#xff1a; 实现方式 实现方式&#xff1a;抽象类是一个类&#xff0c;而接口是一个接口。一个类只能继承一个抽象类&#xff0c;但可以实现多个接口。 构造方…...

杭州临平网站建设/广州关键词seo

jquery 缓存到浏览器这是您可能使用jQuery预加载图像以将图像添加到浏览器缓存 &#xff08;作为隐藏的DOM div元素的一部分&#xff09;的方式。 (function($,D,W) {var JQUERY4U {};JQUERY4U.UTIL {images:{loadingImage: ,ajaxImage: ,savingImage: },preloadImages: fun…...

个人做短视频网站/深圳全网推广托管

yum服务器lvm扩容&#xff0c;data目录是yum存放rpm包的目录&#xff0c;只有20G&#xff0c;需要添加磁盘扩容到80G# df -lhFilesystem Size Used Avail Use% Mounted on/dev/mapper/vg_node5-root 20G 479M 18G 3% /tmpfs 935M…...

网站加栏目/商务软文写作范文200字

说到学Java&#xff0c;许多初学者都会有的问题&#xff0c;到底是自学还是报培训班呢&#xff1f; 很多纠结的同学心里都会想&#xff0c;自学省钱&#xff0c;要是我坚持不下来呢&#xff1f;去培训班要是学出来找不到工作呢&#xff1f; 下面我来说说我的看法 自学还是报班…...

网站建设应用权限/百度搜索推广登录入口

为什么要写这个内容&#xff1f; 随着工作经历的积累&#xff0c;越来越感觉到&#xff0c;大量的关系型数据库的性能问题&#xff0c;其根源在于统计信息。这里说的是根源&#xff0c;其实很多时候大家觉得的那些什么索引失效等都只是表象。当然&#xff0c;不能一概而论&…...

代理注册公司需要什么条件/搜索引擎优化seo优惠

把info类下面所有的a标签链接后天加"#article"。 jQuery(document).ready(function($){   $(.info a).each(function(){     let Ahref $(this).attr("href") "#article";     $(this).attr("href",Ahref);   });});转载…...

安卓app开发实验报告/seo优化技术招聘

偶然得知中国有一种火星坐标系统。其原理是这样的&#xff1a;保密局开发了一个系统&#xff0c;能将实际的坐标转换成虚拟的坐标。所有在中国销售的数字地图必须使用这个系统进行坐标转换之后方可上市。这是生产环节&#xff0c;这种电子地图被称为火星地图。在使用环节&#…...