Register Login

Restore Procedure for online backup

Updated May 18, 2018

Hello SAP Gurus,

Our BI Development system got crashed and hence we need to restore the SAP on the same machine, we have only the online backup.

Can any advice on the restore & recovery methods with the online backup.

Kindly provide Restore Steps.


Comments

  • 02 Mar 2010 7:01 am Guest Helpful Answer

    1.DB shutdown target database must be shut down

    2.Create the link /oracle/Qxx --> /oracle/Txx Target cd /oracle; ln -s /oracle/Txx Qxx

    3.Create initQxx.ora on target system Target in /oracle/Txx//dbs copy initTxx.ora to initQxx.ora; change the content of initQxx.ora from to

    4.Clean up the directories: saparch, sapbackup, saptrace/background, saptrace/usertrace, sapcheck Target "First save the content of these directories with the save command:

    e.g: cd /oracle//saparch: save -s nwn02 -c -s -b pool_name *
    Then delete the content of the directories, except alertSID.log, archSID.log (rename them to *.yyyymmdd)
    Rename listener.log to *.yyyymmdd (in /oracle///network/log)"

    5.Copy all needed logs from source system to target system Source+Target copy all logs of the desired Source-backup from /oracle/Qxx/sapbackup/ to /oracle/Txx/sapbackup/: the backup log used for restore .log(.anr or .fnr), backQxx.log: scp @: (You must enter the password)
    copy archQxx.log from the Source system /oracle/Qxx/saparch/ to /oracle/Txx/saparch/
    from the source system copy initQxx.sap.rmn and initQxx.sap.rmn.scd to /oracle/Txx//dbs -> change parameter rman_channels to 8 and rman_maxopenfiles to 16

    6.Delete sapdataxx directories content Target delete the whole content of the sapdatas on the target system EXCEPT "lost+found" and "cntrl"

    7.Rename control files Target Rename all control files from the target system cntrlTxx.dbf to cntrlTxx.dbf.ddmmyy

    8.Dispatch the controlfiles (for DB restore) Source+Target On the target system: dispatch the controlfiles of the desired Backup how it's described in the initQxx.ora: copy the control file from the directory of the backup used for restore (/oracle//sapbackup/bd…../ cntrlQxx.bdf) on the target system in the locations specified in initQxx.ora.

    9.Change the environment variable.Target change the Env.-variable ORACLE_SID to Qxx: setenv ORACLE_SID Qxx or export ORACLE_SID=Qxx

    10.Mount Qxx database on target host. Target On the target host: SQL> startup mount; (mount the DB on the target host)

    11.Restore DB Target brrestore –u / -p initQxx.sap.rmn –m all/full –b .log(.anr or .fnr)

    12.Stop DB Target SQL> shutdown immediate;

    13.Rename control files Target on the target system rename the control files cntrlQxx.dbf from the 3 locations described in initQxx.ora

    14.Dispatch the controlfiles (for offline redologs restore) Target from the source system copy the control file from one of the locations specified in initQxx.ora to the target system in the locations specified in initQxx.ora.

    15.Mount Qxx database on target host Target On the target host: SQL> startup mount;

    16.Restore needed offline redo logs for recovery Target "On the target host: restore the needed archived logs: brrestore –u / -p init.sap.rmn –a n1-n2 - where: n1 = the archived log from the beginning of the backup n2 = the last archived log needed for recovery"

    17.Recover database Target SQL> recover database until time 'YYYY-MM-DD:HH:MM:SS' using backup controlfile; -> The recovery is finished when you will see the message: Media recovery completed.

    18.Backup control file to trace Target sqlplus -> alter database backup controlfile to trace;

    19.Shut down DB Target sqlplus -> shutdown immediate;

    20.Create the script for control file recreation Target cp /oracle/Txx/saptrace/usertrace/Qxx_ora_.trc ORACLE_HOME; mv Qxx_ora_.trc newTxx.sqlvi ORACLE_HOMEewTxx.sql: delete the whole content above "startup nomount" + delete the whole content under the first " CHARACTER SET US7ASCII and ";" + replace source-SID with target-SID (:1,$s/Qxx/Txx/g)+ replace in the second line REUSE with SET + also change in the second line NORESETLOGS with RESETLOGS

    21.Rename control files Target on the target system rename the control files cntrlQxx.dbf from the locations initQxx.ora

    22.Run the script Target exit; su - oratxx (ORACLE_SID must be Txx); SQL> @newTxx>.sql

    23.Open DB + Resetlogs Target sqlplus -> alter database open RESETLOGS;

    24.Shutdown + Startup Target "SQL> shutdown immediate;
    SQL> startup;"

    25.Delete old Offline Redo-logs Target delete old Offline Redo-logs on the target system which were transfered from the sourcesystem to the targetsystem

    26.Create tempfiles Source+Target "Check if tempfiles are used on the source system:
    SQL>select name from V$TEMPFILE;

    If rows are returned then the tempfiles must be created on the target system as on the source system.

    Check if there are tempfiles in PSAPTEMP tablespace on the target system. If no rows are returned then the tempfiles must be created.
    The sql commands for creation of the tempfiles can be found on the source system in: /oracle//sapbackup/bd…../bd…..trc
    (in the directory of the backup used for restore)
    e.g.: sql> ALTER TABLESPACE PSAPTEMP ADD TEMPFILE '/oracle/SID/sapdata1/temp_1/temp.data1'SIZE 2000M REUSE AUTOEXTEND ON NEXT 20971520 MAXSIZE 10000M;
    "

    Post steps:

    1. Rename the globale DB-name Target sqlplus> alter database rename global_name to ;

    2. Adapt OPS$-users Target OPS$TxxADM, OPS$ORATxx must be created and granted CONNECT, RESOURCE and SAPDBA roles.

    3. Execute sapdba_role.sql Target "Go to the directory where sapdba_role.sql is located: /sapmnt/SID/exe
    sqlplus /nolog @sapdba_role R3

    General:

    sqlplus /nolog @sapdba_role : for owner SAPR3: R3, SAP: , SAPDB: DB"

    4. Remove the link /oracle/Qxx Target "cd /oracle rm Qxx"

    5. Start backup and brarchive Target Start backup and brarchive on Txx system 1.DB shutdown target database must be shut down


×