Recreate standby controlfile

From: fairlie rego <fairlie_r_at_yahoo.com>
Date: Tue, 1 Jul 2008 21:15:46 +1000 (EST)
Message-ID: <483219.52400.qm@web31907.mail.mud.yahoo.com>


Hi all,    

  I have a customer using Dataguard with ASM/OMF Primary 8 node RAC on 10.2.0.3
Standby 8 node RAC on 10.2.0.3    

  When the files are restored as part of a duplicate database for standby command the file names generated are obviously different

  For e.g
On primary system datafile is system.476.639871213 whilst on standby the same file is restored as system.445.658666449    

  If for any reason the standby controlfile has to be subsequently recreated what is the fastest/most efficient way to rename all data files since the controlfile will have names from primary.    

  I could create a database link called dd to standby but I would have to open the standby in read only mode to generate commands from the below script    

  select
  'alter database rename file'''||
  prim.name||''' to '''||stdb.name||''';'   from v$datafile prim, v$datafile_at_dd stdb   where prim.file# = stdb.file#    

  Surely they must be a simpler way to do this given I have more than 500 datafiles.    

  Thanks
  Fairlie

          Fairlie Rego
Senior Oracle Consultant
  http://el-caro.blogspot.com/
  M: +61 402 792 405            



Get the name you always wanted with the new y7mail email address.
--

http://www.freelists.org/webpage/oracle-l Received on Tue Jul 01 2008 - 06:15:46 CDT

Original text of this message