首页 » ORACLE 9i-23ai » WARNING: The converted filename ‘x’ is an ASM fully qualified filename. MUST_RENAME_THIS_DATAFILE On Oracle Standby

WARNING: The converted filename ‘x’ is an ASM fully qualified filename. MUST_RENAME_THIS_DATAFILE On Oracle Standby

Oracle standby database恢复错误,因为源库使用的ASM OMF文件名格式, 有配置xx_file_name_convert参数, 替换了standby controlfile文件缺失,无法找到对应文件。standby database reocver无法启动,查看db alert log如下:

WARNING: The converted filename '+DATADG/stdbillb/datafile/cdr3.289.1088277783'
         is an ASM fully qualified filename.
         Changing the filename to '+DATADG/MUST_RENAME_THIS_DATAFILE_773.4294967295.4294967295'.
         Please rename it accordingly.

ORA-01110: data file 773: 'x'
ORA-01565: error in identifying file 'x'

现在连接到备用数据库并检查数据文件的名称。

SQL> select  name,file# from v$datafile where name like '%MUST_RENAME_THIS_DATAFILE%'; 
NAME                                                                                      FILE#
-------------------------------------------------------------------------------            -------------
+DATADG/stdbillb/datafile/MUST_RENAME_THIS_DATAFILE_773.4294967295.4294967295               773 
...

可以从生产数据库中找到数据文件的确切名称,并将其用于恢复具有原始名称的数据文件。

set lines 900
col file_name format a60
select file_id, file_name , tablespace_name from dba_data_files where file_id in  (773,....);

由于ASM磁盘上没有可用的物理数据文件,因此需要使用“SET new name”参数恢复相同的数据文件名。

$ rman target / debug trace=/expdp/rman_dupl.trc msglog /u01/rman_clone3_log  
RMAN> set echo on;
show all;
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
allocate channel c5 device type disk;
allocate channel c9 device type disk;
allocate channel c6 device type disk;
allocate channel c7 device type disk;
allocate channel c8 device type disk;
set newname for datafile 773 to '+DATADG/stdbillb/datafile/cdr3.289.1088277783';
...
...
restore database from service pridb using compressed backupset;
switch datafile all;
recover database from service pridb using compressed backupset;
}

这将恢复所有丢失的数据文件,并且可以通过运行以下查询在备用数据库中进行检查。

SQL> set lines 900
 col file_name format a60
 select file_id, file_name , tablespace_name from dba_data_files where file_id in  (xx,xxx);

为了数据库的一致性,我建议使用rman恢复整个数据库,首先恢复CONTROLFILE,然后恢复FULL database restore,以避免任何其他不寻常的错误,也可以只恢复部分文件,如restore datafile xxx, switch datafile xxx 。

RMAN>
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
...
set newname for datafile 1 to '+DATADG/STDBILLB/DATAFILE/system.1284.1188076649;
...
restore datafile 1 from service pridb;
restore datafile 2 from service pridb;
restore datafile 3 from service pridb;
restore datafile 4 from service pridb;
-- list copy of datafile 1,2,3,4;
switch datafile 1,2,3,4 to copy;
}

-- OR --
RMAN> restore datafile 1 from service pridb;
RMAN> switch datafile 1 to copy;

 

用下面的查询再次检查错误数据文件。

SQL> select file#, name from v$datafile where name like '%MUST_RENAME_THIS_DATAFILE%'; 
no rows selected

查看所需的所有数据文件是否已恢复,并且备用数据库是否一致。

在恢复db或需要的数据文件时,可以通过以下查询查询恢复进度:

SELECT SID, SERIAL#, MESSAGE, CONTEXT, SOFAR, TOTALWORK, ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE" 
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' 
AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;

 

11g之前的版本还可以使用增量备份<How to Recover Oracle Standby Database Using an Incremental Backup?>

— over —

打赏

目前这篇文章还没有评论(Rss)

我要评论

上一篇:

下一篇: