BR*Tools SAP Oracle Restores

Table of Contents

Restoring Full Databases

Restore the entire database when the database is corrupted or lost.

Before You Begin

  1. Perform a full backup for SAP for Oracle.
  2. The init<DESTINATION_SID>.utl file must be on the destination host in the $ORACLE_HOME/dbs directory. 
  3. Create an empty init<DESTINATION_SID>.sap file in the $ORACLE_HOME/dbs directory.  . Use the touch command to create the file and then restore it by typing the following command on the command line, substituting the <DESTINATION_SID> variable:

    brrestore -d util_file -b2 \#NULL -m $ORACLE_HOME/dbs/init<DESTINATION_SID>.sap

  4. Set the database to the correct mode defined in the table.
    Control File in the Restore Required Database Mode
    Control file is included in the restore NOMOUNT
    Control file not included in the restore MOUNT

Procedure

Expand All

UTIL_FILE Interface

  • On the command line, type one of the following commands.

    Restore with the last complete data backup

    brrestore -d util_file -b last -m all

    Restore with a specified data detail file

    Substitute the data_detail_file variable. You must include the full path and the file name of the data detail file.

    brrestore -d util_file -m all -b <data_detail_file> -u /

Expand All

RMAN_UTIL Interface

  • On the command line, type one of the following commands.

    Restore with the last completed data backup

    brrestore -d rman_util -b last -m all

    Restore with a specified data detail file

    Substitute the data_detail_file variable. You must include the full path and the file name of the data detail file.

    brrestore -d rman_util -m all -b <data_detail_file> -u /

What to Do Next

  1. Recover the database.
  2. Restore the archive logs if needed.
  3. If you performed a point-in-time restore, open the database with the RESETLOGS option.

Restoring Archive Log Files

Restore an archive log when you are restoring any of the following data items:

  • A database to the most recent state after a database failure.
  • Specific logs which are identified using a serial number or identification tag, that are missing in the database.
  • Logs from a specific time range that were lost due to a hard disk corruption.

Before You Begin

  1. Perform a full backup for SAP for Oracle.
  2. The init<DESTINATION_SID>.utl file must be on the destination host in the $ORACLE_HOME/dbs directory. 
  3. Create an empty init<DESTINATION_SID>.sap file in the $ORACLE_HOME/dbs directory.  . Use the touch command to create the file and then restore it by typing the following command on the command line, substituting the <DESTINATION_SID> variable:

    Brrestore -d util_file -b2 \#NULL -m $ORACLE_HOME/dbs/init<DESTINATION_SID>.sap

  4. Set the database to the correct mode defined in the table.
    Control File in the Restore Required Database Mode
    Control file is included in the restore NOMOUNT
    Control file not included in the restore MOUNT
    Only log files are being restored OPEN

Procedure

Expand All

UTIL_FILE Interface

  • On the command line, type one of the following commands.

    Restore with the log sequence numbers

    Substitute the logn1 and logn2 variables.

    brrestore -d util_file -a <logn1-logn2> -u /

    Restore with a specified log sequence number

    Substitute the variable log_seq_no.

    brrestore -d util_file -a <log_seq_no> -u /

Expand All

RMAN_UTIL Interface

  • On the command line, type one of the following commands.

    Restore with the log sequence numbers

    Substitute the logn1 and logn2 variables.

    brrestore -d rman_util -a <logn1>-<logn2> -u /

    Restore with a specified backup file

    Restore with a specified log sequence number

    Substitute the variable log_seq_no.

    brrestore -d rman_util -a <log_seq_no> -u /

What to Do Next

  1. Recover the database.
  2. If you performed a point-in-time restore, open the database with the RESETLOGS option.

Restoring Control Files

Control files are required to recover a database to the current state. Restore control files in the following scenarios:

  • The control file is lost and you need to restore the backup repository contained in the control file

If your database consists of multiple control files copies, you can replace a corrupted control file by manually copying an existing control file, and then restoring it.

Before You Begin

  1. Perform a full backup for SAP for Oracle.
  2. The init<DESTINATION_SID>.utl file must be on the destination host in the $ORACLE_HOME/dbs directory. 
  3. Create an empty init<DESTINATION_SID>.sap file in the $ORACLE_HOME/dbs directory.  . Use the touch command to create the file and then restore it by typing the following command on the command line, substituting the <DESTINATION_SID> variable:

    brrestore -d util_file -b2 \#NULL -m $ORACLE_HOME/dbs/init<DESTINATION_SID>.sap

  4. Get the SAP Backup Id for the job from the BRBACKUP or BRARCHIVE detail file
  5. Set the database to NOMOUNT mode.

Procedure

Expand All

UTIL_FILE Interface

  • On the command line, type the following command.

    Substitute the SAP_BACKUP_ID and control_file_path variables.

    brrestore –d util_file -b <SAP_BACKUP_ID> -m <control_file_path>

Expand All

RMAN_UTIL Interface

  • On the command line, type the following command.

    Substitute the SAP_BACKUP_ID and control_file_path variables.

    brrestore –d rman_util –b <brbackup/brarchive_detailfile> -m <control_file_path>

What to Do Next

  1. Recover the database.
  2. Restore the archive logs if needed.
  3. If you performed a point-in-time restore, open the database with the RESETLOGS option.

Restoring from Consistent Online Backups

When you restore from consistent online backups, you can import some of the offline redo log files of the same backup.

Before You Begin

  1. Perform a consistent online backup.
  2. Include the instance name and client name parameters in the init<SID>.utl file.

    CvInstanceName
    Instance001
    CvClientName
    client_name

Procedure

  • On the command line, type on of the following commands.
Expand All

Perform a full restore

brrestore -d util_file -m full

Perform a restore by specifying the data detail file.

Substitute the data_detail_file variable. You must include the full path and the file name of the data detail file.

brrestore –d util_file -m full -b <data_detail_file>

Perform a log restore by specifying the log sequence numbers

Substitute the logn1 and logn2 variables.

brrestore –d util_file –a <logn1>-<logn2>

Restoring from an Auxiliary Copy

If the primary copy of the database is not available, in this example, you can restore from an auxiliary copy.

Before You Begin

  • In the init<SID>.utl file, set the CV_restCopyPrec parameter to the copy you want to restore from.

    For information on the supported parameters, see Supported SAP Oracle Util File Parameters.

    rman_parms="BLKSIZE=1048576,SBT_LIBRARY=/opt/snapprotect/Base/libobk.so,ENV=(CvClientName=client_name,CvInstanceName=Instance001,CV_restCopyPrec=copy_number)"

Procedure

Redirecting a Restore of SAP on Oracle Data Files to a New Location

You can redirect a restore when the hard disk is full or when you want to move the existing datafiles to a new location on the same host.

This procedure is supported for the latest backup jobs. You cannot use a point-in-time backup job for this procedure.

This procedure includes an example for a UNIX configuration that uses the rman_util device and an example for Windows that uses the util_file device.

Expand All

UNIX

Before You Begin

  1. Perform a full backup.

    Set the device type (-d) option to rman_uil and the type (-t) option to offline.

  2. On the source, use sqlplus to note the parent directory structure. On the sqlplus command line, type the following command:

    SQL> select name from v$datafile;

    Example

    In the following example, /home/oracle1/CER1/DATA/sapdata1 through /home/oracle1/CER1/DATA/sapdata6 is similar to the information from $SAPDATA_HOME.
    Expand All

    Full Output

    SQL> select name from v$datafile;
    NAME
    --------------------------------------------------------------------------------
    /home/oracle1/CER1/DATA/sapdata1/system_1/system.data1
    /home/oracle1/CER1/DATA/sapdata1/system_1/sysaux01.dbf
    /home/oracle1/CER1/DATA/sapdata1/undo_1/undo.data1
    /home/oracle1/CER1/DATA/sapdata1/roll_1/roll.data1
    /home/oracle1/CER1/DATA/sapdata1/btabd_1/btabd.data1
    /home/oracle1/CER1/DATA/sapdata1/ddicd_1/ddicd.data1
    /home/oracle1/CER1/DATA/sapdata1/el46bi_1/el46bi.data1
    /home/oracle1/CER1/DATA/sapdata1/pooli_1/pooli.data1
    /home/oracle1/CER1/DATA/sapdata2/btabi_1/btabi.data1
    /home/oracle1/CER1/DATA/sapdata2/clud_1/clud.data1
    /home/oracle1/CER1/DATA/sapdata2/poold_1/poold.data1
    NAME --------------------------------------------------------------------------------
    /home/oracle1/CER1/DATA/sapdata2/stabi_2/stabi.data2
    /home/oracle1/CER1/DATA/sapdata2/sourced_1/sourced.data1
    /home/oracle1/CER1/DATA/sapdata2/user1i_1/user1i.data1
    /home/oracle1/CER1/DATA/sapdata3/stabd_1/stabd.data1
    /home/oracle1/CER1/DATA/sapdata4/el46bd_1/EL46bd.data1
    /home/oracle1/CER1/DATA/sapdata4/protd_1/protd.data1
    /home/oracle1/CER1/DATA/sapdata4/user1d_1/user1d.data1
    /home/oracle1/CER1/DATA/sapdata5/ddici_1/ddici.data1
    /home/oracle1/CER1/DATA/sapdata6/es46bd_1/es46bd.data1

    ls -ltr /home/oracle1/CER1/DATA/ total 24
    drwxrwxr-x 13 oracle1 oinstall 4096 Apr 6 19:57 sapdata3
    drwxrwxr-x 11 oracle1 oinstall 4096 Apr 6 19:57 sapdata2
    drwxrwxr-x 14 oracle1 oinstall 4096 Apr 6 19:57 sapdata1
    drwxrwxr-x 3 oracle1 oinstall 4096 Apr 6 19:57 sapdata6
    drwxrwxr-x 5 oracle1 oinstall 4096 Apr 6 19:57 sapdata5
    drwxrwxr-x 11 oracle1 oinstall 4096 Apr 6 19:57 sapdata4

  3. Set the Oracle database state to mount mode so that you can back up the control file to trace.

    On the sqlplus command line, type the following command, substituting the control_file_location parameter with the complete path to the source control file:

    SQL> shut immediate
    SQL> startup mount
    SQL> alter database backup controlfile to trace as '<control_file_location>';

    Example

    SQL> shut immediate
    SQL> startup mount
    SQL> alter database backup controlfile to trace as '/home/oracle1/control.ora';

  4. On the new location, create the SAPDATA parent directory structure that you noted in Step 2. On the command line, type the following command, substituting the new_location parameter with the new location path and the SID with the Oracle SID and the child_directory. You must repeat this for each child directory:

    mkdir -p /new_location/SID/DATA/child_directory

    Expand All

    Example

    In this example the old location is /home/CER1/DATA and the new location is /new_location/CER1/DATA.

    oracle1@sde-suse113:/new_location/CER1/DATA> mkdir -p /new_location/CER1/DATA/sapdata1
    oracle1@sde-suse113:/new_location/CER1/DATA> mkdir -p /new_location/CER1/DATA/sapdata2
    oracle1@sde-suse113:/new_location/CER1/DATA> mkdir -p /new_location/CER1/DATA/sapdata3
    oracle1@sde-suse113:/new_location/CER1/DATA> mkdir -p /new_location/CER1/DATA/sapdata4
    oracle1@sde-suse113:/new_location/CER1/DATA> mkdir -p /new_location/CER1/DATA/sapdata5
    oracle1@sde-suse113:/new_location/CER1/DATA> mkdir -p /new_location/CER1/DATA/sapdata6
  5. Verify the database is in the MOUNT mode.

    SQL> select status from v$instance;
    STATUS
    ------------
    MOUNTED

  6. Edit the BRBACKUP summary file and note the name of the latest offline rman_util detail file name.

    berkfwfi ffr 2015-09-15 17:42:26 2015-09-15 17:45:50 0 ............... 21 20 0 1 3866483 2 3867013 FULL offline_force rman_util ------ 7.40 (12) CER1

Procedure

  1. On the command line, type the following command.

    brrestore -m all,<source drive 1>=<target drive 1>,<source drive 2>=<target drive 2> -b <file-id>.aff]

    Example

    brrestore -m full,/home/oracle1/CER1/DATA/sapdata1=/new_location/CER1/DATA/sapdata1,/home/oracle1/CER1/DATA/sapdata2=/new_location/CER1/DATA/sapdata2,/home/oracle1/CER1/DATA/sapdata3=/new_location/CER1/DATA/sapdata3,/home/oracle1/CER1/DATA/sapdata4=/new_location/CER1/DATA/sapdata4,/home/oracle1/CER1/DATA/sapdata5=/new_location/CER1/DATA/sapdata5,/home/oracle1/CER1/DATA/sapdata6=/new_location/CER1/DATA/sapdata6 -b berkfwfi.ffr -d rman_util

  2. If you receive the following error message, type c to continue the operation.

    BR0565W Due to running database instance control file cannot be restored during a BRRESTORE run with RMAN
    BR0566I Stop the database instance and restore the control file separately BR0256I
    Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:  press c to continue

    The software creates the child directories because the parent directories were manually created.

    Expand All

    Example

    BR0259I Program execution will be continued...
    BR0370I Directory /new_location/CER1/DATA/sapdata1/btabd_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata2/btabi_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata2/clud_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata1/ddicd_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata5/ddici_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata4/el46bd_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata1/el46bi_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata6/es46bd_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata2/poold_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata1/pooli_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata4/protd_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata1/roll_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata2/sourced_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata3/stabd_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata2/stabi_2 created
    BR0370I Directory /new_location/CER1/DATA/sapdata1/undo_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata4/user1d_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata2/user1i_1 created
    BR0370I Directory /new_location/CER1/DATA/sapdata1/system_1 created
  3. On the command line, type c to continue the operation. The output displays the old location and the new location where you redirected the restore.
    Expand All

    Example

    /home/oracle1/CER1/DATA/sapdata1/btabd_1/btabd.data1=/new_location/CER1/DATA/sapdata1/btabd_1
    /home/oracle1/CER1/DATA/sapdata2/btabi_1/btabi.data1=/new_location/CER1/DATA/sapdata2/btabi_1
    /home/oracle1/CER1/DATA/sapdata2/clud_1/clud.data1=/new_location/CER1/DATA/sapdata2/clud_1
    /home/oracle1/CER1/DATA/sapdata1/ddicd_1/ddicd.data1=/new_location/CER1/DATA/sapdata1/ddicd_1
    /home/oracle1/CER1/DATA/sapdata5/ddici_1/ddici.data1=/new_location/CER1/DATA/sapdata5/ddici_1
    /home/oracle1/CER1/DATA/sapdata4/el46bd_1/EL46bd.data1=/new_location/CER1/DATA/sapdata4/el46bd_1
    /home/oracle1/CER1/DATA/sapdata1/el46bi_1/el46bi.data1=/new_location/CER1/DATA/sapdata1/el46bi_1
    /home/oracle1/CER1/DATA/sapdata6/es46bd_1/es46bd.data1=/new_location/CER1/DATA/sapdata6/es46bd_1
    /home/oracle1/CER1/DATA/sapdata2/poold_1/poold.data1=/new_location/CER1/DATA/sapdata2/poold_1
    /home/oracle1/CER1/DATA/sapdata1/pooli_1/pooli.data1=/new_location/CER1/DATA/sapdata1/pooli_1
    /home/oracle1/CER1/DATA/sapdata4/protd_1/protd.data1=/new_location/CER1/DATA/sapdata4/protd_1
    /home/oracle1/CER1/DATA/sapdata1/roll_1/roll.data1=/new_location/CER1/DATA/sapdata1/roll_1
    /home/oracle1/CER1/DATA/sapdata2/sourced_1/sourced.data1=/new_location/CER1/DATA/sapdata2/sourced_1
    /home/oracle1/CER1/DATA/sapdata3/stabd_1/stabd.data1=/new_location/CER1/DATA/sapdata3/stabd_1
    /home/oracle1/CER1/DATA/sapdata2/stabi_2/stabi.data2=/new_location/CER1/DATA/sapdata2/stabi_2
    /home/oracle1/CER1/DATA/sapdata1/undo_1/undo.data1=/new_location/CER1/DATA/sapdata1/undo_1
    /home/oracle1/CER1/DATA/sapdata4/user1d_1/user1d.data1=/new_location/CER1/DATA/sapdata4/user1d_1
    /home/oracle1/CER1/DATA/sapdata2/user1i_1/user1i.data1=/new_location/CER1/DATA/sapdata2/user1i_1
    /home/oracle1/CER1/DATA/sapdata1/system_1/sysaux01.dbf=/new_location/CER1/DATA/sapdata1/system_1
    /home/oracle1/CER1/DATA/sapdata1/system_1/system.data1=/new_location/CER1/DATA/sapdata1/system_1
  4. On the command line, type c to complete the restore.
  5. Shut down the database. On the sqlplus command line, type the following command:

    SQL> shut immediate;

  6. Create a new control file. Open the source control file that was created in this step. Look for the NORESETLOGS line. Copy the lines to notepad.
    Expand All

    Example

    File before the datafile change File after the datafile change

    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "CER1"
    NORESETLOGS ARCHIVELOG
        MAXLOGFILES 32
        MAXLOGMEMBERS 2
        MAXDATAFILES 255
        MAXINSTANCES 1
        MAXLOGHISTORY 876
    LOGFILE
    GROUP 1 (
        '/home/oracle1/CER1/LOGS/origlogA/log1_m1.dbf',
        '/home/oracle1/CER1/LOGS/mirrlogA/log1_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 2 (
       '/home/oracle1/CER1/LOGS/origlogB/log2_m1.dbf',
       '/home/oracle1/CER1/LOGS/mirrlogB/log2_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 3 (
       '/home/oracle1/CER1/LOGS/origlogA/log3_m1.dbf',
       '/home/oracle1/CER1/LOGS/mirrlogA/log3_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 4 (
      '/home/oracle1/CER1/LOGS/origlogB/log4_m1.dbf',
      '/home/oracle1/CER1/LOGS/mirrlogB/log4_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512
    -- STANDBY LOGFILE
    DATAFILE
    '/home/oracle1/CER1/DATA/sapdata1/system_1/system.data1',
    '/home/oracle1/CER1/DATA/sapdata1/system_1/sysaux01.dbf',
    '/home/oracle1/CER1/DATA/sapdata1/undo_1/undo.data1',
    '/home/oracle1/CER1/DATA/sapdata1/roll_1/roll.data1',
    '/home/oracle1/CER1/DATA/sapdata1/btabd_1/btabd.data1',
    '/home/oracle1/CER1/DATA/sapdata1/ddicd_1/ddicd.data1',
    '/home/oracle1/CER1/DATA/sapdata1/el46bi_1/el46bi.data1',
    '/home/oracle1/CER1/DATA/sapdata1/pooli_1/pooli.data1',
    '/home/oracle1/CER1/DATA/sapdata2/btabi_1/btabi.data1',
    '/home/oracle1/CER1/DATA/sapdata2/clud_1/clud.data1',
    '/home/oracle1/CER1/DATA/sapdata2/poold_1/poold.data1',
    '/home/oracle1/CER1/DATA/sapdata2/stabi_2/stabi.data2',
    '/home/oracle1/CER1/DATA/sapdata2/sourced_1/sourced.data1',
    '/home/oracle1/CER1/DATA/sapdata2/user1i_1/user1i.data1',
    '/home/oracle1/CER1/DATA/sapdata3/stabd_1/stabd.data1',
    '/home/oracle1/CER1/DATA/sapdata4/el46bd_1/EL46bd.data1',
    '/home/oracle1/CER1/DATA/sapdata4/protd_1/protd.data1',
    '/home/oracle1/CER1/DATA/sapdata4/user1d_1/user1d.data1',
    '/home/oracle1/CER1/DATA/sapdata5/ddici_1/ddici.data1',
    '/home/oracle1/CER1/DATA/sapdata6/es46bd_1/es46bd.data1'
    CHARACTER SET US7ASCII

    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "CER1"
    NORESETLOGS ARCHIVELOG
        MAXLOGFILES 32
        MAXLOGMEMBERS 2
        MAXDATAFILES 255
        MAXINSTANCES 1
        MAXLOGHISTORY 876
    LOGFILE
    GROUP 1 (
        '/home/oracle1/CER1/LOGS/origlogA/log1_m1.dbf',
        '/home/oracle1/CER1/LOGS/mirrlogA/log1_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 2 (
       '/home/oracle1/CER1/LOGS/origlogB/log2_m1.dbf',
       '/home/oracle1/CER1/LOGS/mirrlogB/log2_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 3 (
       '/home/oracle1/CER1/LOGS/origlogA/log3_m1.dbf',
       '/home/oracle1/CER1/LOGS/mirrlogA/log3_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 4 (
      '/home/oracle1/CER1/LOGS/origlogB/log4_m1.dbf',
      '/home/oracle1/CER1/LOGS/mirrlogB/log4_m2.dbf'
    ) SIZE 10M BLOCKSIZE 512
    -- STANDBY LOGFILE
    DATAFILE
    '/new_location/CER1/DATA/sapdata1/system_1/system.data1',
    '/new_location/CER1/DATA/sapdata1/system_1/sysaux01.dbf',
    '/new_location/CER1/DATA/sapdata1/undo_1/undo.data1',
    '/new_location/CER1/DATA/sapdata1/roll_1/roll.data1',
    '/new_location/CER1/DATA/sapdata1/btabd_1/btabd.data1',
    '/new_location/CER1/DATA/sapdata1/ddicd_1/ddicd.data1',
    '/new_location/CER1/DATA/sapdata1/el46bi_1/el46bi.data1',
    '/new_location/CER1/DATA/sapdata1/pooli_1/pooli.data1',
    '/new_location/CER1/DATA/sapdata2/btabi_1/btabi.data1',
    '/new_location/CER1/DATA/sapdata2/clud_1/clud.data1',
    '/new_location/CER1/DATA/sapdata2/poold_1/poold.data1',
    '/new_location/CER1/DATA/sapdata2/stabi_2/stabi.data2',
    '/new_location/CER1/DATA/sapdata2/sourced_1/sourced.data1',
    '/new_location/CER1/DATA/sapdata2/user1i_1/user1i.data1',
    '/new_location/CER1/DATA/sapdata3/stabd_1/stabd.data1',
    '/new_location/CER1/DATA/sapdata4/el46bd_1/EL46bd.data1',
    '/new_location/CER1/DATA/sapdata4/protd_1/protd.data1',
    '/new_location/CER1/DATA/sapdata4/user1d_1/user1d.data1',
    '/new_location/CER1/DATA/sapdata5/ddici_1/ddici.data1',
    '/new_location/CER1/DATA/sapdata6/es46bd_1/es46bd.data1'
    CHARACTER SET US7ASCII

  7. Go to sqlplus and paste the edited datafile that you created.
  8. Perform a test recover. On the command line type the following and verify the lines are shown and then place the database in an OPEN state.

    SQL> recover
    ORA-00283: recovery session canceled due to errors ORA-00264:
    no recovery required
    SQL> alter database open;
    Database altered.

  9. Verify the tablespaces with the new location for the datafiles. On the command line, type the following command:

    SQL> select name from v$datafile;

    Expand All

    Example Output

    File before the datafile change File after the datafile change

    NAME
    _____________________________________________________
    /home/oracle1/CER1/DATA/sapdata1/system_1/system.data1
    /home/oracle1/CER1/DATA/sapdata1/system_1/sysaux01.dbf
    /home/oracle1/CER1/DATA/sapdata1/undo_1/undo.data1
    /home/oracle1/CER1/DATA/sapdata1/roll_1/roll.data1
    /home/oracle1/CER1/DATA/sapdata1/btabd_1/btabd.data1
    /home/oracle1/CER1/DATA/sapdata1/ddicd_1/ddicd.data1
    /home/oracle1/CER1/DATA/sapdata1/el46bi_1/el46bi.data1
    /home/oracle1/CER1/DATA/sapdata1/pooli_1/pooli.data1
    /home/oracle1/CER1/DATA/sapdata2/btabi_1/btabi.data1
    /home/oracle1/CER1/DATA/sapdata2/clud_1/clud.data1
    /home/oracle1/CER1/DATA/sapdata2/poold_1/poold.data1

    NAME
    ______________________________________________________
    /home/oracle1/CER1/DATA/sapdata2/stabi_2/stabi.data2
    /home/oracle1/CER1/DATA/sapdata2/sourced_1/sourced.data1
    /home/oracle1/CER1/DATA/sapdata2/user1i_1/user1i.data1
    /home/oracle1/CER1/DATA/sapdata3/stabd_1/stabd.data1
    /home/oracle1/CER1/DATA/sapdata4/el46bd_1/EL46bd.data1
    /home/oracle1/CER1/DATA/sapdata4/protd_1/protd.data1
    /home/oracle1/CER1/DATA/sapdata4/user1d_1/user1d.data1
    /home/oracle1/CER1/DATA/sapdata5/ddici_1/ddici.data1
    /home/oracle1/CER1/DATA/sapdata6/es46bd_1/es46bd.data1

    NAME
    _____________________________________________________
    /new_location/CER1/DATA/sapdata1/system_1/system.data1
    /new_location/CER1/DATA/sapdata1/system_1/sysaux01.dbf
    /new_location/CER1/DATA/sapdata1/undo_1/undo.data1
    /new_location/CER1/DATA/sapdata1/roll_1/roll.data1
    /new_location/CER1/DATA/sapdata1/btabd_1/btabd.data1
    /new_location/CER1/DATA/sapdata1/ddicd_1/ddicd.data1
    /new_location/CER1/DATA/sapdata1/el46bi_1/el46bi.data1
    /new_location/CER1/DATA/sapdata1/pooli_1/pooli.data1
    /new_location/CER1/DATA/sapdata2/btabi_1/btabi.data1
    /new_location/CER1/DATA/sapdata2/clud_1/clud.data1
    /new_location/CER1/DATA/sapdata2/poold_1/poold.data1

    NAME
    ______________________________________________________
    /new_location/CER1/DATA/sapdata2/stabi_2/stabi.data2
    /new_location/CER1/DATA/sapdata2/sourced_1/sourced.data1
    /new_location/CER1/DATA/sapdata2/user1i_1/user1i.data1
    /new_location/CER1/DATA/sapdata3/stabd_1/stabd.data1
    /new_location/CER1/DATA/sapdata4/el46bd_1/EL46bd.data1
    /new_location/CER1/DATA/sapdata4/protd_1/protd.data1
    /new_location/CER1/DATA/sapdata4/user1d_1/user1d.data1
    /new_location/CER1/DATA/sapdata5/ddici_1/ddici.data1
    /new_location/CER1/DATA/sapdata6/es46bd_1/es46bd.data1

Windows

Before You Begin

  1. Perform a full backup.

    Set the device type (-d) option to util_file and the type (-t) option to offline.

  2. On the source, use sqlplus to note the parent directory structure. On the sqlplus command line, type the following command:

    SQL> select name from v$datafile;

    Example

    In the following example, G:\ORACLE\CER\DATA\sapdata1 through G:\ORACLE\CER\DATA\sapdata6 is similar to the information from %SAPDATA_HOME%.
    Expand All

    Full Output

    C:\Users\admin>echo %SAPDATA_HOME% G:\oracle\CER
    NAME --------------------------------------------------------------------------------
    G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSTEM.DATA1
    G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSAUX01.DBF
    G:\ORACLE\CER\DATA\SAPDATA1\UNDO_1\UNDO.DATA1
    G:\ORACLE\CER\DATA\SAPDATA1\ROLL_1\ROLL.DATA1
    G:\ORACLE\CER\DATA\SAPDATA1\BTABD_1\BTABD.DATA1
    G:\ORACLE\CER\DATA\SAPDATA1\DDICD_1\DDICD.DATA1
    G:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1\EL46BI.DATA1
    G:\ORACLE\CER\DATA\SAPDATA1\POOLI_1\POOLI.DATA1
    G:\ORACLE\CER\DATA\SAPDATA2\BTABI_1\BTABI.DATA1
    G:\ORACLE\CER\DATA\SAPDATA2\CLUD_1\CLUD.DATA1
    G:\ORACLE\CER\DATA\SAPDATA2\POOLD_1\POOLD.DATA1
    NAME -------------------------------------------------------------------------------- G:\ORACLE\CER\DATA\SAPDATA2\STABI_2\STABI.DATA2
    G:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1\SOURCED.DATA1
    G:\ORACLE\CER\DATA\SAPDATA2\USER1I_1\USER1I.DATA1
    G:\ORACLE\CER\DATA\SAPDATA3\STABD_1\STABD.DATA1
    G:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1\EL46BD.DATA1
    G:\ORACLE\CER\DATA\SAPDATA4\PROTD_1\PROTD.DATA1
    G:\ORACLE\CER\DATA\SAPDATA4\USER1D_1\USER1D.DATA1
    G:\ORACLE\CER\DATA\SAPDATA5\DDICI_1\DDICI.DATA1
    G:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1\ES46BD.DATA1
    20 rows selected.

  3. Set the Oracle database state to mount mode so that you can back up the control file to trace.

    On the sqlplus command line, type the following command, substituting the control_file_location parameter with the complete path to the source control file:

    SQL> shut immediate
    SQL> startup mount
    SQL> alter database backup controlfile to trace as '<control_file_location>';

    Example

    SQL> shut immediate
    SQL> startup mount
    SQL> alter database backup controlfile to trace as 'G:\oracle\control.ora';

  4. On the new location (for example, "C:\ORACLE\CER\DATA"), create the SAPDATA parent directory structure that you noted in Step 2. On the command line, type the following command, substituting the new_location parameter with the new location path and the SID with the Oracle SID and the child_directory. You must repeat this for each child directory:

    mkdir \new_location\SID\DATA\child_directory

    Expand All

    Example

    In this example the new location is C:\ORACLE\CER\DATA.

    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA2
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA3
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA4
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA5
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA6

    You must create the subdirectories for each child directory

    Expand All

    Example

    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1\BTABD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA2\BTABI_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA2\CLUD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1\DDICD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA5\DDICI_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA2\POOLD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1\POOLI_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA4\PROTD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1\ROLL_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA3\STABD_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA2\STABI_2
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1\UNDO_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA4\USER1D_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA2\USER1I_1
    C:\Users\admin>mkdir C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1
  5. Verify the database is in the MOUNT mode.

    SQL> select status from v$instance;
    STATUS
    ------------
    MOUNTED

  6. Edit the BRBACKUP summary file and note the name of the latest offline rman_util detail file name.

    besbrqzr aff 2015-12-17 01:15:23 2015-12-17 01:18:19 0 ............... 21 20 0 31 2823716 31 2823716 ALL offline_force util_file ------ 7.40 (4) CER

Procedure

  1. On the command line, type the following command.

    brrestore -m all,<source drive 1>=<target drive 1>,<source drive 2>=<target drive 2> -b <file-id>.aff]-d <backup_device_type>

    Expand All

    Example

    brrestore -m all,G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSTEM.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1,G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSAUX01.DBF=C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1, G:\ORACLE\CER\DATA\SAPDATA1\UNDO_1\UNDO.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\UNDO_1,G:\ORACLE\CER\DATA\SAPDATA1\ROLL_1\ROLL.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\ROLL_1, G:\ORACLE\CER\DATA\SAPDATA1\BTABD_1\BTABD.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\BTABD_1,G:\ORACLE\CER\DATA\SAPDATA1\DDICD_1\DDICD.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\DDICD_1, G:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1\EL46BI.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1,G:\ORACLE\CER\DATA\SAPDATA1\POOLI_1\POOLI.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\POOLI_1, G:\ORACLE\CER\DATA\SAPDATA2\BTABI_1\BTABI.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\BTABI_1,G:\ORACLE\CER\DATA\SAPDATA2\CLUD_1\CLUD.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\CLUD_1, G:\ORACLE\CER\DATA\SAPDATA2\POOLD_1\POOLD.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\POOLD_1,G:\ORACLE\CER\DATA\SAPDATA2\STABI_2\STABI.DATA2=C:\ORACLE\CER\DATA\SAPDATA2\STABI_2, G:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1\SOURCED.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1,G:\ORACLE\CER\DATA\SAPDATA2\USER1I_1\USER1I.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\USER1I_1, G:\ORACLE\CER\DATA\SAPDATA3\STABD_1\STABD.DATA1=C:\ORACLE\CER\DATA\SAPDATA3\STABD_1,G:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1\EL46BD.DATA1=C:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1, G:\ORACLE\CER\DATA\SAPDATA4\PROTD_1\PROTD.DATA1=C:\ORACLE\CER\DATA\SAPDATA4\PROTD_1,G:\ORACLE\CER\DATA\SAPDATA4\USER1D_1\USER1D.DATA1=C:\ORACLE\CER\DATA\SAPDATA4\USER1D_1, G:\ORACLE\CER\DATA\SAPDATA5\DDICI_1\DDICI.DATA1=C:\ORACLE\CER\DATA\SAPDATA5\DDICI_1,G:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1\ES46BD.DATA1=C:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1 -b besbrqzr.aff -d util_file
    eBR0401I BRRESTORE 7.40 (4)
    BR0405I Start of file restore: resbrsar.rsb 2015-12-17 01:27:05
    BR0484I BRRESTORE log file: G:\oracle\CER\sapbackup\resbrsar.rsb

    BR0280I BRRESTORE time stamp: 2015-12-17 01:27:05
    BR0407I Restore of database: CER
    BR0408I BRRESTORE action ID: resbrsar
    BR0409I BRRESTORE function ID: rsb
    BR0449I Restore mode: ALL BR0411I Database files for restore:
    G:\ORACLE\CER\DATA\SAPDATA1\BTABD_1\BTABD.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\BTABD_1
    G:\ORACLE\CER\DATA\SAPDATA2\BTABI_1\BTABI.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\BTABI_1
    G:\ORACLE\CER\DATA\SAPDATA2\CLUD_1\CLUD.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\CLUD_1
    G:\ORACLE\CER\DATA\SAPDATA1\DDICD_1\DDICD.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\DDICD_1
    G:\ORACLE\CER\DATA\SAPDATA5\DDICI_1\DDICI.DATA1=C:\ORACLE\CER\DATA\SAPDATA5\DDICI_1
    G:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1\EL46BD.DATA1=C:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1
    G:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1\EL46BI.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1
    G:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1\ES46BD.DATA1=C:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1
    G:\ORACLE\CER\DATA\SAPDATA2\POOLD_1\POOLD.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\POOLD_1
    G:\ORACLE\CER\DATA\SAPDATA1\POOLI_1\POOLI.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\POOLI_1
    G:\ORACLE\CER\DATA\SAPDATA4\PROTD_1\PROTD.DATA1=C:\ORACLE\CER\DATA\SAPDATA4\PROTD_1
    G:\ORACLE\CER\DATA\SAPDATA1\ROLL_1\ROLL.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\ROLL_1
    G:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1\SOURCED.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1
    G:\ORACLE\CER\DATA\SAPDATA3\STABD_1\STABD.DATA1=C:\ORACLE\CER\DATA\SAPDATA3\STABD_1
    G:\ORACLE\CER\DATA\SAPDATA2\STABI_2\STABI.DATA2=C:\ORACLE\CER\DATA\SAPDATA2\STABI_2
    G:\ORACLE\CER\DATA\SAPDATA1\UNDO_1\UNDO.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\UNDO_1
    G:\ORACLE\CER\DATA\SAPDATA4\USER1D_1\USER1D.DATA1=C:\ORACLE\CER\DATA\SAPDATA4\USER1D_1
    G:\ORACLE\CER\DATA\SAPDATA2\USER1I_1\USER1I.DATA1=C:\ORACLE\CER\DATA\SAPDATA2\USER1I_1
    G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSAUX01.DBF=C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1
    G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSTEM.DATA1=C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1
    BR0419I Files will be restored from backup: besbrqzr.aff 2015-12-17 01:15:23
    BR0416I 20 files found to restore, total size 815.156 MB BR0421I Restore device type: util_file

    BR0280I BRRESTORE time stamp: 2015-12-17 01:27:05 BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:

    Type ‘c’ and press enter for the restore to complete.

  2. Create a new control file. Open the source control file that was created in this step. Look for the NORESETLOGS line. Copy the lines to notepad.
    Expand All

    Example

    In this example, the control file is "G:\oracle\oracle.ora".

    File before the datafile change File after the datafile change

    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "CER"
    NORESETLOGS ARCHIVELOG
        MAXLOGFILES 32
        MAXLOGMEMBERS 2
        MAXDATAFILES 255
        MAXINSTANCES 16
        MAXLOGHISTORY 1752
    LOGFILE
    GROUP 1 (
       'G:\ORACLE\CER\LOGS\ORIGLOGA\LOG1_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGA\LOG1_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 2 (
       'G:\ORACLE\CER\LOGS\ORIGLOGB\LOG2_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGB\LOG2_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 3 (
       'G:\ORACLE\CER\LOGS\ORIGLOGA\LOG3_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGA\LOG3_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 4 (
       'G:\ORACLE\CER\LOGS\ORIGLOGB\LOG4_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGB\LOG4_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512
    -- STANDBY LOGFILE
    DATAFILE
    'G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSAUX01.DBF',
    'G:\ORACLE\CER\DATA\SAPDATA1\UNDO_1\UNDO.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA1\ROLL_1\ROLL.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA1\BTABD_1\BTABD.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA1\DDICD_1\DDICD.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1\EL46BI.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA1\POOLI_1\POOLI.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA2\BTABI_1\BTABI.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA2\CLUD_1\CLUD.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA2\POOLD_1\POOLD.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA2\STABI_2\STABI.DATA2',
    'G:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1\SOURCED.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA2\USER1I_1\USER1I.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA3\STABD_1\STABD.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1\EL46BD.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA4\PROTD_1\PROTD.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA4\USER1D_1\USER1D.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA5\DDICI_1\DDICI.DATA1',
    'G:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1\ES46BD.DATA1'
    CHARACTER SET US7ASCII

    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "CER"
    NORESETLOGS ARCHIVELOG
        MAXLOGFILES 32
        MAXLOGMEMBERS 2
        MAXDATAFILES 255
        MAXINSTANCES 16
        MAXLOGHISTORY 1752
    LOGFILE
    GROUP 1 (
       'G:\ORACLE\CER\LOGS\ORIGLOGA\LOG1_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGA\LOG1_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 2 (
       'G:\ORACLE\CER\LOGS\ORIGLOGB\LOG2_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGB\LOG2_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 3 (
       'G:\ORACLE\CER\LOGS\ORIGLOGA\LOG3_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGA\LOG3_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 4 (
       'G:\ORACLE\CER\LOGS\ORIGLOGB\LOG4_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGB\LOG4_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512
    -- STANDBY LOGFILE
    DATAFILE
    'C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSAUX01.DBF',
    'C:\ORACLE\CER\DATA\SAPDATA1\UNDO_1\UNDO.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\ROLL_1\ROLL.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\BTABD_1\BTABD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\DDICD_1\DDICD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1\EL46BI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\POOLI_1\POOLI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\BTABI_1\BTABI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\CLUD_1\CLUD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\POOLD_1\POOLD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\STABI_2\STABI.DATA2',
    'C:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1\SOURCED.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\USER1I_1\USER1I.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA3\STABD_1\STABD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1\EL46BD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA4\PROTD_1\PROTD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA4\USER1D_1\USER1D.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA5\DDICI_1\DDICI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1\ES46BD.DATA1'
    CHARACTER SET US7ASCII

  3. Shut down the database. On the sqlplus command line, type the following command:

    SQL> shut immediate;

  4. Go to sqlplus and paste the edited datafile that you created.
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "CER"
    NORESETLOGS ARCHIVELOG
        MAXLOGFILES 32
        MAXLOGMEMBERS 2
        MAXDATAFILES 255
        MAXINSTANCES 16
        MAXLOGHISTORY 1752
    LOGFILE
    GROUP 1 (
       'G:\ORACLE\CER\LOGS\ORIGLOGA\LOG1_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGA\LOG1_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 2 (
       'G:\ORACLE\CER\LOGS\ORIGLOGB\LOG2_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGB\LOG2_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 3 (
       'G:\ORACLE\CER\LOGS\ORIGLOGA\LOG3_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGA\LOG3_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512,
    GROUP 4 (
       'G:\ORACLE\CER\LOGS\ORIGLOGB\LOG4_M1.DBF',
       'G:\ORACLE\CER\LOGS\MIRRLOGB\LOG4_M2.DBF'
    ) SIZE 10M BLOCKSIZE 512
    -- STANDBY LOGFILE
    DATAFILE
    'C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSAUX01.DBF',
    'C:\ORACLE\CER\DATA\SAPDATA1\UNDO_1\UNDO.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\ROLL_1\ROLL.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\BTABD_1\BTABD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\DDICD_1\DDICD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1\EL46BI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA1\POOLI_1\POOLI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\BTABI_1\BTABI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\CLUD_1\CLUD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\POOLD_1\POOLD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\STABI_2\STABI.DATA2',
    'C:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1\SOURCED.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA2\USER1I_1\USER1I.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA3\STABD_1\STABD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1\EL46BD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA4\PROTD_1\PROTD.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA4\USER1D_1\USER1D.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA5\DDICI_1\DDICI.DATA1',
    'C:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1\ES46BD.DATA1'
    CHARACTER SET US7ASCII
    Expand All

    Example Output

    NAME --------------------------------------------------------------------------------
    C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSTEM.DATA1
    C:\ORACLE\CER\DATA\SAPDATA1\SYSTEM_1\SYSAUX01.DBF
    C:\ORACLE\CER\DATA\SAPDATA1\UNDO_1\UNDO.DATA1
    C:\ORACLE\CER\DATA\SAPDATA1\ROLL_1\ROLL.DATA1
    C:\ORACLE\CER\DATA\SAPDATA1\BTABD_1\BTABD.DATA1
    C:\ORACLE\CER\DATA\SAPDATA1\DDICD_1\DDICD.DATA1
    C:\ORACLE\CER\DATA\SAPDATA1\EL46BI_1\EL46BI.DATA1
    C:\ORACLE\CER\DATA\SAPDATA1\POOLI_1\POOLI.DATA1
    C:\ORACLE\CER\DATA\SAPDATA2\BTABI_1\BTABI.DATA1
    C:\ORACLE\CER\DATA\SAPDATA2\CLUD_1\CLUD.DATA1
    C:\ORACLE\CER\DATA\SAPDATA2\POOLD_1\POOLD.DATA1

    NAME --------------------------------------------------------------------------------
    C:\ORACLE\CER\DATA\SAPDATA2\STABI_2\STABI.DATA2
    C:\ORACLE\CER\DATA\SAPDATA2\SOURCED_1\SOURCED.DATA1
    C:\ORACLE\CER\DATA\SAPDATA2\USER1I_1\USER1I.DATA1
    C:\ORACLE\CER\DATA\SAPDATA3\STABD_1\STABD.DATA1
    C:\ORACLE\CER\DATA\SAPDATA4\EL46BD_1\EL46BD.DATA1
    C:\ORACLE\CER\DATA\SAPDATA4\PROTD_1\PROTD.DATA1
    C:\ORACLE\CER\DATA\SAPDATA4\USER1D_1\USER1D.DATA1
    C:\ORACLE\CER\DATA\SAPDATA5\DDICI_1\DDICI.DATA1
    C:\ORACLE\CER\DATA\SAPDATA6\ES46BD_1\ES46BD.DATA1

    20 rows selected.

Cross Machine Restores

Cross Machine Restores to the Same SAP Oracle SID

You can use the util_file interface or the rman_util interface to perform a cross-machine restore.

Perform a cross machine restore when the original database host has been damaged or destroyed, and you need to restore the data to a different host from the backup.

Before You Begin

  1. On the source host, locate the detail file name and the summary file name of the data and log backups to be restored.
  2. On the destination client, create an instance for the database that you want to restore. For more information, see Creating an Instance.
  3. On the destination client, verify the $sapdata_home directory structure exists. Create the directory structure if it does not
  4. Copy, or restore the init<SID>.ora and init<SID>.sap files from the host to the destination.
  5. On the destination client, edit the $ORACLE_HOME/dbs/init<SID>.utl file.

    Substitute the CvInstanceName, srcCrossClient and srccrossdbname parameters.

    For information on the supported parameters, see Supported SAP Oracle Util File Parameters

    D:\oracle\product\10.2.0\db_1\database>more init<DESTINATION_SID>.utl.txt
    numstreams
    number_streams
    CvInstanceName
    Instance001
    CvClientName
    srcCrossClient
    client_name

  6. Place the destination host in NOMOUNT mode.

Procedure

Expand All

UTIL_FILE

  1. On the destination host, restore the detail files associated with the full backup.  On the command line, type the following command,

    Substitute the log_detail_file and data_detail_file variables. You must include the full path and the file name of the data detail file.

    brrestore -d util_file -b2 <backupid\\#NULL> -m <log_detail_file>
    brrestore -d util_file -b2 <backupid\\#NULL> -m <data_detail_file>

  2. On the destination host, restore the summary files. On the command line, type the following command,

    Substitute the log_summary_file and data_summary_file variables.

    brrestore -d util_file -b2 \#NULL -m <log_summary_file>
    brrestore -d util_file -b2 \#NULL -m <data_summary_file>

  3. On the destination host, restore the control file. On the command line, type the following command.

    brrestore -d util_file -b last -m 0

  4. On the destination host, restore the data files. On the command line, type the following command.

    brrestore -d util_file -b last -m all -u /

  5. On the destination host, restore the archive logs. On the command line, type the following command.

    brrestore -a <logn1>-<logn2>

  6. On the destination host, recover the database to the recover time. On the command line, type the following command, substituting the time to recover the database to.

    Sql> recover database until time <YYYY-MM-DD hh.mm.ss> using backup controlfile until cancel;

  7. On the destination host, open the database with the RESETLOGS option. On the command line, type the following command.

    sql>alter database open resetlogs

Expand All

RMAN_UTIL

  1. On the destination host, restore the detail files associated with the full backup.  On the command line, type the following command,

    Substitute the log_detail_file and data_detail_file variables. You must include the full path and the file name of the data detail file.

    brrestore -d util_file -b2 <backupid\\#NULL> -m <log_detail_file>
    brrestore -d util_file -b2 <backupid\\#NULL> -m <data_detail_file>

  2. On the destination host, restore the summary afiles. On the command line, type the following command,

    Substitute the log_summary_file and data_summary_file variables.

    brrestore -d util_file -b2 \#NULL -m <log_summary_file>
    brrestore -d util_file -b2 \#NULL -m <data_summary_file>

  3. On the destination host, restore the control file

    . On the command line, type the following comman.

    Substitute the data_backup, backup_id and control_file variables.

    Restore the control file from the data detail file.

    brrestore -d rman_util -b <data_detail_file> -m 0 -c force -u /

    Restore the control file from the log backup

    brrestore -d util_file -b2 <backup_id> -m <control_file>

  4. On the destination host, place the database in MOUNT mode.
  5. On the destination host, restore the data files. On the command line, type the following command.

    Substitute the data_detail_file variable.

    brrestore -d rman_util -b <data_detail_file> -m all -c force -u /

  6. On the destination host, restore the archive logs. On the command line, type the following command.

    Substitute the log_number variable.

    brrestore -d rman_util -a <log_number> -c force -u /

  7. On the destination host, recover the database to the recover time. On the command line, type the following command.

    Substitute the time to recover the database to.

    Sql> recover database until time <YYYY-MM-DD hh.mm.ss> using backup controlfile until cancel;

  8. On the destination host, open  the database with the RESET LOGS option. On the command line, type the following command.

    sql>alter database open resetlogs

Cross Machine Restores to a Different SAP Oracle SID Using the BRRESTORE Command

Perform a cross-machine restore when the original database host has been damaged or destroyed, and you need to restore the data to a different host from the backup.

Before You Begin

  1. On the source host, locate the detail file name and the summary file name of the data and log backups to be restored.
  2. On the destination client, create an instance for the database that you want to restore. For more information, see Creating an Instance.
  3. On the destination client, verify the $sapdata_home directory structure exists. Create the directory structure if it does not
  4. On the destination client, edit the $ORACLE_HOME/dbs/init<SID>.utl file.

    Substitute the CvInstanceName, srcCrossClient and srccrossdbname parameters

    For information on the supported parameters, see Supported SAP Oracle Util File Parameters

    more init<DESTINATION_SID>.utl.txt
    numStreams
    number_streams
    CvInstanceName
    Instance001
    CvClientName
    srcCrossClient
    client_name
    srccrossdbname
    source_database_name
    destdbname
    destination_database_name

  5. Place the destination host in NOMOUNT mode.

Procedure

  1. Manually copy the init<SOURCE_SID>.sap file from the source client to the destination client

    Substitute the <SOURCE_SID> variable.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\init<SOURCE_SID>.sap==D:\oracle\product\10.2.0\db_1\database

    BRRESTORE Sample Output

    backintCmd=[backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkylvd.lst -t file -p d:\param.txt]

    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.prodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2283
    Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14424 Token=<14424:2:1>
    Success in init with JM
    Cannot obtain the Index MediaAgent from the Archive Manager..
    Attaching CommServer Session
    AfileNumber=19929, AcommCellId=2 AgroupNumber=23 archfilename=D:\oracle\product\10.2.0\db_1\database\initCER.sap copy=36 BID=13310 reqBID=13310 afileFlags=4d

    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    #FILE..... D:\oracle\product\10.2.0\db_1\database\initCER.sap D:\oracle\product\10.2.0\db_1\database\initCER.sap
    #RESTORED. 1021752_13310
    Successful restore; 1 File(s); total transferred bytes=12616
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    BR0374I 1 of 1 file restored by backup utility
    BR0230I Backup utility called successfully

    BR0406I End of file restore: rehkylvd.rsf 2011-12-14 08.42.27
    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    BR0402I BRRESTORE completed successfully

  2. On the destination client, rename the file init<SOURCE_SID>.sap to init<DESTINATION_SID>.sap.  On the destination client command line, type the following command.

    Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    move init<SOURCE_SID>.sap init<DESTINATION_SID>.sap

  3. On the destination client, edit the following parameters in init<SID>.sap to the <DESTINATION_SID>.
    Expand All

    Source Client Example

    backup_root_dir = D:\oracle\<SOURCE_SID>\sapbackup
    stage_root_dir = D:\oracle\<SOURCE_SID>\sapbackup
    compress_cmd = "D:\usr\sap\<SOURCE_SID>\sys\exe\run\mkszip -c $ > $"
    uncompress_cmd = "D:\usr\sap\<SOURCE_SID>\sys\exe\run\uncompress -c $ > $"
    compress_dir = D:\oracle\<SOURCE_SID>\sapreorg
    archive_copy_dir = D:\oracle\<SOURCE_SID>\sapbackup
    archive_stage_dir = D:\oracle\<SOURCE_SID>\sapbackup

    Destination Client Example

    backup_root_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    stage_root_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    compress_cmd = "D:\usr\sap\<DESTINATION_SID>\sys\exe\run\mkszip -c $ > $"
    uncompress_cmd = "D:\usr\sap\<DESTINATION_SID>\sys\exe\run\uncompress -c $ > $"
    compress_dir = D:\oracle\<DESTINATION_SID>\sapreorg
    archive_copy_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    archive_stage_dir = D:\oracle\<DESTINATION_SID>\sapbackup

  4. Manually copy the init<SOURCE_SID>.ora file from the source client to the destination client.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\init<SOURCE_SID>.ora==D:\oracle\product\10.2.0\db_1\database

  5. On the destination client, rename init<SOURCE_SID>.ora to init<DESTINATION_SID>.ora. On the command line, type the following:

    move init<SOURCE_SID>.ora init<DESTINATION_SID>.ora

  6. On the destination client, edit the init<DESTINATION_SID>.ora file and update the following parameters with the new directory structure, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    control_files = (D:\oracle\NEW_SID\sapdata1\cntrl\ctrl<SOURCE_SID>.ctl,
    D:\oracle\NEW_SID\sapdata2\cntrl\ctrl<SOURCE_SID>.ctl,
    D:\oracle\NEW_SID\saparch\cntrl\ctrl<SOURCE_SID>.ctl)
    background_dump_dest = D:\oracle\<DESTINATION_SID>\saptrace\background
    user_dump_dest = D:\oracle\<DESTINATION_SID>\saptrace\usertrace
    log_archive_dest = D:\oracle\<DESTINATION_SID>\saparch
    db_name = NEW_SID

  7. On the destination client, restore the <SOURCE_SID>.log file by using the BRRESTORE command. On the command line, type the following command to restore the file:

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\sapbackup\back<SOURCE_SID>.log==D:\oracle\<DESTINATION_SID>\sapbackup

    Expand All

    Example BRRESTORE Output

    BR0401I BRRESTORE 7.20 (1)
    BR0405I Start of file restore: rehkyqtz.rsf 2011-12-14 09.37.35
    BR0484I BRRESTORE log file: D:\oracle\TRD\sapbackup\rehkyqtz.rsf

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.35
    BR0407I Restore of database: TRD
    BR0408I BRRESTORE action ID: rehkyqtz
    BR0409I BRRESTORE function ID: rsf
    BR0415I File for restore using backup utility ID \#NULL: D:\oracle\CER\sapbackup\backCER.log=D:\oracle\TRD\sapbackup
    BR0416I 1 file found to restore, size 0.000 MB
    BR0421I Restore device type: util_file

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.35
    BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
    c
    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.37
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.37
    BR0229I Calling backup utility with function 'restore'...
    BR0278I Command output of 'backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkyqtz.lst -t file -p d:\param.txt':
    Setting the Number of streams desired=<1> for 1 File restore.

    -------------------------- Output of restore -------------------------

    BI_BACKUP=<PARTIAL>
    BI_CALLER=<BRRESTORE>
    BI_REQUEST=<NEW>


    -------------------------- Parameter Specified -------------------------


    CvInstanceName=<Instance001>
    CvClientName=<sde-sap1>
    numstreams=<1>
    srccrossclient=<sde-sap2>

    srccrossdbname=<CER>

    destdbname=<TRD>



    -------------------------- backint Command Line  -----------backintCmd=[backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkyqtz.lst -t file -p d:\param.txt ]

    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2283
    Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14429 Token=<14429:2:1>
    Success in init with JM
    Cannot obtain the Index MediaAgent from the Archive Manager..
    Attaching CommServer Session
    AfileNumber=19914, AcommCellId=2 AgroupNumber=22 archfilename=D:\oracle\CER\sapbackup\backCER.log copy=35 BID=13310 reqBID=13310 afileFlags=0d

    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.00
    #FILE..... D:\oracle\CER\sapbackup\backCER.log D:\oracle\TRD\sapbackup\backCER.log
    #RESTORED. 1021752_13310
    Successful restore; 1 File(s); total transferred bytes=2912
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.01
    BR0374I 1 of 1 file restored by backup utility
    BR0230I Backup utility called successfully              BR0406I End of file restore: rehkyqtz.rsf 2011-12-14 09.38.01
    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.01
    BR0402I BRRESTORE completed successfully

  8. On the destination client, rename the back<SOURCE_SID>.log to back<DESTINATION_SID>.log file. On the command line, type the following, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    move back<SOURCE_SID>.log back<DESTINATION_SID>.log

  9. On the destination client, copy the arch<SOURCE_SID>.log log summary file from the source client to the destination client.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\arch<SOURCE_SID>.log==D:\oracle\<DESTINATION_SID>\saparch

  10. On the destination client, copy the detail files from the sapbackup and the saparch source client directory onto the destination client. Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    D:\oracle\TRD\saparch>move arch<SOURCE_SID>.log arch<DESTINATION_SID>.log

  11. On the destination client, copy the arch<SOURCE_SID>.log log summary file from the source client to the destination client.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\sapbackup\<brbackup_detail_file>==D:\oracle\<DESTINATION_SID>\sapbackup

  12. Identify the corresponding detail file in $SAPDATA_HOME/saparch directory from the source client and then restore it.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\<brarchive_detail_file>==D:\oracle\<DESTINATION_SID>\saparch

  13. On the destination client, restore the control file by using the BRRESTORE command. On the command line, type the following:

    brrestore -d util_file -b <detail_file_name\last> -m 0

    Expand All

    Example BRRESTORE Output

    BR0401I BRRESTORE 7.20 (1)
    BR0405I Start of file restore: rehlcdsc.rsb 2011-12-15 02.42.02
    BR0484I BRRESTORE log file: D:\oracle\TRD\sapbackup\rehlcdsc.rsb

    BR0454W Values of oracle_sid are different: current 'TRD', backup behkctrv.anf 'CER'
    BR0455W Value 'TRD' of oracle_sid will be used for restore
    BR0454W Values of sapdata_home are different: current 'D:\oracle\TRD', backup behkctrv.anf 'D:\oracle\CER'
    BR0455W Value 'D:\oracle\TRD' of sapdata_home will be used for restore
    BR0460W Termination message not found in D:\oracle\TRD\sapbackup\behkctrv.anf - log file incomplete (this is OK if the log fi

    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.02
    BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
    c
    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.04
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...

    BR0427I Files from the old sapdata_home D:\oracle\CER will be restored into the new sapdata_home D:\oracle\TRD

    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.04
    BR0407I Restore of database: TRD
    BR0408I BRRESTORE action ID: rehlcdsc
    BR0409I BRRESTORE function ID: rsb
    BR0449I Restore mode: partial
    BR0411I Database files for restore:
    D:\oracle\CER\sapbackup\CNTRLCER.DBF=D:\oracle\TRD\sapbackup
    D:\oracle\CER\sapdata1\cntrl\ctrlCER.ctl
    D:\oracle\CER\sapdata2\cntrl\ctrlCER.ctl
    D:\oracle\CER\saparch\cntrl\ctrlCER.ctl
    BR0419I Files will be restored from backup: behkctrv.anf 2011-12-09 22.45.55
    BR0416I 1 file found to restore, size 10.766 MB
    BR0421I Restore device type: util_file

    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.05
    BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
    c
    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.10
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...

    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.10
    BR0229I Calling backup utility with function 'restore'...
    BR0278I Command output of 'backint -u CER -f restore -i D:\oracle\TRD\sapbackup\.rehlcdsc.lst -t file -p D:\param.txt':
    Setting the Number of streams desired=<1> for 1 File restore.


    -------------------------- Output of restore -------------------------

    BI_BACKUP=<PARTIAL>
    BI_CALLER=<BRRESTORE>
    BI_REQUEST=<NEW>


    -------------------------- Parameter Specified -------------------------

    CvInstanceName=<Instance001>
    CvClientName=<sde-sap1>
    numstreams=<1>
    srccrossclient=<sde-sap2>

    srccrossdbname=<CER>

    destdbname=<CER>


    -------------------------- backint Command Line -------------------------

    backintCmd=[backint -u CER -f restore -i D:\oracle\TRD\sapbackup\.rehlcdsc.lst -t file -p D:\param.txt ]

    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2283
    Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14526 Token=<14526:2:1>
    Success in init with JM
    Attaching CommServer Session
    AfileNumber=19908, AcommCellId=2 AgroupNumber=22 archfilename=D:\oracle\CER\sapbackup\CNTRLCER.DBF copy=35 BID=13310 reqBID=1

    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.31
    #FILE..... D:\oracle\CER\sapbackup\CNTRLCER.DBF D:\oracle\TRD\sapbackup\CNTRLCER.DBF
    #RESTORED. 1021752_13310
    Successful restore; 1 File(s); total transferred bytes=11288746
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.32
    BR0374I 1 of 1 file restored by backup utility
    BR0230I Backup utility called successfully

    BR0351I Restoring D:\ORACLE\TRD\SAPDATA1\CNTRL\ctrlCER.ctl
    BR0355I from D:\oracle\TRD\sapbackup\CNTRLCER.DBF ...

    BR0351I Restoring D:\ORACLE\TRD\SAPDATA2\CNTRL\ctrlCER.ctl
    BR0355I from D:\oracle\TRD\sapbackup\CNTRLCER.DBF ...

    BR0351I Restoring D:\ORACLE\TRD\SAPARCH\CNTRL\ctrlCER.ctl
    BR0355I from D:\oracle\TRD\sapbackup\CNTRLCER.DBF ...

    BR0406I End of file restore: rehlcdsc.rsb 2011-12-15 02.42.32
    BR0280I BRRESTORE time stamp: 2011-12-15 02.42.32
    BR0403I BRRESTORE completed successfully with warnings

  14. On the destination client, create an SPFILE from the PFILE. On the command line, type the following:

    D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba
    SQL> startup nomount;
    SQL> create spfile from pfile;

    Expand All

    Full Output

    D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Dec 14 09:21:51 2011
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    Connected to an idle instance.
    SQL> startup nomount;
    ORACLE instance started.
    Total System Global Area 138412032 bytes
    Fixed Size 2063992 bytes
    Variable Size 125829512 bytes
    Database Buffers 8388608 bytes
    Redo Buffers 2129920 bytes
    SQL> create spfile from pfile;
    File created.
    SQL>

  15. On the destination client, restore the database files by using the BRRESTORE command. On the command line, type the following command:

    brrestore -d util_file -m all -b <data_detail_file>

  16. On the destination client, identify the log range from the log detail file and restore it. On the command line, type the following command.

    Substitute the <DESTINATION_SID> variable .

    brrestore -d util_file -a <log_range_start>-<log_range_end>==D:\oracle\<DESTINATION_SID>\saparch

    Expand All

    Example BRRESTORE Output

    BR0401I BRRESTORE 7.20 (1)
    BR0405I Start of file restore: rehlchik.rsa 2011-12-15 03.22.54
    BR0484I BRRESTORE log file: D:\oracle\TRD\sapbackup\rehlchik.rsa

    BR0414I Offline redolog files for restore of database instance TRD:
    D:\oracle\TRD\saparch:
    65,66,67,68,69,70,71,72,73,74,
    75

    BR0280I BRRESTORE time stamp: 2011-12-15 03.22.54
    BR0407I Restore of database: TRD
    BR0408I BRRESTORE action ID: rehlchik
    BR0409I BRRESTORE function ID: rsa
    BR0419I Files will be restored from backup: aehkctzc.sve 2011-12-09 22.49.04
    BR0416I 11 files found to restore, total size 79.894 MB
    BR0421I Restore device type: util_file

    BR0280I BRRESTORE time stamp: 2011-12-15 03.22.54
    BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
    c
    BR0280I BRRESTORE time stamp: 2011-12-15 03.22.55
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...

    BR0280I BRRESTORE time stamp: 2011-12-15 03.22.55
    BR0229I Calling backup utility with function 'restore'...
    BR0278I Command output of 'backint -u CER -f restore -i D:\oracle\TRD\sapbackup\.rehlchik.lst -t file -p D:\param.txt':


    -------------------------- Output of restore -------------------------

    BI_BACKUP=<ARCHIVE>
    BI_CALLER=<BRRESTORE>
    BI_REQUEST=<NEW>


    -------------------------- Parameter Specified -------------------------

    CvInstanceName=<Instance001>
    CvClientName=<sde-sap1>
    numstreams=<4>
    srccrossclient=<sde-sap2>

    srccrossdbname=<CER>

    destdbname=<CER>


    -------------------------- backint Command Line -------------------------

    backintCmd=[backint -u CER -f restore -i D:\oracle\TRD\sapbackup\.rehlchik.lst -t file -p D:\param.txt ]

    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2284
    Total number of Collect Files Generated=<4>
    Number of streams desired=<4> Number of files to restore=<4> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14529 Token=<14529:2:1>
    Success in init with JM
    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2284
    Restore has been requested

    Success in init with JM
    Attaching CommServer Session
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2284
    Restore has been requested

    Success in init with JM
    Attaching CommServer Session
    Restoring from MediaId=<23_MagVolId_9089>
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2284
    Restore has been requested

    Success in init with JM
    Attaching CommServer Session
    Restoring from MediaId=<23_MagVolId_9092>
    Restoring from MediaId=<23_MagVolId_9091>
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2284
    Restore has been requested

    Success in init with JM
    Attaching CommServer Session
    Restoring from MediaId=<23_MagVolId_9090>
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00066_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.18
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00066_0769082544.001 D:\oracle\TRD\saparch\ARC00066_0769082544.001
    #RESTORED. 1021752_13310
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00065_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.18
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00065_0769082544.001 D:\oracle\TRD\saparch\ARC00065_0769082544.001
    #RESTORED. 1021752_13310
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00067_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.19
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00067_0769082544.001 D:\oracle\TRD\saparch\ARC00067_0769082544.001
    #RESTORED. 1021752_13310
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00070_0769082544.001>
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00069_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.23
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00070_0769082544.001 D:\oracle\TRD\saparch\ARC00070_0769082544.001
    #RESTORED. 1021752_13310

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.23
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00069_0769082544.001 D:\oracle\TRD\saparch\ARC00069_0769082544.001
    #RESTORED. 1021752_13310
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00071_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.24
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00071_0769082544.001 D:\oracle\TRD\saparch\ARC00071_0769082544.001
    #RESTORED. 1021752_13310
    Sending file=<#EOF> to the Child=<4820>
    Successful restore; 2 File(s); total transferred bytes=18104678
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00074_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.26
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00074_0769082544.001 D:\oracle\TRD\saparch\ARC00074_0769082544.001
    #RESTORED. 1021752_13310
    Sending file=<#EOF> to the Child=<4040>
    Successful restore; 3 File(s); total transferred bytes=20402201
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00073_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.27
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00073_0769082544.001 D:\oracle\TRD\saparch\ARC00073_0769082544.001
    #RESTORED. 1021752_13310
    Sending file=<#EOF> to the Child=<4504>
    Successful restore; 3 File(s); total transferred bytes=27157017
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00068_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.28
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00068_0769082544.001 D:\oracle\TRD\saparch\ARC00068_0769082544.001
    #RESTORED. 1021752_13310
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00072_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.33
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00072_0769082544.001 D:\oracle\TRD\saparch\ARC00072_0769082544.001
    #RESTORED. 1021752_13310
    RESTORED backupId=<1021752_13310> nextFile=<D:\oracle\cer\saparch\ARC00075_0769082544.001>

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.37
    #ARCHIVE.. D:\oracle\cer\saparch\ARC00075_0769082544.001 D:\oracle\TRD\saparch\ARC00075_0769082544.001
    #RESTORED. 1021752_13310
    Sending file=<#EOF> to the Child=<4972>
    Successful restore; 3 File(s); total transferred bytes=18113049
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.47
    BR0374I 11 of 11 files restored by backup utility
    BR0230I Backup utility called successfully

    BR0406I End of file restore: rehlchik.rsa 2011-12-15 03.23.47
    BR0280I BRRESTORE time stamp: 2011-12-15 03.23.47
    BR0402I BRRESTORE completed successfully

  17. On the destination client, set the database to MOUNT mode, and copy the backup control file to trace, substituting the <DESTINATION_SID> variable.

    SQL> startup mount;
    ORACLE instance started.

    SQL> alter database backup controlfile to 'D:\oracle\<DESTINATION_SID>\sapbackup\control<DESTINATION_SID>.NEW';

    SQL> alter database backup controlfile to trace as 'D:\oracle\<DESTINATION_SID>\sapbackup\control.ora';

    Expand All

    Full Output

    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area 138412032 bytes
    Fixed Size 2063992 bytes
    Variable Size 125829512 bytes
    Database Buffers 8388608 bytes
    Redo Buffers 2129920 bytes
    Database mounted. SQL> alter database backup controlfile to 'D:\oracle\<DESTINATION_SID>\sapbackup\<DESTINATION_SID>.NEW';
     Database altered.
    SQL> alter database backup controlfile to trace as 'D:\oracle\<DESTINATION_SID>\sapbackup\control.ora';
     Database altered.

  18. If you use an online backup, on the destination client, create a control file by using an SQL query similar to the one below.
    1. Shut down the destination client database.
    2. On the destination host, edit the SP file and change  the db_name from <SOURCE_SID> to <DESTINATION_SID>.
    3. Set the destination client database to NOMOUNT mode.
    4. In the trace file (located at Drive:\oracle\<DESTINATION_SID>\sapbackup\control.ora) change the following parameters in the SQL query.
      • From REUSE to SET
      • From <SOURCE_SID> to <DESTINATION_SID>
      • From NORESETLOGS to RESETLOGS
      • Edit the path from OLD DIR to NEW DIR structure
    Expand All

    Full Query

    STARTUP NOMOUNT
    CREATE CONTROLFILE SET DATABASE "<DESTINATION_SID>" RESETLOGS ARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 254
    MAXINSTANCES 16
    MAXLOGHISTORY 1752
    LOGFILE
    GROUP 1 (
    'D:\ORACLE\<DESTINATION_SID>ORIGLOGA\LOG1_M1.DBF',
    'D:\ORACLE\<DESTINATION_SID>\MIRRLOGA\LOG1_M2.DBF'
    ) SIZE 10M,
    GROUP 2 (
    'D:\ORACLE\<DESTINATION_SID>\ORIGLOGB\LOG2_M1.DBF',
    'D:\ORACLE\<DESTINATION_SID>\MIRRLOGB\LOG2_M2.DBF'
    ) SIZE 10M,
    GROUP 3 (
    'D:\ORACLE\<DESTINATION_SID>\ORIGLOGA\LOG3_M1.DBF',
    'D:\ORACLE\<DESTINATION_SID>\MIRRLOGA\LOG3_M2.DBF'
    ) SIZE 10M,
    GROUP 4 (
    'D:\ORACLE\<DESTINATION_SID>\ORIGLOGB\LOG4_M1.DBF',
    'D:\ORACLE\<DESTINATION_SID>\MIRRLOGB\LOG4_M2.DBF'
    ) SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
    'D:\ORACLE\<DESTINATION_SID>\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',
    'D:\ORACLE\<DESTINATION_SID>\SAPDATA1\UNDO_1\UNDO.DATA1',
    'D:\ORACLE\<DESTINATION_SID>\SAPDATA1\SYSTEM_1\SYSAUX.DBF',
    'D:\ORACLE\<DESTINATION_SID>\SAPDATA2\CER_1\CER.DATA1',
    'D:\ORACLE\<DESTINATION_SID>\SAPDATA3\CERUSR_1\CERUSR.DATA1'
    CHARACTER SET US7ASCII
    ;

  19. To create control files on the destination host, rename the restored control files.
  20. On the destination host, run a SQL query similar to the one below, substituting the <DESTINATION_SID> variable.

    Example

    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> STARTUP NOMOUNT
    ORACLE instance started.

    Total System Global Area 138412032 bytes
    Fixed Size 2063992 bytes
    Variable Size 125829512 bytes
    Database Buffers 8388608 bytes
    Redo Buffers 2129920 bytes
    SQL>    CREATE CONTROLFILE SET DATABASE "<DESTINATION_SID>" RESETLOGS ARCHIVELOG
      2     MAXLOGFILES 32
      3     MAXLOGMEMBERS 2
      4     MAXDATAFILES 254
      5     MAXINSTANCES 16
      6     MAXLOGHISTORY 1752
      7     LOGFILE
      8     GROUP 1 (
      9     'D:\ORACLE\<DESTINATION_SID>\ORIGLOGA\LOG1_M1.DBF',
     10     'D:\ORACLE\<DESTINATION_SID>\MIRRLOGA\LOG1_M2.DBF'
     11     ) SIZE 10M,
     12     GROUP 2 (
     13    'D:\ORACLE\<DESTINATION_SID>\ORIGLOGB\LOG2_M1.DBF',
     14    'D:\ORACLE\<DESTINATION_SID>\MIRRLOGB\LOG2_M2.DBF'
     15    ) SIZE 10M,
     16    GROUP 3 (
     17    'D:\ORACLE\<DESTINATION_SID>\ORIGLOGA\LOG3_M1.DBF',
     18    'D:\ORACLE\<DESTINATION_SID>\MIRRLOGA\LOG3_M2.DBF'
     19    ) SIZE 10M,
     20    GROUP 4 (
     21    'D:\ORACLE\<DESTINATION_SID>\ORIGLOGB\LOG4_M1.DBF',
     22    'D:\ORACLE\<DESTINATION_SID>\MIRRLOGB\LOG4_M2.DBF'
     23    ) SIZE 10M
     24    -- STANDBY LOGFILE
     25    DATAFILE
     26  'D:\ORACLE\<DESTINATION_SID>\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',
     27    'D:\ORACLE\<DESTINATION_SID>\SAPDATA1\UNDO_1\UNDO.DATA1',
     28    'D:\ORACLE\<DESTINATION_SID>\SAPDATA1\SYSTEM_1\SYSAUX.DBF',
     29    'D:\ORACLE\<DESTINATION_SID>\SAPDATA2\CER_1\CER.DATA1',
     30    'D:\ORACLE\<DESTINATION_SID>\SAPDATA3\CERUSR_1\CERUSR.DATA1'
     31    CHARACTER SET US7ASCII
     32    ;
    Control file created.

  21. On the destination client, run the following SQL query to recover the database, open the database, and add a temporary tablespace,  substituting the <DESTINATION_SID> variable name.
    Expand All

    Example

    SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
    ORA-00279: change 397349 generated at 12/09/2011 22:45:58 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\<DESTINATION_SID>\SAPARCH\ARC00074_0769082544.001
    ORA-00280: change 397349 for thread 1 is in sequence #74


    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    AUTO
    ORA-00279: change 397401 generated at 12/09/2011 22:47:55 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\<DESTINATION_SID>\SAPARCH\ARC00075_0769082544.001
    ORA-00280: change 397401 for thread 1 is in sequence #75
    ORA-00278: log file 'D:\ORACLE\<DESTINATION_SID>\SAPARCH\ARC00074_0769082544.001' no longer
    needed for this recovery


    ORA-00279: change 397431 generated at 12/09/2011 22:49:04 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\<DESTINATION_SID>\SAPARCH\ARC00076_0769082544.001
    ORA-00280: change 397431 for thread 1 is in sequence #76


    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    AUTO
    ORA-00308: cannot open archived log
    'D:\ORACLE\<DESTINATION_SID>\SAPARCH\ARC00076_0769082544.001'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.


    ORA-00308: cannot open archived log
    'D:\ORACLE\<DESTINATION_SID>\SAPARCH\ARC00076_0769082544.001'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.


    SQL> alter database open resetlogs;

    Database altered.

    SQL> ALTER TABLESPACE PSAPTEMP ADD TEMPFILE 'D:\ORACLE\NEW_SID\SAPDATA1\TEMP_1\TEMP.DATA1' REUSE;

    Tablespace altered.

Cross Client Restore to a Different SID Name Using the BRRECOVER Command

Perform a cross-machine restore when the original database host has been damaged or destroyed, and you need to restore the data to a different host from the backup.

Before You Begin

  1. Place the destination host in NOMOUNT.
  2. On the destination client, verify the $sapdata_home directory structure exists. Create the directory structure if it does not.

Procedure

  1. On the destination client, edit the $initTRD.utl file, substituting the CvInstanceName, srcCrossClient and srccrossdbname parameters.

    For information on the supported parameters, see Supported SAP Oracle Util File Parameters

    D:\oracle\product\10.2.0\db_1\database>more initTRD.utl.txt
    numStreams
    number_streams
    CvInstanceName
    Instance001
    CvClientName
    srcCrossClient
    client_name
    srccrossdbname
    source_database_name
    destdbname
    destination_database_name

  2. Manually copy the init<SOURCE_SID>.sap file from the source client to the destination client, substituting the <SOURCE_SID> variable.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\init<SOURCE_SID>.sap==D:\oracle\product\10.2.0\db_1\database

    Expand All

    BRRESTORE Sample Output

    backintCmd=[backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkylvd.lst -t file -p d:\param.txt ]

    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.prodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2283
    Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14424 Token=<14424:2:1>
    Success in init with JM
    Cannot obtain the Index MediaAgent from the Archive Manager..
    Attaching CommServer Session
    AfileNumber=19929, AcommCellId=2 AgroupNumber=23 archfilename=D:\oracle\product\10.2.0\db_1\database\initCER.sap copy=36 BID=13310 reqBID=13310 afileFlags=4d

    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    #FILE..... D:\oracle\product\10.2.0\db_1\database\initCER.sap D:\oracle\product\10.2.0\db_1\database\initCER.sap
    #RESTORED. 1021752_13310
    Successful restore; 1 File(s); total transferred bytes=12616
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    BR0374I 1 of 1 file restored by backup utility
    BR0230I Backup utility called successfully

    BR0406I End of file restore: rehkylvd.rsf 2011-12-14 08.42.27
    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    BR0402I BRRESTORE completed successfully

  3. On the destination client, rename the file init<SOURCE_SID>.sap to init<DESTINATION_SID>.sap. On the destination client command line, type the following.

    Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    move init<SOURCE_SID>.sap init<DESTINATION_SID>.sap

  4. On the destination client, edit the following parameters in init<SID>.sap to the <DESTINATION_SID>.
    Expand All

    Source Client Example

    backup_root_dir = D:\oracle\<SOURCE_SID>\sapbackup
    stage_root_dir = D:\oracle\<SOURCE_SID>\sapbackup
    compress_cmd = "D:\usr\sap\<SOURCE_SID>\sys\exe\run\mkszip -c $ > $"
    uncompress_cmd = "D:\usr\sap\<SOURCE_SID>\sys\exe\run\uncompress -c $ > $"
    compress_dir = D:\oracle\<SOURCE_SID>\sapreorg
    archive_copy_dir = D:\oracle\<SOURCE_SID>.\sapbackup
    archive_stage_dir = D:\oracle\<SOURCE_SID>\sapbackup

    Destination Client Example

    backup_root_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    stage_root_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    compress_cmd = "D:\usr\sap\<DESTINATION_SID>\sys\exe\run\mkszip -c $ > $"
    uncompress_cmd = "D:\usr\sap\<DESTINATION_SID>\sys\exe\run\uncompress -c $ > $"
    compress_dir = D:\oracle\<DESTINATION_SID>\sapreorg
    archive_copy_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    archive_stage_dir = D:\oracle\<DESTINATION_SID>\sapbackup

  5. Manually copy the init<SOURCE_SID>.ora file from the source client to the destination client, substituting the <SOURCE_SID> variable.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\init<SOURCE_SID>.ora==D:\oracle\product\10.2.0\db_1\database

  6. On the destination client, rename init<SOURCE_SID>.ora to init<DESTINATION_SID>.ora. On the command line, type the following:

    move init<SOURCE_SID>.ora init<DESTINATION_SID>.ora

  7. On the destination client, edit the init<DESTINATION_SID>.ora file and update the following parameters with the new directory structure.

    Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    control_files = (D:\oracle\<DESTINATION_SID>\sapdata1\cntrl\ctrl<SOURCE_SID>.ctl,
    D:\oracle\<DESTINATION_SID>\sapdata2\cntrl\ctrl<SOURCE_SID>.ctl,
    D:\oracle\<DESTINATION_SID>\saparch\cntrl\ctrl<SOURCE_SID>.ctl)
    background_dump_dest = D:\oracle\<DESTINATION_SID>\saptrace\background
    user_dump_dest = D:\oracle\<DESTINATION_SID>\saptrace\usertrace
    log_archive_dest = D:\oracle\<DESTINATION_SID>\saparch
    db_name = DESTINATION_SID

  8. On the destination client, create an SPFILE from the PFILE. On the command line, type the following:

    D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba
    SQL> Shutdown abort;
    SQL> startup nomount;
    SQL> create spfile from pfile;

    Full Output

    D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Dec 14 09:21:51 2011
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    Connected to an idle instance.
    SQL> Shutdown abort;
    SQL> startup nomount;
    ORACLE instance started.
    Total System Global Area 138412032 bytes
    Fixed Size 2063992 bytes
    Variable Size 125829512 bytes
    Database Buffers 8388608 bytes
    Redo Buffers 2129920 bytes
    SQL> create spfile from pfile;
    File created.
    SQL>

  9. On the destination client, restore the <SOURCE_SID>.log file by using the BRRESTORE command. On the command line, type the following command to restore the file:

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\OLD_SID\sapbackup\back<SOURCE_SID>.log==D:\oracle\<DESTINATION_SID>\sapbackup

    Expand All

    Example BRRESTORE Output

    BR0401I BRRESTORE 7.20 (1)
    BR0405I Start of file restore: rehkyqtz.rsf 2011-12-14 09.37.35
    BR0484I BRRESTORE log file: D:\oracle\TRD\sapbackup\rehkyqtz.rsf

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.35
    BR0407I Restore of database: TRD
    BR0408I BRRESTORE action ID: rehkyqtz
    BR0409I BRRESTORE function ID: rsf
    BR0415I File for restore using backup utility ID \#NULL: D:\oracle\CER\sapbackup\backCER.log=D:\oracle\TRD\sapbackup
    BR0416I 1 file found to restore, size 0.000 MB
    BR0421I Restore device type: util_file

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.35
    BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
    c
    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.37
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.37
    BR0229I Calling backup utility with function 'restore'...
    BR0278I Command output of 'backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkyqtz.lst -t file -p d:\param.txt':
    Setting the Number of streams desired=<1> for 1 File restore.

    -------------------------- Output of restore -------------------------

    BI_BACKUP=<PARTIAL>
    BI_CALLER=<BRRESTORE>
    BI_REQUEST=<NEW>


    -------------------------- Parameter Specified -------------------------


    CvInstanceName=<Instance001>
    CvClientName=<sde-sap1>
    numstreams=<1>
    srccrossclient=<sde-sap2>

    srccrossdbname=<CER>

    destdbname=<TRD>



    -------------------------- backint Command Line  -----------backintCmd=[backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkyqtz.lst -t file -p d:\param.txt ]

    CommServeHostName=satishp
    CommClientHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy ClientID=219
    Src Cross Client=<sde-sap2>
    getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossClientID=218
    Galaxy CrossClientInstanceID=559
    Galaxy CrossClientAppType=61
    Galaxy CrossClientAppID=2283
    Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14429 Token=<14429:2:1>
    Success in init with JM
    Cannot obtain the Index MediaAgent from the Archive Manager..
    Attaching CommServer Session
    AfileNumber=19914, AcommCellId=2 AgroupNumber=22 archfilename=D:\oracle\CER\sapbackup\backCER.log copy=35 BID=13310 reqBID=13310 afileFlags=0d

    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.00
    #FILE..... D:\oracle\CER\sapbackup\backCER.log D:\oracle\TRD\sapbackup\backCER.log
    #RESTORED. 1021752_13310
    Successful restore; 1 File(s); total transferred bytes=2912
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.01
    BR0374I 1 of 1 file restored by backup utility
    BR0230I Backup utility called successfully              BR0406I End of file restore: rehkyqtz.rsf 2011-12-14 09.38.01
    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.01
    BR0402I BRRESTORE completed successfully

  10. On the destination client, rename the back<SOURCE_SID>.log to back<DESTINATION_SID>.log file. On the command line, type the following command.

    Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    move back<SOURCE_SID>.log back<DESTINATION_SID>.log

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\arch<SOURCE_SID>.log==D:\oracle\<DESTINATION_SID>\saparch

  11. On the destination client, copy the arch<SOURCE_SID>.log log summary file from the source client to the destination client.

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\sapbackup\<brbackup_detail_file>==D:\oracle\<DESTINATION_SID>\sapbackup

  12. On the destination client, copy the detail files from the sapbackup and the saparch source client directory onto the destination client. Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    D:\oracle\TRD\saparch>move arch<SOURCE_SID>.log arch<DESTINATION_SID>.log

    You can use the BRRESTORE command instead of manually copying the file. On the destination client command line, type the following.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\<brarchive_detail_file>==D:\oracle\<DESTINATION_SID>\saparch

  13. Identify the corresponding detail file in $SAPDATA_HOME/sapbackup directory  or  $SAPDATA_HOME/sapbackup DIR from the source client and then restore it.

    You can use the BRRESTORE command. On the destination client command line, type the following.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\<brarchive_detail_file>==D:\oracle\<DESTINATION_SID>\saparch

  14. On the destination client, copy the aff  files from the sapbackup and the saparch source client directory onto the destination client. Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\init<SOURCE_SID>\sapbackup\file_name.aff==D:\oracle\<DESTINATION_SID>\sapbackup

  15. On the destination host restore from offline backup. On the command line, type the following command:

    brrecover -f <DESTINATION_SID> -t reset -c force

  16. On the destination host, recover the BRBACKUP detail file. On the command line, type the following command.

    Substitute the data_detail_file, device_type and SID variables. You must specify the full path for the data_detail_file.

    brrecover -d <device_type> -c force -t dbpit -b <BRBACKUP_detail_file> -f <SID> -seq last

  17.  On the destination host, recover to a log number. On the command line, type the following command.

    Substitute the log_number, parameter_file and SID variables .

    brrecover -f <SID> -n <log_number>

  18. On the destination host, recover the database to the recover time. On the command line, type the following command, substituting the time to recover the database to.

    brrecover -f <SID> -m time <YYYY-MM-DD HH.MM.SS> -c force

Restoring to a Different Windows Drive Configuration Using BRRECOVER

You can use this procedure to restore a backup to a Windows configuration that has different disk layout from the source.

This procedure is supported for the latest backup jobs. You cannot use a point-in-time backup job for this procedure.

This procedure includes an example for a Windows configuration and uses the BRRECOVER command.

Before You Begin

  1. On the source host, locate the detail file name and the summary file name of the data and log backups to be restored.
  2. On the destination host, create an instance for the database that you want to restore. For more information, see Creating an Instance.
  3. On the destination host, verify the $sapdata_home directory structure exists. Create the directory structure if it does not exist.
  4. Copy, or restore the init<SID>.ora and init<SID>.sap files from the host to the destination.
  5. On the destination host, edit the $ORACLE_HOME/dbs/init<SID>.utl file.

    Substitute the CvInstanceName, srcCrossHost and srccrossdbname parameters

    For information on the supported parameters, see Supported SAP for Oracle Util File Parameters.

    numstreams
    number_streams
    CvInstanceName
    Instance001
    CvHostName
    srcCrossHost
    host_name
    srccrossdbname
    source_database_name
    destdbname
    destination_database_name

Procedure

  1. Manually copy the init<SOURCE_SID>.sap file from the source host to the destination host, substituting the <SOURCE_SID> variable.

    You can use the BRRESTORE command instead of manually copying the file. On the destination host command line, type the following.

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\init<SOURCE_SID>.sap==D:\oracle\product\10.2.0\db_1\database

    BRRESTORE Sample Output

    backintCmd=[backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkylvd.lst -t file -p d:\param.txt ]

    CommServeHostName=satishp
    CommHostHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy HostID=219
    Src Cross Host=<sde-sap2>
    getInstanceId for InstanceName=[CER] host=[sde-sap1.prodcert.loc] hostId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossHostID=218
    Galaxy CrossHostInstanceID=559
    Galaxy CrossHostAppType=61
    Galaxy CrossHostAppID=2283
    Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14424 Token=<14424:2:1>
    Success in init with JM
    Cannot obtain the Index MediaAgent from the Archive Manager..
    Attaching CommServer Session
    AfileNumber=19929, AcommCellId=2 AgroupNumber=23 archfilename=D:\oracle\product\10.2.0\db_1\database\initCER.sap copy=36 BID=13310 reqBID=13310 afileFlags=4d

    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    #FILE..... D:\oracle\product\10.2.0\db_1\database\initCER.sap D:\oracle\product\10.2.0\db_1\database\initCER.sap
    #RESTORED. 1021752_13310
    Successful restore; 1 File(s); total transferred bytes=12616
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    BR0374I 1 of 1 file restored by backup utility
    BR0230I Backup utility called successfully

    BR0406I End of file restore: rehkylvd.rsf 2011-12-14 08.42.27
    BR0280I BRRESTORE time stamp: 2011-12-14 08.42.27
    BR0402I BRRESTORE completed successfully

  2. On the destination host, rename the file init<SOURCE_SID>.sap to init<DESTINATION_SID>.sap. On the destination host command line, type the following, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    move init<SOURCE_SID>.sap init<DESTINATION_SID>.sap

  3. On the destination host, edit the init<SID>.sap file and change the <SOURCE_SID> parameter to the <DESTINATION_SID>.

    Source Host Example

    backup_root_dir = D:\oracle\<SOURCE_SID>\sapbackup
    stage_root_dir = D:\oracle\<SOURCE_SID>\sapbackup
    compress_cmd = "D:\usr\sap\<SOURCE_SID>\sys\exe\run\mkszip -c $ > $"
    uncompress_cmd = "D:\usr\sap\<SOURCE_SID>\sys\exe\run\uncompress -c $ > $"
    compress_dir = D:\oracle\<SOURCE_SID>\sapreorg
    archive_copy_dir = D:\oracle\<SOURCE_SID>.\sapbackup
    archive_stage_dir = D:\oracle\<SOURCE_SID>\sapbackup

    Destination Host Example

    backup_root_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    stage_root_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    compress_cmd = "D:\usr\sap\<DESTINATION_SID>\sys\exe\run\mkszip -c $ > $"
    uncompress_cmd = "D:\usr\sap\<DESTINATION_SID>\sys\exe\run\uncompress -c $ > $"
    compress_dir = D:\oracle\<DESTINATION_SID>\sapreorg
    archive_copy_dir = D:\oracle\<DESTINATION_SID>\sapbackup
    archive_stage_dir = D:\oracle\<DESTINATION_SID>\sapbackup

  4. Manually copy the init<SOURCE_SID>.ora file from the source host to the destination host, substituting the <SOURCE_SID> variable.

    You can use the BRRESTORE command instead of manually copying the file. On the destination host command line, type the following, substituting the <SOURCE_SID> variable.

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\init<SOURCE_SID>.ora==D:\oracle\product\10.2.0\db_1\database

  5. On the destination host, rename the init<SOURCE_SID>.ora file to init<DESTINATION_SID>.ora. On the command line, type the following, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    move init<SOURCE_SID>.ora init<DESTINATION_SID>.ora

  6. On the destination host, edit the init<DESTINATION_SID>.ora file and update the following parameters with the new directory structure. Substitute the <SOURCE_SID> and <DESTINATION_SID> variables.

    control_files = (D:\oracle\<SOURCE_SID>\sapdata1\cntrl\ctrl<SOURCE_SID>.ctl,
    D:\oracle\DESTINATION_SID\sapdata2\cntrl\ctrl<SOURCE_SID>.ctl,
    D:\oracle\DESTINATION_SID\saparch\cntrl\ctrl<SOURCE_SID>.ctl)
    background_dump_dest = D:\oracle\<DESTINATION_SID>\saptrace\background
    user_dump_dest = D:\oracle\<DESTINATION_SID>\saptrace\usertrace
    log_archive_dest = D:\oracle\<DESTINATION_SID>\saparch
    db_name = DESTINATION_SID

  7. On the destination host, create an SPFILE from the PFILE. On the command line, type the following:

    D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba
    SQL> startup nomount;
    SQL> create spfile from pfile;

    Full Output

    D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Dec 14 09:21:51 2011
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    Connected to an idle instance.
    SQL> startup nomount;
    ORACLE instance started.
    Total System Global Area 138412032 bytes
    Fixed Size 2063992 bytes
    Variable Size 125829512 bytes
    Database Buffers 8388608 bytes
    Redo Buffers 2129920 bytes
    SQL> create spfile from pfile;
    File created.
    SQL>

  8. On the destination host, restore the <SOURCE_SID>.log file by using the BRRESTORE command. On the command line, type the following command to restore the file, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\SOURCE_SID\sapbackup\back<SOURCE_SID>.log==D:\oracle\<DESTINATION_SID>\sapbackup

    Example BRRESTORE Output

    BR0401I BRRESTORE 7.20 (1)
    BR0405I Start of file restore: rehkyqtz.rsf 2011-12-14 09.37.35
    BR0484I BRRESTORE log file: D:\oracle\TRD\sapbackup\rehkyqtz.rsf

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.35
    BR0407I Restore of database: TRD
    BR0408I BRRESTORE action ID: rehkyqtz
    BR0409I BRRESTORE function ID: rsf
    BR0415I File for restore using backup utility ID \#NULL: D:\oracle\CER\sapbackup\backCER.log=D:\oracle\TRD\sapbackup
    BR0416I 1 file found to restore, size 0.000 MB
    BR0421I Restore device type: util_file

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.35
    BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
    c
    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.37
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...

    BR0280I BRRESTORE time stamp: 2011-12-14 09.37.37
    BR0229I Calling backup utility with function 'restore'...
    BR0278I Command output of 'backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkyqtz.lst -t file -p d:\param.txt':
    Setting the Number of streams desired=<1> for 1 File restore.

    -------------------------- Output of restore -------------------------

    BI_BACKUP=<PARTIAL>
    BI_CALLER=<BRRESTORE>
    BI_REQUEST=<NEW>


    -------------------------- Parameter Specified -------------------------


    CvInstanceName=<Instance001>
    CvHostName=<sde-sap1>
    numstreams=<1>
    srccrosshost=<sde-sap2>

    srccrossdbname=<CER>

    destdbname=<TRD>



    -------------------------- backint Command Line  -----------backintCmd=[backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehkyqtz.lst -t file -p d:\param.txt ]

    CommServeHostName=satishp
    CommHostHostName=sde-sap1.idcprodcert.loc
    Galaxy CommCellID=2
    Galaxy HostID=219
    Src Cross Host=<sde-sap2>
    getInstanceId for InstanceName=[CER] host=[sde-sap1.idcprodcert.loc] hostId=219 AppType=61 Failed
    Instance=[CER] - May not have been configured.
    Galaxy SrcCrossHostID=218
    Galaxy CrossHostInstanceID=559
    Galaxy CrossHostAppType=61
    Galaxy CrossHostAppID=2283
    Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
    Restore has been requested

    SID=[CER] BkpSet=[default] AppType=[61]
    Success in getting Job id=14429 Token=<14429:2:1>
    Success in init with JM
    Cannot obtain the Index MediaAgent from the Archive Manager..
    Attaching CommServer Session
    AfileNumber=19914, AcommCellId=2 AgroupNumber=22 archfilename=D:\oracle\CER\sapbackup\backCER.log copy=35 BID=13310 reqBID=13310 afileFlags=0d

    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.00
    #FILE..... D:\oracle\CER\sapbackup\backCER.log D:\oracle\TRD\sapbackup\backCER.log
    #RESTORED. 1021752_13310
    Successful restore; 1 File(s); total transferred bytes=2912
    Success in sending JMSUCCESS to server
    Success in sending JMSUCCESS to server

    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.01
    BR0374I 1 of 1 file restored by backup utility
    BR0230I Backup utility called successfully              BR0406I End of file restore: rehkyqtz.rsf 2011-12-14 09.38.01
    BR0280I BRRESTORE time stamp: 2011-12-14 09.38.01
    BR0402I BRRESTORE completed successfully

  9. On the destination host, rename the back<SOURCE_SID>.log file to back<DESTINATION_SID>.log. On the command line, type the following command, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    move back<SOURCE_SID>.log back<DESTINATION_SID>.log

    You can use the BRRESTORE command instead of manually copying the file. On the destination host command line, type the following, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\arch<SOURCE_SID>.log==D:\oracle\<DESTINATION_SID>\saparch

  10. On the destination host, copy the arch<SOURCE_SID>.log log summary file from the source host to the destination host.

    You can use the BRRESTORE command instead of manually copying the file. On the destination host command line, type the following, substituting the <SOURCE_SID>, BRBACKUP_detail_file and <DESTINATION_SID> variables.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\sapbackup\<brbackup_detail_file>==D:\oracle\<DESTINATION_SID>\sapbackup

  11. On the destination host, copy the detail files from the sapbackup and the saparch source host directory onto the destination host. On the command line, type thefollowing, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    D:\oracle\TRD\saparch>move arch<SOURCE_SID>.log arch<DESTINATION_SID>.log

    You can use the BRRESTORE command instead of manually copying the file. On the destination host command line, type the following, substituting the <SOURCE_SID>, BRBACKUP_detail_file and <DESTINATION_SID> variables.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\<brarchive_detail_file>==D:\oracle\<DESTINATION_SID>\saparch

  12. Identify the corresponding detail file in $SAPDATA_HOME/sapbackup directory  or the  $SAPDATA_HOME/sapbackup directory from the source host and then restore it.

    You can use the BRRESTORE command. On the destination host command line, type the following, substituting the <SOURCE_SID>, BRBACKUP_detail_file and <DESTINATION_SID> variables.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\<SOURCE_SID>\saparch\<brarchive_detail_file>==D:\oracle\<DESTINATION_SID>\saparch

  13. On the destination host, copy the all of the files from the sapbackup and the saparch source host directory to the destination host. On the command line, type the following, substituting the <SOURCE_SID> and <DESTINATION_SID> variables.

    brrestore -d util_file -b2 \#NULL -m D:\oracle\init<SOURCE_SID>\sapbackup\file_name.aff==D:\oracle\<DESTINATION_SID>\sapbackup

  14. On the destination host perform a restore from the offline backup.

    In the following example, the SAP HOME value is set to “S:\oracle\RST on the source and the sapdata folders span multiple drives that have the same defined SAP HOME hierarchy. The source SID is "RST." The source SAP HOME value is set to "S:\oracle\RST SAPDATA_HOME"

    The destination SID is "JFK". The destination SAP HOME value is set to J:\oracle\data\JFK

    The source drives are:

    S:\oracle\RST\sapdata1
    R:\oracle\RST\sapdata2
    T:\oracle\RST\sapdata3
    U:\oracle\RST\sapdata4
    S:\oracle\RST\sapdata5
    T:\oracle\RST\sapdata6

    The destination drives are:

    J:\oracle\data\JFK\sapdata1
    M:\oracle\data\JFK\sapdata2
    K:\oracle\data\JFK\sapdata3
    L:\oracle\data\JFK\sapdata4
    J:\oracle\data\JFK\sapdata5
    K:\oracle\data\JFK\sapdata6

    On the command line, type the following command.

    brrecover -d util_file -t dbpit -b last -f JFK -seq last -c force -map S:=J:,R:=M:,T:=K:,U:=L:

  15. On the destination host, recover the BRBACKUP detail file. On the command line, type the following command, substituting the device_type, BRBACKUP_detail_file, device_type and SID variables.

    Note: You must specify the full path for the BRBACKUP_detail_file.

    brrecover -d <device_type> -c force -t dbpit -b <BRBACKUP_detail_file> -f <SID> -seq last

  16.  On the destination host, recover to a log number. On the command line, type the following command, substituting the log_number, and SID variables .

    brrecover -f <SID> -n <log_number>

  17. On the destination host, recover the database to the recover time. On the command line, type the following command, substituting the time to recover the database to.

    brrecover -f <SID> -m time <YYYY-MM-DD HH.MM.SS> -c force

Restoring to a Different Windows Drive Configuration Using BRRESTORE

You can use this procedure to restore a backup to a Windows configuration that has different disk layout from the source.

This procedure is supported for the latest backup jobs. You cannot use a point-in-time backup job for this procedure.

This procedure includes an example for a Windows configuration and uses the BRRESTORE command.

Before You Begin

  1. Perform a full backup.

    Set the device type (-d) option to util_file and the type (-t) option to offline.

  2. On the source, use sqlplus to note the parent directory structure. On the sqlplus command line, type the following command:

    SQL> select name from v$datafile;

    Example

    In the following example, K:\ORACLE\PSM is the SAP HOME on the host computer and the sapdata folders are located on multiple drives.

    Each drive has the same defined SAP HOME hierarchy.

    The source SID is PSM and the destination SID is SRM.

    Full Output

    Source Drives

    J:\ORACLE\PSM\SAPDATA1
    K:\ORACLE\PSM\SAPDATA2
    R:\ORACLE\PSM\SAPDATA3
    S:\ORACLE\PSM\SAPDATA4
    T:\ORACLE\PSM\SAPDATA5
    U:\ORACLE\PSM\SAPDATA6

    Destination Drives

    G:\ORACLE\SRM\SAPDATA1
    I:\ORACLE\SRM\SAPDATA2
    J:\ORACLE\SRM\SAPDATA3
    J:\ORACLE\SRM\SAPDATA4
    J:\ORACLE\SRM\SAPDATA5
    J:\ORACLE\SRM\SAPDATA6

  3. On the destination host, edit the $ORACLE_HOME/dbs/init<SID>.utl file.

    For information on the supported parameters, see Supported SAP for Oracle Util File Parameters.

    In the following example, the restore is performed by using copy precedence 2.

    CvClientName
    Client2
    CvInstanceName
    Instance001
    Srccrossclient
    Client1
    srccrossdbname
    PSM
    Cv_restCopyPrec
    2

  4. Create a destination instance in the source CommCell Console.

Procedure

  1. Restore the SAP data summary file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore - d util_file -b2 <backupID> -m <source path/data_summary_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\sapbackup\backPSM.log=H:\oracle\SRM\sapbackup -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl

  2. Rename the <SID>arch on the destination.

    Using the example from the previous step, rename 'PSMarch' to 'SRMarch'.

  3. Restore the SAP data detail file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore -d util_file -b2 <backupID> -m <source path/data_detail_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\saparch\archPSM.log=H:\oracle\SRM\saparch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl

  4. Restore the SAP log summary file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore -d util_file -b2 <backupID> <source path/log_summary_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\saparch\archPSM.log=H:\oracle\SRM\saparch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl

  5. Rename the <SID>arch on the destination.

    Using the example from the previous step, rename 'PSMarch' to 'SRMarch'.

  6. Restore the SAP log detail file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore -d util_file -b2 <backupID> -m <source path/log_detail_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\saparch\aesbiixs.sve=H:\oracle\SRM\saparch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl

  7. Restore all the data detail files from the source host to the corresponding directory on the destination. On the command line, type the following command.

    brrestore -d util_file -b <data_detail_file> -m <source drive 1>=<target drive 1>,<source drive 2>=<target drive 2> -c -u / -r <source_parameter_file>

    Expand All

    Example

    This restores all the data files that are in the J:\ORACLE\PSM\SAPDATA1 to the G:\ORACLE\SRM\SAPDATA1 on the destination machine. You can type this on one line.

    brrestore -d util_file -b besbiili.anf -m
    J:\ORACLE\PSM\SAPDATA1=G:\ORACLE\SRM\SAPDATA1,
    K:\ORACLE\PSM\SAPDATA2=I:\ORACLE\SRM\SAPDATA2,
    R:\ORACLE\PSM\SAPDATA3=J:\ORACLE\SRM\SAPDATA3,
    S:\ORACLE\PSM\SAPDATA4=J:\ORACLE\SRM\SAPDATA4,
    T:\ORACLE\PSM\SAPDATA5=J:\ORACLE\SRM\SAPDATA5,
    U:\ORACLE\PSM\SAPDATA6=J:\ORACLE\SRM\SAPDATA6 -c -u / -r H:\ORACLE\SRM\11203\DATABASE\INITSRM.UTL

  8. Restore all the logs. On the command line, type the following command.

    brrestore -d util_file -a <log_seq_start-log_seq_start>=<target drive 1> -r <source_parameter_file>

    Example

    This restores logs 1-20 to the destination directory.

    brrestore -d util_file -a 1-20==F:\oracle\SRM\oraarch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl

  9. Restore the control file.

    Note: To avoid database inconsistency on the destination machine, restore the control file to one of the mirror locations and copy it from the restore location to rest of the control file locations. You can get the control file mirror locations in the init<SID>.ora file on the destination machine. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files.

    On the command line, type the following command.

    brrestore -d util_file –b2 <backupID> -m <source path/control File>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    This restores logs 1-20 to the destination directory.

    brrestore -d util_file –b2 <backupID> -m K:\oracle\PSM\sapbackup\CNTRLPSM.DBF=H:\oracle\SRM\sapdata1\cntrl -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl

  10. Copy the restored control file to the mirror locations.
  11. On destination machine set the Oracle database state to mount mode so that you can back up the control file to trace:

    SSQL> shut immediate
    SQL> startup mount
    SQL> alter database backup controlfile to trace as '<control_file_location>’;

  12. Edit the SQL trace file and replace the source paths with the destination file path and mirror locations. As this is a redirected restore to different host, you must reset the logs.
  13. Rename the restored control files to create the control files on the destination host. Create a new control file on the destination by using the edited SQL trace file.
  14. Run sqlplus recovery by using the backup control file.

Restoring When Data Directory Does Not Exist on the Target

You must create the target directories on the destination host for a cross-machine restore or disaster recovery, when they do not exist.

You can run the Create_Db_Dir.ps1 or Create_Db_Dir.sh scripts on either a Windows or UNIX configuration to create the directory structure. If you run the script when the directory exists, the directory structure is NOT overwritten.

Note: These scripts do not support table level or duplicate database restores. You can only use the scripts to restore a database to the same Oracle instance name, on the same or a different server.

Further details on SAP on Oracle Disaster Recovery can be found here.

Procedure

Parameters

The following table defines the parameters for both scripts.

If you do not specify the BackupJobID or PointInTime parameters, the current time is used for the Point-in-Time.

Parameter Description
clientName Specifies the name of the client as displayed in the CommCell Browser.
SimpanaInstance The name of the SnapProtect instance.
DatabaseInstanceName The name of the database instance.
BackupJobID The Backup Job ID
PointInTime The Point-in-Time
BackupSetName For DB2 only. The name of the backup set.

UNIX

Synopsis

Create_Db_Dir.sh -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

  1. You must be a database instance user in the UNIX group of SnapProtect to run this utility.
  2. Log on to the CommServe computer.
  3. Go to the SnapProtect/Base directory to locate the Create_Db_Dir.sh utility.
  4. On the command line, type the following command.

    Create_Db_Dir.sh -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

Windows

Synopsis

Create_Db_Dir.ps1 -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

  1. On the Windows client computer command line, type the following command.

    qlogin -cs <commserve_name> -u <commcell_user_name> -p <commcell_login_password>

  2. Run the Windows PowerShell  from the DB2 command prompt window.
  3. Enable PowerShell script execution on the system:

    Set-ExecutionPolicy Unrestricted

  4. In the SnapProtect_path\Base directory, at the PowerShell prompt, type the following command.
  5. Create_Db_Dir.ps1 -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

  6. At the PowerShell prompt, disable the PowerShell script execution on the system:

    powershell Set-ExecutionPolicy Restricted

What To Do Next

  • Copy the init file from the source to the restore host.