RE: Recreate standby controlfile for DB that uses OMF and ASM

  • From: Yong Huang <yong321@xxxxxxxxx>
  • To: nupendra@xxxxxxxxxxx, Jinwen Zou <jzou@xxxxxxxxxxxxxx>
  • Date: Fri, 8 Jan 2010 07:48:28 -0800 (PST)

Upendra, this is physical standby. The problem is not in conversion 
of mydb to mydbsb. It's the trailing numbers of datafile names 
generated by OMF.

> if you are using
> standard datafile ASM template, the file name should be
> like tsname.file.incarnation(system.123.4567890),
> the 'file' should be generated by some internal
> sequences. Have 2 ls output
> of asmcmd, sort them by tsname and file; I guess we can get
> most of the mappings.

Jinwen,

I have another primary-standby running fine. On that good database, I 
order the names in v$datafile as follows:

On primary:

SQL> select file#, name from v$datafile order by 2;

     FILE# NAME
---------- ------------------------------------------------------
...
         6 +DATA/edmsp/datafile/mda_streamline_data.270.645873741
         9 +DATA/edmsp/datafile/mda_streamline_data.275.646482485
...
        32 +DATA/edmsp/datafile/mdahim_audit_data.305.656494329
        38 +DATA/edmsp/datafile/mdahim_audit_data.311.663928153

On standby:

SQL> select file#, name from v$datafile order by 2;

     FILE# NAME
---------- --------------------------------------------------------
...
         6 +DATA/edmspsb/datafile/mda_streamline_data.284.668607071
         9 +DATA/edmspsb/datafile/mda_streamline_data.297.668606145
...
        38 +DATA/edmspsb/datafile/mdahim_audit_data.275.668607689
        32 +DATA/edmspsb/datafile/mdahim_audit_data.296.668606151

All my datafiles are in the same directory in its respective database. 
If I interpret your theory correctly, the tablespace name (e.g. 
mdahim_audit_data) and ASM internal file number (e.g. 305,311 and 
275,296) should have the same order between primary and standby with 
respect to file# in the controlfile. In my case, that's correct for 
tablespace mda_streamline_data but not for mdahim_audit_data. You see 
their file# (as in controlfile) switch from 32 then 38 to 38 then 32. 
My problem is missing this file# on standby of my "damaged" database, 
so I won't know whether the file (take this good database as example) 
mdahim_audit_data.275... is file# 32 or 38.

Before I overwrote that standby controlfile, I did alter database 
backup controlfile to trace. Unfortunately, the generated text file 
only has file names, no file#-to-name mapping.

> After you restore the standby controlfile you need to catalog 
> all datafiles and then do a switch to copy so that Oracle 
> automatically switches all file names....

Fairlie,

I looked at RMAN Reference for catalog command. The closest is 
"catalog datafilecopy". But that's for cataloging an image copy 
of a datafile. I didn't create such copies. I only recreated the 
standby controlfile from primary. Maybe I misunderstand you?

Yong Huang


      
--
//www.freelists.org/webpage/oracle-l


Other related posts: