RMAN恢复之RMAN-06555处理

因为生产备份的时候排除了一个表空间:

 

 

解决方式:

 

1 、跳过表空间

recover database until time "to_date('2021-9-29 15:55:00','yyyy-mm-dd hh24:mi:ss')" skip forever tablespace BOSS3;

 

2 、使用脚本run,时间写在前面

#!/bin/bash

source /home/oracle/.bash_profile

export ORACLE_SID=jszg6

rmanlog=/home/oracle/scripts/log.txt

rman target / << EOF >> ${rmanlog}

run{

allocate channel t1 device type disk;

allocate channel t2 device type disk;

allocate channel t3 device type disk;

allocate channel t4 device type disk;

set until time "to_date('2021-9-29 15:55:00','yyyy-mm-dd hh24:mi:ss')";

set newname for datafile '+DATAC1/jszg/system01.dbf' to '+datac1/JSZG/datafile2/system01.dbf';

set newname for datafile '+DATAC1/jszg/sysaux01.dbf' to '+datac1/JSZG/datafile2/sysaux01.dbf';

set newname for datafile '+DATAC1/jszg/undotbs01.dbf' to '+datac1/JSZG/datafile2/undotbs01.dbf';

set newname for datafile '+DATAC1/jszg/undotbs02.dbf' to '+datac1/JSZG/datafile2/undotbs02.dbf';

........... 此处省略 ...............

set newname for datafile '+DATAC1/jszg/tbs_ac_8.dbf' to '+datac1/JSZG/datafile2/tbs_ac_8.dbf';

set newname for datafile '+DATAC1/jszg/gj05.dbf' to '+datac1/JSZG/datafile2/gj05.dbf';

set newname for datafile '+DATAC1/jszg/gj06.dbf' to '+datac1/JSZG/datafile2/gj06.dbf';

set newname for tempfile  '+DATAC1/jszg/temp01.dbf' to '+datac1/JSZG/datafile2/temp01.dbf';

set newname for tempfile  '+DATAC1/jszg/temp02.dbf' to '+datac1/JSZG/datafile2/temp02.dbf';

restore database;

switch datafile all;

switch tempfile all;

recover database;

#sql 'alter database open resetlogs';

release channel t1;

release channel t2;

release channel t3;

release channel t4;

}

exit;

EOF


请使用浏览器的分享功能分享到微信等