在进行数据库备份有效性验证时,测试到一半时,出现了让我觉得有点莫名的错误
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/09/2019 10:55:02
ORA-19571: ??????μ? datafile copy RECID 261 STAMP 1013152438
ORA-19600: ????tafile-copy 261 ()
ORA-19601: ?3a datafile-copy 0 (/db_backup/data_D-TESTDB_TS-SYSTEM_FNO-1)
执行的脚本:
Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 7月 9 10:57:04 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTDB (DBID=*****, not open)
connected to recovery catalog database
recovery catalog schema release 18.03.00.00. is newer than RMAN release
RMAN> run{
2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> allocate channel c3 type disk;
5> allocate channel c4 type disk;
6> set newname for database to '/db_backup/%U';
7> restore database;
8> switch datafile all;
9> recover database;
10> release channel c1;
11> release channel c2;
12> release channel c3;
13> release channel c4;
14> }
15>
测试的数据库,采用catalog数据库管理备份元数据。在测试的时候,因为备份在以前出现过问题,还原测试的时候,在操作系统层面执行rm命令进行物理删除。删除之后再次进行还原,出现以上错误。
解决方式:
RMAN> set backup files for device type disk to accessible; RMAN> crosscheck copy of database device type disk; RMAN> delete expired copy of database device type disk;
清理掉expired的datafile copy之后,还原可以正常进行下去。
当然,执行以上操作时需要连接到catalog数据库。
总结: 采用catalog数据库作为备份元数据管理时,还原时,catalog会记录restore出来的数据文件信息,如果直接rm,可能造成问题。
参考:https://db-blog.web.cern.ch/blog/emil-pilecki/2016-04-datafile-copy-not-found-control-file-during-rman-recovery
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8520577/viewspace-2650143/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8520577/viewspace-2650143/