RMAN恢復之RMAN-06555處理

yingyifeng306發表於2022-04-15

因為生產備份的時候排除了一個表空間:

 

 

解決方式:

 

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


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23732248/viewspace-2887290/,如需轉載,請註明出處,否則將追究法律責任。

相關文章