Issues Restoring an Oracle Backup to a New Host and Directory Structure

Last post 10-04-2017, 9:15 AM by efg. 6 replies.
Sort Posts: Previous Next
  • Issues Restoring an Oracle Backup to a New Host and Directory Structure
    Posted: 09-28-2017, 8:49 AM

    Hi. I am experiencing two issues when trying to do a restoretest using this guide:

    http://documentation.commvault.com/commvault/v10/article?p=products/oracle/t_ora_r_on_new_dir.htm

    1st issue:

    The datafiles are being renamed to something "commvault" specific, rather than the original datafile names.

    Example:

    Source: users01.dbf

    Target: data_D-<SID>_TS-USERS_FNO-1

    Question:

    Is this correect behavior - do I need to put in some advanced options on the commvault client ?

     

    2nd issue:

    After running recovery on the target server - the source rman catalog has entries regarding the target server, and can therefor no longer perform backup. I then need to do a crosscheck on the source server in order to get the backup working again.

    Example from the source servers restore.out file.

    Rman Log:[
    Recovery Manager: Release 12.1.0.2.0 - Production on Thu Sep 28 13:15:21 2017
    Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
    RMAN>
    connected to recovery catalog database
    RMAN>
    connected to target database: <SID> (DBID=1243391479)
    RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14>
    starting full resync of recovery catalog
    full resync complete
    allocated channel: ch1
    channel ch1: SID=2299 device type=SBT_TAPE
    channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80)
    starting full resync of recovery catalog
    full resync complete
    starting full resync of recovery catalog
    full resync complete
    sent command to channel: ch1
    starting full resync of recovery catalog
    full resync complete
    starting full resync of recovery catalog
    full resync complete
    starting full resync of recovery catalog
    full resync complete
    Starting backup at Sep 28 2017 13:16:54
    current log archived
    starting full resync of recovery catalog
    full resync complete
    released channel: ch1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 09/28/2017 13:17:11
    RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
    ORA-19625: error identifying file /restoretest/db/<SID>/archivelogs/<SID>_1_2510_951265157.arc
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    RMAN>
    Recovery Manager complete.
    ]

    Question:

    How can I avoid commvault changing the source catalog ?

     

    Simpana Version 11 SP8 +hotfix

     

    Best regards

    Martin

  • Re: Issues Restoring an Oracle Backup to a New Host and Directory Structure
    Posted: 09-28-2017, 4:31 PM
    • efg is not online. Last active: 06-13-2019, 10:25 AM efg
    • Top 10 Contributor
    • Joined on 02-02-2010
    • CommVault Tinton Falls NJ
    • Expert
    • Points 1,658

    Hi Martin,

     

    As far as file names changing, unless you go into the GUI and select the redirect options for the restore, the creation of the datafiles is solely under control of Oracle/RMAN.   Perhaps your oracle configuration has OMF enabled?

     

    For the issue with the catalog repository, when testing a cross server "DR" style restore it is not recommended to use the source DB's catalog for the restore.  This is because after the restore and recovery completes RMAN will issue a database reset which generates a new instance in the catalog.  You would then need to manually reset the instance in the catalog to continue to use it for the source DB.   I would recommend either just not using a catalog connect (and make use of the backup catalog contained in the DB controlfile) or making a copy of your catalog (Export the catalog as the RMAN user, and then create a new RMAN user for the restore test and import the catalog to that user.  This way the source catalog remains untouched by the restore (test) process.  In a "REAL" DR scenario you would not need this as the DB reset would apply to the restored database anyway since the original would no longer exist.

     

    Hope this helps...


    Ernst F. Graeler
    Senior Engineer III
    Development
  • Re: Issues Restoring an Oracle Backup to a New Host and Directory Structure
    Posted: 09-29-2017, 6:06 AM

    Hi efg - thanks for you quick response.

     

    Regarding the repository.. makes sense, thanks.

     

    In regards to the datafile name conversion, you are right. Apperently its oracle/rman related. When restoring to a different directory structure, it defaults to oracle managed files. I havnt figured out how to disable this.

    It used to be enough to use these two parameters:

    db_filename_convert

    log_filename_convert

    But that seem to no longer be the case...

     

    Ive also tried one of the hidden parameters _omf=disabled, but no luck

     

    Brgds

    Martin

  • Re: Issues Restoring an Oracle Backup to a New Host and Directory Structure
    Posted: 09-29-2017, 8:54 AM
    • efg is not online. Last active: 06-13-2019, 10:25 AM efg
    • Top 10 Contributor
    • Joined on 02-02-2010
    • CommVault Tinton Falls NJ
    • Expert
    • Points 1,658

    Hi Martin,

    The parameters db_file_name_convert & log_file_name_convert only work with the RMAN duplicate command.   Restore ignores these parameters.   You can rename using the Console GUI in Commvault if the DB directory structure is different.  I'm not sure how to disable omf...


    Ernst F. Graeler
    Senior Engineer III
    Development
  • Re: Issues Restoring an Oracle Backup to a New Host and Directory Structure
    Posted: 09-29-2017, 9:12 AM

    Yes that was what I did - it accepted the directory structure but choose omf for the datafiles. Apperently you need to change the names by creating a script which utilizes set new name.

    Example:

    1. Run the following query in SQL*Plus:

      SQL> COLUMN NAME FORMAT a60
      SQL> SPOOL LOG 'db_filenames.out'
      SQL> SELECT FILE# AS "File/Grp#", NAME FROM V$DATAFILE
           UNION
           SELECT GROUP#,MEMBER FROM V$LOGFILE;
      SQL> SPOOL OFF
      SQL EXIT
      

      Write the RMAN recovery script. The script must include the following steps:

      • For each datafile on the destination host that is restored to a different path than it had on the source host, use a SET NEWNAME command to specify the new path on the destination host. (If the file systems on the destination system are set up to have the same paths as the source host, then do not use SET NEWNAME for those files restored to the same path as on the source host.)

    2. For each online redo log that is to be created at a different location than it had on the source host, use SQL ALTER DATABASE RENAME FILE commands to specify the pathname on the destination host. (If the file systems on the destination system are set up to have the same paths as the source host, then do not use ALTER DATABASE RENAME FILE for those files restored to the same path as on the source host.)

    So if oracle/rman cant't handle it automatically - commvault obviously cant either :o)
    In this case I just created symbolic links in order to match the source' directory structure, it was a whole lot easier. Then it generates the correct file names.
    Thanks for all your help.
    Brgds
    Martin
  • Re: Issues Restoring an Oracle Backup to a New Host and Directory Structure
    Posted: 10-04-2017, 6:20 AM

    Hi Ernst. Sorry to bother you again, but I have a follow up question.

    I am now trying to do a point in time restore to another server, and for this I want to restore only the control file using the rman catalog (as the latest control file doesnt contain the backup information from that period).

    When selecting point in time for the control file, and using catalog - when previewing the script it tries to restore the latest controlfile.

    Example:

    #******CONTROL FILE/SPFILE RESTORE SCRIPT******#

    run {
    allocate channel ch1 type 'sbt_tape'
    PARMS="SBT_LIBRARY=/opt/hds/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
    TRACE 0;
    ## send " -jm 16908298 -a 2:3201 -cl 5082 -ins 640 -at 22 -j 1214629 -rcp 0 -ms 1 -p 1 -df -PREVIEW";
    restore controlfile ;
    }
    exit;
     
    When choosing nocatalog:
     
    #******CONTROL FILE/SPFILE RESTORE SCRIPT******#

    run {
    allocate channel ch1 type 'sbt_tape'
    PARMS="SBT_LIBRARY=/opt/hds/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
    TRACE 0;
    ## send " -jm 16908298 -a 2:3201 -cl 5082 -ins 640 -at 22 -j 1214630 -rcp 0 -ms 1 -p 1 -df -PREVIEW";
    restore controlfile from autobackup until time = "TO_DATE('09/01/2017 12:16:51','MM/DD/YYYY HH24:MI:SS')" ;
    }
    exit;
     
    But obviosly that doenst work....
     
    When I run it directly using rman cli - I can restore the control file from point-in-time using the recovery catalog.
     
    Any ideas ?
     
    Brgds
    Martin

    Attachment: pit1.PNG pit2.PNG
  • Re: Issues Restoring an Oracle Backup to a New Host and Directory Structure
    Posted: 10-04-2017, 9:15 AM
    • efg is not online. Last active: 06-13-2019, 10:25 AM efg
    • Top 10 Contributor
    • Joined on 02-02-2010
    • CommVault Tinton Falls NJ
    • Expert
    • Points 1,658

    Hi Martin,

    Odd, it seems that the restore is not picking up on the point in time entered in the GUI.  You may want to open a support ticket to have that looked at. 

    Being that you have a catalog server, you can look at the catalog for controlfile backups, and locate the piece-handle of the controlfile you wish to restore from, then in the GUI, from advanced options select the option to restore from that piece handle.

    That should at least get you what you need until support can figure out why the time is not being parsed into the control file restore (from point in time).


    Ernst F. Graeler
    Senior Engineer III
    Development
The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy