6 Replies Latest reply: Apr 5, 2013 3:59 AM by newbieDBA RSS

    Auxiliary Database  Sync To Target Database

    newbieDBA
      hello ,

      11.2.0
      win 7 pro

      i have sucessfully created auxiliary Database , now i want to Sync that Auxiliary daatabase to target .
      is there anyway to do?
      i found one that u need to duplicate database again in RMAN and skip table spaces . but i am getting error that -

      RMAN-06023: no backup or copy of datafile 5 found to restore
      RMAN-06023: no backup or copy of datafile 3 found to restore
      RMAN-06023: no backup or copy of datafile 2 found to restore
      RMAN-06023: no backup or copy of datafile 1 found to restore

      I have backup copies of Target Database , but still getting error like above.
      i Guess i am doing wrong at Syntax .

      after duplicating database sucessfully , i was trying to do below commands in RMAN pls check...

      RMAN> run
      2> {
      3> duplicate target database to ordb *#my target database is ORCL(open) auxiliary is ORDB(no mount)*
      4> skip tablespace users *#here i just put Users tablespace randomly to check for sucessfuly sync*
      5> logfile
      6> group 1 ('D:\app\Administrator\oradata\orcl\redo01.log' , *#Here, i have 3 redologs , and define both DB's redologs (here i m getting wrong i guess)*
      7> 'D:\app\Administrator\oradata\ordb\redo01.log') size 50m reuse,
      8> group 2 ('D:\app\Administrator\oradata\orcl\redo02.log' ,
      9> 'D:\app\Administrator\oradata\ordb\redo02.log') size 50m reuse,
      10> group 3 ('D:\app\Administrator\oradata\orcl\redo03.log' ,
      11> 'D:\app\Administrator\oradata\ordb\redo03.log') size 50m reuse
      12> ;
      13> }

      Starting Duplicate Db at 05-APR-13
      using target database control file instead of recovery catalog
      allocated channel: ORA_AUX_DISK_1
      channel ORA_AUX_DISK_1: SID=91 device type=DISK

      contents of Memory Script:
      {
      sql clone "create spfile from memory";
      }
      executing Memory Script

      sql statement: create spfile from memory

      contents of Memory Script:
      {
      shutdown clone immediate;
      startup clone nomount;
      }
      executing Memory Script

      Oracle instance shut down

      connected to auxiliary database (not started)
      Oracle instance started

      Total System Global Area 217157632 bytes

      Fixed Size 2174320 bytes
      Variable Size 159384208 bytes
      Database Buffers 50331648 bytes
      Redo Buffers 5267456 bytes

      contents of Memory Script:
      {
      sql clone "alter system set db_name =
      ''ORCL'' comment=
      ''Modified by RMAN duplicate'' scope=spfile";
      sql clone "alter system set db_unique_name =
      ''ORDB'' comment=
      ''Modified by RMAN duplicate'' scope=spfile";
      shutdown clone immediate;
      startup clone force nomount
      restore clone primary controlfile;
      alter clone database mount;
      }
      executing Memory Script

      sql statement: alter system set db_name = ''ORCL'' comment= ''Modified by RMAN duplic

      sql statement: alter system set db_unique_name = ''ORDB'' comment= ''Modified by RMAN

      Oracle instance shut down

      Oracle instance started

      Total System Global Area 217157632 bytes

      Fixed Size 2174320 bytes
      Variable Size 159384208 bytes
      Database Buffers 50331648 bytes
      Redo Buffers 5267456 bytes

      Starting restore at 05-APR-13
      allocated channel: ORA_AUX_DISK_1
      channel ORA_AUX_DISK_1: SID=67 device type=DISK

      channel ORA_AUX_DISK_1: starting datafile backup set restore
      channel ORA_AUX_DISK_1: restoring control file
      channel ORA_AUX_DISK_1: reading from backup piece D:\APP\ADMINISTRATOR\FLASH_RECOVERY_A
      channel ORA_AUX_DISK_1: piece handle=D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\AUTO
      channel ORA_AUX_DISK_1: restored backup piece 1
      channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
      output file name=D:\APP\ADMINISTRATOR\ORADATA\ORDB\CONTROL01.CTL
      output file name=D:\APP\ADMINISTRATOR\ORADATA\ORDB\CONTROL02.CTL
      output file name=D:\APP\ADMINISTRATOR\ORADATA\ORDB\CONTROL03.CTL
      Finished restore at 05-APR-13

      database mounted
      Checking that duplicated tablespaces are self-contained
      Datafile 4 skipped by request

      contents of Memory Script:
      {
      set until scn 1054335;
      set newname for datafile 1 to
      "D:\APP\ADMINISTRATOR\ORADATA\ORDB\SYSTEM01.DBF";
      set newname for datafile 2 to
      "D:\APP\ADMINISTRATOR\ORADATA\ORDB\SYSAUX01.DBF";
      set newname for datafile 3 to
      "D:\APP\ADMINISTRATOR\ORADATA\ORDB\UNDOTBS01.DBF";
      set newname for datafile 5 to
      "D:\APP\ADMINISTRATOR\ORADATA\ORDB\EXAMPLE01.DBF";
      restore
      clone database
      skip forever tablespace "USERS" ;
      }
      executing Memory Script

      executing command: SET until clause

      executing command: SET NEWNAME

      executing command: SET NEWNAME

      executing command: SET NEWNAME

      executing command: SET NEWNAME

      Starting restore at 05-APR-13
      using channel ORA_AUX_DISK_1

      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of Duplicate Db command at 04/05/2013 11:54:35
      RMAN-05556: not all datafiles have backups that can be recovered to SCN 1054335
      RMAN-03015: error occurred in stored script Memory Script
      RMAN-06026: some targets not found - aborting restore
      RMAN-06023: no backup or copy of datafile 5 found to restore
      RMAN-06023: no backup or copy of datafile 3 found to restore
      RMAN-06023: no backup or copy of datafile 2 found to restore
      RMAN-06023: no backup or copy of datafile 1 found to restore

      RMAN>
      Thanks
      Regards

      Edited by: newbieDBA on Apr 5, 2013 12:26 PM