Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using RMAN for creating a Dataguard Standby db.

martin.moronoMay 29 2013 — edited Jun 3 2013
Hello,
I have two 11.2.0.1.0 oracle instances running on two cloned Red Hat Enterprise Linux (rhel98 and rhel99). Linux version:
Linux rhel99 2.6.32-100.34.1.el6uek.x86_64 #1 SMP Wed May 25 17:46:45 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
I am trying to perform a "duplicate target database for standby" as part of the list of steps to get a Physical Standby located at the rhel99 server with DB_UNIQUE_NAME ORCL99. But I am missing something because it keeps failing with this error:
RMAN-05556: not all datafiles have backups that can be recovered to SCN 2818790
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 1 found to restore
I double checked the directory structure on primary (rhel98) and standby (rhel99), and it's the same. As control file is restored during the duplicate process I cannot perform the catalog start with, so the backups were placed on the same locations at rhel98 and 99.

According to that error message it is not finding any of the datafile backups.
[oracle@rhel98 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Wed May 29 01:36:06 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL98 (DBID=2386038834)

RMAN> connect auxiliary sys/*****@ORCL99

connected to auxiliary database: ORCL98 (not mounted)

RMAN> run
2> {     
3> set until sequence=6 thread=1;
4> duplicate target database for standby
5> dorecover;                           
6> }                                    

executing command: SET until clause

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

contents of Memory Script:
{                         
   set until scn  2818790;
   restore clone standby controlfile;
}                                    
executing Memory Script              

executing command: SET until clause

Starting restore at 29-MAY-13
using channel ORA_AUX_DISK_1 

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 /oracle/app/oracle/rman_bkp/orcl/0aoa2pd2_1_1
channel ORA_AUX_DISK_1: piece handle=/oracle/app/oracle/rman_bkp/orcl/0aoa2pd2_1_1 tag=TAG20130520T022122
channel ORA_AUX_DISK_1: restored backup piece 1                                                          
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03                                         
output file name=/oracle/app/oracle/oradata/standby/control01.ctl                                        
Finished restore at 29-MAY-13                                                                            

contents of Memory Script:
{                         
   sql clone 'alter database mount standby database';
}                                                    
executing Memory Script                              

sql statement: alter database mount standby database

contents of Memory Script:
{                         
   set until scn  2818790;
   set newname for tempfile  1 to 
 "/oracle/app/oracle/oradata/standby/temp01.dbf";
   switch clone tempfile all;                    
   set newname for datafile  1 to                
 "/oracle/app/oracle/oradata/standby/system01.dbf";
   set newname for datafile  2 to                  
 "/oracle/app/oracle/oradata/standby/sysaux01.dbf";
   set newname for datafile  3 to                  
 "/oracle/app/oracle/oradata/standby/undotbs01.dbf";
   set newname for datafile  4 to                   
 "/oracle/app/oracle/oradata/standby/users01.dbf";  
   set newname for datafile  5 to                   
 "/oracle/app/oracle/oradata/standby/example01.dbf";
   set newname for datafile  6 to                   
 "/oracle/app/oracle/oradata/standby/ws_app_data01.dbf";
   set newname for datafile  7 to                       
 "/oracle/app/oracle/oradata/standby/ws_app_idx01.dbf"; 
   restore                                              
   clone database                                       
   ;                                                    
}                                                       
executing Memory Script                                 

executing command: SET until clause

executing command: SET NEWNAME

renamed tempfile 1 to /oracle/app/oracle/oradata/standby/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 29-MAY-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 05/29/2013 01:40:33
RMAN-05556: not all datafiles have backups that can be recovered to SCN 2818790
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 4 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>
And the backup pieces are located at (where oracle has rw privs and also owns the dirs):
[oracle@rhel98 orcl]$ ls -ldhtr /oracle/app/oracle/rman_bkp/orcl/
drwxr-xr-x. 2 oracle oinstall 4.0K May 29 01:16 /oracle/app/oracle/rman_bkp/orcl/
[oracle@rhel99 orcl]$ ls -ldhtr /oracle/app/oracle/rman_bkp/orcl/
drwxr-xr-x. 2 oracle oinstall 4.0K May 29 01:57 /oracle/app/oracle/rman_bkp/orcl/
Backup was taken using RMAN, by executing a "backup database plus archivelogs" and it was completed with no errors. As you can see backup were taken yesterday and are available.
[oracle@rhel98 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Wed May 29 03:20:54 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL98 (DBID=2386038834)

RMAN> list backup summary;

using target database control file instead of recovery catalog

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
2       B  F  A DISK        20-MAY-13       1       1       NO         TAG20130520T022122
3       B  F  A DISK        21-MAY-13       1       1       NO         TAG20130521T025112
4       B  A  A DISK        29-MAY-13       1       1       NO         TAG20130529T010612
5       B  F  A DISK        29-MAY-13       1       1       NO         TAG20130529T010902
6       B  F  A DISK        29-MAY-13       1       1       NO         TAG20130529T010902
7       B  A  A DISK        29-MAY-13       1       1       NO         TAG20130529T011634

RMAN> list backup completed after '29-MAY-13';


List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4       669.15M    DISK        00:02:37     29-MAY-13      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T010612
        Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0coaqcc4_12_1  

  List of Archived Logs in backup set 4
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    1       2785395    19-MAY-13 2800632    19-MAY-13
  1    2       2800632    19-MAY-13 2814507    20-MAY-13
  1    3       2814507    20-MAY-13 2817219    20-MAY-13
  1    4       2817219    20-MAY-13 2817222    20-MAY-13
  1    5       2817222    20-MAY-13 2818790    20-MAY-13
  1    6       2818790    20-MAY-13 2818794    20-MAY-13
  1    7       2818794    20-MAY-13 2853065    20-MAY-13
  1    8       2853065    20-MAY-13 2885773    25-MAY-13
  1    9       2885773    25-MAY-13 2903820    25-MAY-13
  1    10      2903820    25-MAY-13 2925244    25-MAY-13
  1    11      2925244    25-MAY-13 2934284    25-MAY-13
  1    12      2934284    25-MAY-13 2935793    25-MAY-13
  1    13      2935793    25-MAY-13 2937653    25-MAY-13
  1    14      2937653    25-MAY-13 2939617    25-MAY-13
  1    15      2939617    25-MAY-13 2960715    25-MAY-13
  1    16      2960715    25-MAY-13 2975590    26-MAY-13
  1    17      2975590    26-MAY-13 3013551    27-MAY-13
  1    18      3013551    27-MAY-13 3029786    28-MAY-13
  1    19      3029786    28-MAY-13 3050776    28-MAY-13
  1    20      3050776    28-MAY-13 3088118    28-MAY-13
  1    21      3088118    28-MAY-13 3099950    29-MAY-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    1.09G      DISK        00:06:53     29-MAY-13      
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T010902
        Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0doaqche_13_1  
  List of Datafiles in backup set 5                                           
  File LV Type Ckp SCN    Ckp Time  Name                                      
  ---- -- ---- ---------- --------- ----                                      
  1       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/system01.dbf
  2       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/users01.dbf  
  5       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/example01.dbf
  6       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/ws_app_data01.dbf
  7       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/ws_app_idx01.dbf 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    9.36M      DISK        00:00:09     29-MAY-13
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T010902
        Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0eoaqcue_14_1
  SPFILE Included: Modification time: 29-MAY-13
  SPFILE db_unique_name: ORCL98
  Control File Included: Ckp SCN: 3101140      Ckp time: 29-MAY-13

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
7       23.06M     DISK        00:00:11     29-MAY-13
        BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T011634
        Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0foaqcvi_15_1

  List of Archived Logs in backup set 7
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    22      3099950    29-MAY-13 3101157    29-MAY-13

RMAN>
db_recovery_file_dest is the same for both ORCL98 and ORCL99:
*.db_recovery_file_dest='/oracle/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4070572032
If needed I can upload the complete initORCL98.ora and initORCL99.ora files.

Any suggestion/comments?

Thanks in advance.

Edited by: martin.morono on May 29, 2013 8:56 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2013
Added on May 29 2013
4 comments
1,392 views