oracle异机还原一个pdb,CDB中备份,以及异机恢复的测试-程序员宅基地

技术标签: oracle异机还原一个pdb  

cdb+pdb$seed全备 (由于cdb和pdb$seed种子库所占空间总容量不多,所以每次都可以执行全备,不完全恢复的时候,restore时注意选择cdb库的时间)

RUN{

ALLOCATE CHANNEL ch0 TYPE DISK;

backup as compressed backupset INCREMENTAL LEVEL=0 FILESPERSET 5 database root tag cdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

backup as compressed backupset INCREMENTAL LEVEL=0 FILESPERSET 5 database 'PDB$SEED' forcetag cdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

RELEASE CHANNEL ch0;

}

pdb全备

RUN {

# backup all archive logs

ALLOCATE CHANNEL ch0 TYPE DISK;

backup as compressed backupset INCREMENTAL LEVEL=0 FILESPERSET 5 pluggable database ERWAPDB tag pdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

sql 'alter system archive log current';

backup as compressed backupset filesperset 20 FORMAT '/u01/arch/al_%s_%p_%t' ARCHIVELOG ALL;

backup FORMAT '/u01/arch/cntrl_%s_%p_%t' CURRENT CONTROLFILE tag=cntrl_lv0;

backup FORMAT '/u01/arch/spfile_%s_%p_%t' spfile tag=sfile_lv0;

RELEASE CHANNEL ch0;

}

pdb累积差异备份

RUN {

# backup all archive logs

ALLOCATE CHANNEL ch0 TYPE DISK;

backup as compressed backupset INCREMENTAL LEVEL=1 CUMULATIVE FILESPERSET 5 pluggable database ERWAPDB tag pdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

sql 'alter system archive log current';

backup as compressed backupset filesperset 20 FORMAT '/u01/arch/al_%s_%p_%t' ARCHIVELOG ALL;

backup FORMAT '/u01/arch/cntrl_%s_%p_%t' CURRENT CONTROLFILE tag=cntrl_lv0;

backup FORMAT '/u01/arch/spfile_%s_%p_%t' spfile tag=sfile_lv0;

RELEASE CHANNEL ch0;

}

参考资料:

How to use Rman to Restore Of Single PDB in Multitenant to Alternate Server (文档 ID 2142675.1)

Missing PDB$SEED's Datafiles with no backup (文档 ID 2104370.1)

R12c 新特性:RMAN 可插拔数据库的备份和恢复 (文档 ID 1945849.1)

测试的log记录

cdb全备:

[oracle@lxtrac05 arch]$ rman target /

Recovery Manager: Release 18.0.0.0.0 - Production on Mon Aug 13 15:28:45 2018

Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1510984000)

RMAN> RUN{

2> ALLOCATE CHANNEL ch0 TYPE DISK;

3> backup as compressed backupset INCREMENTAL LEVEL=0 FILESPERSET 5 database root tag cdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

4> backup as compressed backupset INCREMENTAL LEVEL=0 FILESPERSET 5 database "PDB$SEED" tag cdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

5> RELEASE CHANNEL ch0;

6> }

using target database control file instead of recovery catalog

allocated channel: ch0

channel ch0: SID=400 device type=DISK

Starting backup at 13-AUG-18

channel ch0: starting compressed incremental level 0 datafile backup set

channel ch0: specifying datafile(s) in backup set

input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf

input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/system01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL/users01.dbf

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/bk_101_1_984065363 tag=CDBFULL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:55

Finished backup at 13-AUG-18

Starting backup at 13-AUG-18

channel ch0: starting compressed incremental level 0 datafile backup set

channel ch0: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf

input datafile file number=00008 name=/u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/bk_102_1_984065418 tag=CDBFULL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:25

Finished backup at 13-AUG-18

Starting Control File and SPFILE Autobackup at 13-AUG-18

piece handle=/u01/arch/ORCL/autobackup/2018_08_13/o1_mf_s_984065444_fq2dx43y_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 13-AUG-18

released channel: ch0

RMAN>

pdb全备+归档日志备份:

[oracle@lxtrac05 arch]$ rman target /

Recovery Manager: Release 18.0.0.0.0 - Production on Mon Aug 13 15:32:51 2018

Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1510984000)

RMAN> RUN {

2> # backup all archive logs

3> ALLOCATE CHANNEL ch0 TYPE DISK;

4> backup as compressed backupset INCREMENTAL LEVEL=0 FILESPERSET 5 pluggable database ERWAPDB tag pdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

5> sql 'alter system archive log current';

6> backup as compressed backupset filesperset 20 FORMAT '/u01/arch/al_%s_%p_%t' ARCHIVELOG ALL;

7> backup FORMAT '/u01/arch/cntrl_%s_%p_%t' CURRENT CONTROLFILE tag=cntrl_lv0;

8> backup FORMAT '/u01/arch/spfile_%s_%p_%t' spfile tag=sfile_lv0;

9> RELEASE CHANNEL ch0;

10> }

using target database control file instead of recovery catalog

allocated channel: ch0

channel ch0: SID=397 device type=DISK

Starting backup at 13-AUG-18

channel ch0: starting compressed incremental level 0 datafile backup set

channel ch0: specifying datafile(s) in backup set

input datafile file number=00010 name=/u01/app/oracle/oradata/ORCL/erwapdb/sysaux01.dbf

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/bk_104_1_984065573 tag=PDBFULL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:25

channel ch0: starting compressed incremental level 0 datafile backup set

channel ch0: specifying datafile(s) in backup set

input datafile file number=00009 name=/u01/app/oracle/oradata/ORCL/erwapdb/system01.dbf

input datafile file number=00011 name=/u01/app/oracle/oradata/ORCL/erwapdb/undotbs01.dbf

input datafile file number=00013 name=/u01/app/oracle/oradata/ORCL/erwapdb/erwa01.dbf

input datafile file number=00012 name=/u01/app/oracle/oradata/ORCL/erwapdb/users01.dbf

input datafile file number=00014 name=/u01/app/oracle/oradata/ORCL/erwapdb/test02.dbf

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/bk_105_1_984065598 tag=PDBFULL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:15

Finished backup at 13-AUG-18

Starting Control File and SPFILE Autobackup at 13-AUG-18

piece handle=/u01/arch/ORCL/autobackup/2018_08_13/o1_mf_s_984065613_fq2f2g3p_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 13-AUG-18

sql statement: alter system archive log current

Starting backup at 13-AUG-18

current log archived

channel ch0: starting compressed archived log backup set

channel ch0: specifying archived log(s) in backup set

input archived log thread=1 sequence=61 RECID=39 STAMP=984047671

input archived log thread=1 sequence=62 RECID=40 STAMP=984047671

input archived log thread=1 sequence=63 RECID=41 STAMP=984048277

input archived log thread=1 sequence=64 RECID=42 STAMP=984048277

input archived log thread=1 sequence=65 RECID=43 STAMP=984059334

input archived log thread=1 sequence=66 RECID=44 STAMP=984059384

input archived log thread=1 sequence=67 RECID=45 STAMP=984059387

input archived log thread=1 sequence=68 RECID=46 STAMP=984059627

input archived log thread=1 sequence=69 RECID=47 STAMP=984059627

input archived log thread=1 sequence=70 RECID=48 STAMP=984059630

input archived log thread=1 sequence=71 RECID=49 STAMP=984059630

input archived log thread=1 sequence=72 RECID=50 STAMP=984059712

input archived log thread=1 sequence=73 RECID=51 STAMP=984059713

input archived log thread=1 sequence=74 RECID=52 STAMP=984059723

input archived log thread=1 sequence=75 RECID=53 STAMP=984059723

input archived log thread=1 sequence=76 RECID=54 STAMP=984064487

input archived log thread=1 sequence=77 RECID=55 STAMP=984064487

input archived log thread=1 sequence=78 RECID=56 STAMP=984065615

input archived log thread=1 sequence=79 RECID=57 STAMP=984065615

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/al_107_1_984065615 tag=TAG20180813T153335 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:07

Finished backup at 13-AUG-18

Starting backup at 13-AUG-18

channel ch0: starting full datafile backup set

channel ch0: specifying datafile(s) in backup set

including current control file in backup set

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/cntrl_108_1_984065623 tag=CNTRL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

Finished backup at 13-AUG-18

Starting backup at 13-AUG-18

channel ch0: starting full datafile backup set

channel ch0: specifying datafile(s) in backup set

including current SPFILE in backup set

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/spfile_109_1_984065625 tag=SFILE_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

Finished backup at 13-AUG-18

Starting Control File and SPFILE Autobackup at 13-AUG-18

piece handle=/u01/arch/ORCL/autobackup/2018_08_13/o1_mf_s_984065626_fq2f2tk0_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 13-AUG-18

released channel: ch0

RMAN>

pdb累积增量备份

[oracle@lxtrac05 arch]$ rman target /

Recovery Manager: Release 18.0.0.0.0 - Production on Mon Aug 13 15:40:42 2018

Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1510984000)

RMAN> RUN {

2> # backup all archive logs

3> ALLOCATE CHANNEL ch0 TYPE DISK;

4> backup as compressed backupset INCREMENTAL LEVEL=1 CUMULATIVE FILESPERSET 5 pluggable database ERWAPDB tag pdbfull_lv0 format '/u01/arch/bk_%s_%p_%t';

5> sql 'alter system archive log current';

6> backup as compressed backupset filesperset 20 FORMAT '/u01/arch/al_%s_%p_%t' ARCHIVELOG ALL;

7> backup FORMAT '/u01/arch/cntrl_%s_%p_%t' CURRENT CONTROLFILE tag=cntrl_lv0;

8> backup FORMAT '/u01/arch/spfile_%s_%p_%t' spfile tag=sfile_lv0;

9> RELEASE CHANNEL ch0;

10> }

using target database control file instead of recovery catalog

allocated channel: ch0

channel ch0: SID=397 device type=DISK

Starting backup at 13-AUG-18

channel ch0: starting compressed incremental level 1 datafile backup set

channel ch0: specifying datafile(s) in backup set

input datafile file number=00010 name=/u01/app/oracle/oradata/ORCL/erwapdb/sysaux01.dbf

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/bk_111_1_984066053 tag=PDBFULL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

channel ch0: starting compressed incremental level 1 datafile backup set

channel ch0: specifying datafile(s) in backup set

input datafile file number=00009 name=/u01/app/oracle/oradata/ORCL/erwapdb/system01.dbf

input datafile file number=00011 name=/u01/app/oracle/oradata/ORCL/erwapdb/undotbs01.dbf

input datafile file number=00013 name=/u01/app/oracle/oradata/ORCL/erwapdb/erwa01.dbf

input datafile file number=00012 name=/u01/app/oracle/oradata/ORCL/erwapdb/users01.dbf

input datafile file number=00015 name=/u01/app/oracle/oradata/ORCL/erwapdb/test03.dbf

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/bk_112_1_984066055 tag=PDBFULL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

Finished backup at 13-AUG-18

Starting Control File and SPFILE Autobackup at 13-AUG-18

piece handle=/u01/arch/ORCL/autobackup/2018_08_13/o1_mf_s_984066056_fq2fj895_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 13-AUG-18

sql statement: alter system archive log current

Starting backup at 13-AUG-18

current log archived

channel ch0: starting compressed archived log backup set

channel ch0: specifying archived log(s) in backup set

input archived log thread=1 sequence=61 RECID=39 STAMP=984047671

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/al_114_1_984066057 tag=TAG20180813T154057 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:07

channel ch0: starting compressed archived log backup set

channel ch0: specifying archived log(s) in backup set

input archived log thread=1 sequence=62 RECID=40 STAMP=984047671

input archived log thread=1 sequence=63 RECID=41 STAMP=984048277

input archived log thread=1 sequence=64 RECID=42 STAMP=984048277

input archived log thread=1 sequence=65 RECID=43 STAMP=984059334

input archived log thread=1 sequence=66 RECID=44 STAMP=984059384

input archived log thread=1 sequence=67 RECID=45 STAMP=984059387

input archived log thread=1 sequence=68 RECID=46 STAMP=984059627

input archived log thread=1 sequence=69 RECID=47 STAMP=984059627

input archived log thread=1 sequence=70 RECID=48 STAMP=984059630

input archived log thread=1 sequence=71 RECID=49 STAMP=984059630

input archived log thread=1 sequence=72 RECID=50 STAMP=984059712

input archived log thread=1 sequence=73 RECID=51 STAMP=984059713

input archived log thread=1 sequence=74 RECID=52 STAMP=984059723

input archived log thread=1 sequence=75 RECID=53 STAMP=984059723

input archived log thread=1 sequence=76 RECID=54 STAMP=984064487

input archived log thread=1 sequence=77 RECID=55 STAMP=984064487

input archived log thread=1 sequence=78 RECID=56 STAMP=984065615

input archived log thread=1 sequence=79 RECID=57 STAMP=984065615

input archived log thread=1 sequence=80 RECID=58 STAMP=984066057

input archived log thread=1 sequence=81 RECID=59 STAMP=984066057

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/al_115_1_984066064 tag=TAG20180813T154057 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

Finished backup at 13-AUG-18

Starting backup at 13-AUG-18

channel ch0: starting full datafile backup set

channel ch0: specifying datafile(s) in backup set

including current control file in backup set

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/cntrl_116_1_984066066 tag=CNTRL_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

Finished backup at 13-AUG-18

Starting backup at 13-AUG-18

channel ch0: starting full datafile backup set

channel ch0: specifying datafile(s) in backup set

including current SPFILE in backup set

channel ch0: starting piece 1 at 13-AUG-18

channel ch0: finished piece 1 at 13-AUG-18

piece handle=/u01/arch/spfile_117_1_984066068 tag=SFILE_LV0 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

Finished backup at 13-AUG-18

Starting Control File and SPFILE Autobackup at 13-AUG-18

piece handle=/u01/arch/ORCL/autobackup/2018_08_13/o1_mf_s_984066069_fq2fjomg_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 13-AUG-18

released channel: ch0

RMAN>

CDB异机恢复操作

1.恢复spfile文件,恢复控制文件

RMAN> restore spfile to '/u01/app/oracle/oradata/ORCL/spfileORCL.ora' from '/u01/arch/spfile_58_1_984048287';

Starting restore at 13-AUG-2018 10:55:10

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=2543 device type=DISK

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/arch/spfile_58_1_984048287

channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete

Finished restore at 13-AUG-2018 10:55:12

RMAN>

控制文件

RMAN> restore controlfile to '/u01/app/oracle/oradata/ORCL/control01.ctl' from '/u01/arch/cntrl_57_1_984048285';

Starting restore at 13-AUG-2018 10:56:50

using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 13-AUG-2018 10:56:51

RMAN>

2.使用恢复的spfile+控制文件,将数据库启动到mount状态。spfile的一些参数可能需要修改

[oracle@lenovotest2 arch]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Mon Aug 13 11:03:47 2018

Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area 4966054640 bytes

Fixed Size 8907504 bytes

Variable Size 2063597568 bytes

Database Buffers 2868903936 bytes

Redo Buffers 24645632 bytes

SQL> alter database mount;

Database altered.

SQL>

3.查看备份文件,然后restore database

RMAN> catalog start with '/u01/arch'; <<

恢复cdb+pdb$seed lv0

RMAN> run {

2> # set newname for to '+ASM'

3> restore database root ;

4> restore database "PDB$SEED";

5> }

Starting restore at 13-AUG-2018 15:48:16

Starting implicit crosscheck backup at 13-AUG-2018 15:48:16

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=33 device type=DISK

Crosschecked 15 objects

Finished implicit crosscheck backup at 13-AUG-2018 15:48:17

Starting implicit crosscheck copy at 13-AUG-2018 15:48:17

using channel ORA_DISK_1

Finished implicit crosscheck copy at 13-AUG-2018 15:48:17

searching for all files in the recovery area

cataloging files...

no files cataloged

using channel ORA_DISK_1

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 00001 to /u01/app/oracle/oradata/ORCL/system01.dbf

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/sysaux01.dbf

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ORCL/undotbs01.dbf

channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/ORCL/users01.dbf

channel ORA_DISK_1: reading from backup piece /u01/arch/bk_101_1_984065363

channel ORA_DISK_1: piece handle=/u01/arch/bk_101_1_984065363 tag=CDBFULL_LV0

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:05

Finished restore at 13-AUG-2018 15:49:23

Starting restore at 13-AUG-2018 15:49:23

using channel ORA_DISK_1

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 /u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf

channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf

channel ORA_DISK_1: restoring datafile 00008 to /u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf

channel ORA_DISK_1: reading from backup piece /u01/arch/bk_102_1_984065418

channel ORA_DISK_1: piece handle=/u01/arch/bk_102_1_984065418 tag=CDBFULL_LV0

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:25

Finished restore at 13-AUG-2018 15:49:48

RMAN>

恢复pdb lv0

RMAN> restore database erwapdb;

Starting restore at 13-AUG-2018 15:59:23

using channel ORA_DISK_1

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 00010 to /u01/app/oracle/oradata/ORCL/erwapdb/sysaux01.dbf

channel ORA_DISK_1: reading from backup piece /u01/arch/bk_104_1_984065573

channel ORA_DISK_1: piece handle=/u01/arch/bk_104_1_984065573 tag=PDBFULL_LV0

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 00009 to /u01/app/oracle/oradata/ORCL/erwapdb/system01.dbf

channel ORA_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/ORCL/erwapdb/undotbs01.dbf

channel ORA_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/ORCL/erwapdb/users01.dbf

channel ORA_DISK_1: restoring datafile 00013 to /u01/app/oracle/oradata/ORCL/erwapdb/erwa01.dbf

channel ORA_DISK_1: reading from backup piece /u01/arch/bk_105_1_984065598

channel ORA_DISK_1: piece handle=/u01/arch/bk_105_1_984065598 tag=PDBFULL_LV0

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 00015 to /u01/app/oracle/oradata/ORCL/erwapdb/test03.dbf

channel ORA_DISK_1: reading from backup piece /u01/arch/bk_112_1_984066055

channel ORA_DISK_1: piece handle=/u01/arch/bk_112_1_984066055 tag=PDBFULL_LV0

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 13-AUG-2018 15:59:55

RMAN>

recover database cdb+pdb(执行不完全恢复的 时间/logseq)

RMAN> recover database;

Starting recover at 13-AUG-2018 16:47:00

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 78 is already on disk as file /u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_78_fq2j7tvk_.arc

archived log for thread 1 with sequence 79 is already on disk as file /u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_79_fq2j7vb3_.arc

archived log for thread 1 with sequence 80 is already on disk as file /u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_80_fq2j7tx4_.arc

archived log for thread 1 with sequence 81 is already on disk as file /u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_81_fq2j7vb6_.arc

archived log file name=/u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_78_fq2j7tvk_.arc thread=1 sequence=78

archived log file name=/u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_79_fq2j7vb3_.arc thread=1 sequence=79

archived log file name=/u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_80_fq2j7tx4_.arc thread=1 sequence=80

archived log file name=/u01/arch/ORCL/archivelog/2018_08_13/o1_mf_1_81_fq2j7vb6_.arc thread=1 sequence=81

unable to find archived log

archived log thread=1 sequence=82

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 08/13/2018 16:47:02

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 82 and starting SCN of 2945920 <<<

RMAN>

用restlogs打开数据库

RMAN> alter database open resetlogs;

Statement processed

RMAN>

备注:

由于配置了CONFIGURE BACKUP OPTIMIZATION ON; 在备份的时候会跳过read only的表空间。也就是说pdb$seed会被跳过。在脚本里面加force即可。保证每次都会备份

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_32081953/article/details/116486360

智能推荐

【oracle数据文件损坏处理】-程序员宅基地

文章浏览阅读67次。2、在sqlplus中登录 conn mkgk/mkgk as sysdba,执行一下内容。2和6的状态是“status”,代表需要恢复。1、查看datafile信息(文件号、是否在线和路径名字)(此操作是为将数据文件6的状态改为在线)

VSCode C++开发环境设置-调试 macOS版_osx vscode 调试 addon-程序员宅基地

文章浏览阅读1.5k次。VSCode C++开发环境设置-调试引用,重点在于调试器设置文件 launch.json 。请先阅读VSCode C++开发环境设置-构建及运行 macOS版, 本文在其基础上进行说明。步骤我们创建launch.json文件来配置VSCode在我们调试的时候启动LLDB调试器。主菜单Run->Add Configuration, 在弹出的下拉窗口中选择C++ (GDB/LLDB)。然后下拉窗口选项变成了预定义的调试配置。选择clang++ build and debug._osx vscode 调试 addon

java验证webservice_java – 访问此资源需要完全身份验证 – Rest webservice调用-程序员宅基地

文章浏览阅读465次。我的应用程序是使用spring框架开发的.我使用spring框架创建了一个新的rest webservice.@Controllerpublic class MyTestController {@Injectprivate MyService service;@RequestMapping(value = "/acc/Status/{accNum}",method = RequestMethod...._java webservice需要验证才可以

mongodb实战_mongodb enum-程序员宅基地

文章浏览阅读2.7k次,点赞3次,收藏22次。先上图:pom.xml

向指定图像中加入干扰图像_图像添加直线干扰-程序员宅基地

文章浏览阅读861次。clcclearclose allload(‘存储的图像文件’);%本代码中采用RGB图像存储,并且把每张图片的每一个维度都转成一个行向量存到三个向量里;%%共r1人,每人r2张图,每人随机选择r3张r1=num;r2=x1;r3=x2;n=x3;%要加入的干扰图片的数量%%原图片的高度与宽度;x_h=height;y_w=width;xx_h=height_;%要加入的..._图像添加直线干扰

正则表达式和表单校验_html 表单校验 正则表达式-程序员宅基地

文章浏览阅读249次。正则表达式/../ 代表一个模式的开始和结束^ 匹配字符串的开始$ 匹配字符串的结束\s 任何空白字符\S 任何非空白字符\d 匹配一个数字字符,等价于[0-9]\D 除了数字之外的任何字符,等价于[^0-9]\w 匹配一个数字、下划线或字母字符,等价于[A-Za-z0-9_]\W 任何非单字字符,等价于[^A-Za-z0-9_]. 除了换_html 表单校验 正则表达式

随便推点

【11g Performance 】11 The Query Optimizer_11 the following information is available about t-程序员宅基地

文章浏览阅读282次。11The Query OptimizerThis chapter discusses SQL processing, optimization methods, and how thequery optimizer(usually called theoptimizer) chooses a specific plan to execute SQL.The chapter con..._11 the following information is available about t

Android 遍历文件夹,搜索指定扩展名的文件_1278-程序员宅基地

文章浏览阅读1k次。private List lstFile =new ArrayList(); //结果 List public void GetFiles(String Path, String Extension,boolean IsIterative) //搜索目录,扩展名,是否进入子文件夹{ File[] files =new File(Path).listFiles(_1278

辉哥基于android S 分析过度动画以及窗口动画_窗口动画和过渡动画区别-程序员宅基地

文章浏览阅读4.7k次,点赞4次,收藏12次。动画分析android 内有很多类型 这里主要讲过度动画和窗口动画的实现原理,包括动画如何启动以及后续如何更新帧数据。android 分了各种动画 比如过度动画或者窗口动画 然后过度动画又分了好多种什么Activity 打开动画 关闭动画等等,这里不要被这些花里胡哨的分类给搞昏了头,这里不管分了多少类,其实也只是区别场景而已,比如是app内子activity打开就为TRANSIT_OLD_ACTIVITY_OPEN ,然后应用间切换 其实本质也就是TASK 间切换 就为TRANSIT..._窗口动画和过渡动画区别

DS18B20嵌入式驱动程序_ds18b20驱动程序-程序员宅基地

文章浏览阅读3.4k次。DS18B20的特点:DS18B20 单线数字温度传感器,即“一线器件”,其具有独特的优点:( 1 )采用单总线的接口方式 与微处理器连接时仅需要一条口线即可实现微处理器与 DS18B20 的双向通讯。单总线具有经济性好,抗干扰能力强,适合于恶劣环境的现场温度测量,使用方便等优点,使用户可轻松地组建传感器网络,为测量系统的构建引入全新概念。( 2 )测量温度范围宽,测量精度高 DS18..._ds18b20驱动程序

java文件编译中报错unmappable character for encoding UTF-8-程序员宅基地

文章浏览阅读5.3k次。自己重新新建文件,然后代码复制粘贴就可以了。这说明有部分文件不是以utf-8编码创建的,我出现这个问题的原因是因为我的代码文件是直接自动生成的,文件不是自己创建的,导致使用的编码是不是utf-8,自己重新新建文件,然后代码复制粘贴就可以了。..._unmappable character for encoding utf-8

一句话解决RecyclerView 高度设置wrap_content 不显示 无作用的bug_recyclerview wrap_content不展示-程序员宅基地

文章浏览阅读5.7k次。一句话解决RecyclerView 高度设置wrap_content 不显示 无作用的bug_recyclerview wrap_content不展示

推荐文章

热门文章

相关标签