SlideShare a Scribd company logo
Type     Handbook Document
Area     SAP Basis
Topic    Homogeneous System Copy using Online/Offline Database Backup
Author   Huseyin Bilgen




                  System Copy Guides


                             Volume 1

  Homogeneous System Copy using Online/Offline
              Database Backup




                                    By

                         basisconsultant.com



                           All Rights Reserved.
                           Copyright    2001-2003.basisconsultant.com   Page 1 of 9
Type           Handbook Document
 Area           SAP Basis
 Topic          Homogeneous System Copy using Online/Offline Database Backup
 Author         Huseyin Bilgen

Reasons for Copying a SAP System
SAP recommends that you make a system copy in order to build a test, demo, training or standby
system (Oracle and Informix: standby systems cannot be created with a system copy). You should
perform upgrades in a test system first. This way you can identify customer pecific problems which
might result from modifications. Thus, we can sort the general needs for a system copy as follow:

    To create a new training system for end-user or project team education
    To create a DEMO system
    To create a Test system for upgrade or other purposes.
    To recover a system on another machine with the same platform after a crash.
    To copy large clients. If a client very large to export/import, it is better to do a system copy rather
    than client transport.

If a system copy takes place between systems with same platform ( operating system and database
system ) , we call this HOMOGENEOUS SYSTEM COPY.

If The system copy takes place between systems with different platforms ( at least one of the
component must be different, OS or RDBMS ), we call this HETEROGENEOUS SYSTEM COPY.

There 3 ways of a Homogeneous System Copy in R/3 Systems.

    1. Homogeneous System Copy using Online / Offline Database Backup.
    2. Homogeneous System Copy using R3LOAD Procedure.
    3. Homogeneous System Copy using R3COPY Procedure.

This guide is prepared for a Homogeneous System Copy using Online/Offline Database Backup.

The procedure described tested on AIX 4.3.3/Oracle 8.1.7, AIX 5.1/Oracle 8.1.7, AIX 5.1/Oracle 9.2.0
and Win2K/Oracle 8.1.7 platforms.

The command reference given in this guide is taken from a homogeneous system copy done on AIX
4.3.3/Oracle 8.1.7 platform. Differences of other platforms such as Windows will be shown in the same
sections.

Homogeneous System Copy using Online/Offline Database
Backup
This guide is prepared for a Homogeneous System Copy using Online/Offline Database Backup.
Steps for a Homogeneous system copy are briefly as below:

    Preparations on Target System.
    Restore Online/Offline Backup of Source System onto Target System.
    Create CONTROLFILE creation script on Source System.
    Modification of CONTROLFILE script and creation of CONTROLFILEs of Target System.
    Recovery of Oracle Database on Target System.
    Completion of System Copy

Prerequisites
Following conditions must be provided to copy a system:

    Both Source and Target Systems must have Same Operating System and Database System. Also
    Patch levels must be same.
    You have sufficient free space for sapdata directories on target system.
    For Windows systems, you have to create all drives where datafiles resides on source system.
    Use most current database backup in order to shorten database creation time.


                                          All Rights Reserved.
                                          Copyright    2001-2003.basisconsultant.com            Page 2 of 9
Type          Handbook Document
 Area          SAP Basis
 Topic         Homogeneous System Copy using Online/Offline Database Backup
 Author        Huseyin Bilgen

Procedure
1. Data and Log directories on target system must be cleaned before restoring source database.
   Here below are the commands to clean directories. Before this, you have to stop all SAP and
   Oracle processes.

    # su - <targetsid>adm
    # stopsap all
    # exit
    # su – ora<targetsid>
    # lsnrctl stop
    # exit
    # cd /oracle/<SID>/
    # rm –rf sapdata?/*
    # rm –rf origlog?/*
    # rm –rf mirrlog?
    # rm –rf sapreorg/*
    # rm –rf saparch/*
    # rm –rf saptrace/usertrace/*
    # rm –rf saptrace/background/*
    # rm –rf sapbackup/*
    # rm –rf sapcheck/*

    On Windows systems, SAP and Oracle services can be stopped via the following commandline
    program after logging as <sid>adm:

        ntscmgr stop SAP<SID>_<SYSNO>
        ntscmgr stop SAPOSCOL
        ntscmgr stop OracleService<SID>

2. You have to resize the following file systems before restore process. Take into account sizes of
   source system.

    /oracle/<SID>/sapdata1
    /oracle/<SID>/sapdata2
    /oracle/<SID>/sapdata3
    /oracle/<SID>/sapdata4
    /oracle/<SID>/sapdata5
    /oracle/<SID>/sapdata6
    /oracle/<SID>/saparch

3. After cleaning necessary file systems/directories, you have to restore most current database
   backup to target system. For this, find the detail backup log (e.g. bdkxxsrh.anf) for that backup on
   source system. You can determine this from back<SID>.log summary backup log file or using
   DB12.




                                        All Rights Reserved.
                                        Copyright    2001-2003.basisconsultant.com          Page 3 of 9
Type           Handbook Document
Area           SAP Basis
Topic          Homogeneous System Copy using Online/Offline Database Backup
Author         Huseyin Bilgen

                                        DB12 - Backup Logs




                                             back<SID>.log File

  Copy this detailed backup log file into /oracle/<TSID>/sapbackup directory on target system. Use
  BRRESTORE command below to restore the source database on target system. You can also
  restore datafiles and online redolog files (if you are using offline backup) using backup tools such
  as BACKFM tool of IBM TSM.

   On Windows systems, while restoring source database on target system, you have to keep
   same mount points for Oracle Data Directories.
   For example if all of your source data directories resides on "d:>" disk
   (d:oracle<SSID>sapdatax), then you have to create data dirs. at target system on "d:>" disk.
   After restore process, you can change the directories. For example you can distribute sapdatax
   directories on many disks. This will be mentioned in CONTROLFILE creation step later.

  3.a. Mount the necessary backup volume on target system.

  3.b. Use the following command to begin restore:

         # su - ora<tsid>
         # cd sapbackup
         # brrestore -m full -b <det_log_file> -c        (det_log_file= for example bdkxxsrh.anf)

         At the first step of restore, system will recognize that the Oracle SID is different on target
         machine (where the restore command executed) and in backup. Also, Oracle_Home
         parameters in backup and in current system will be different and recognized by brrestore. But
         the restore command will restore the datafiles to match current systems file system. Here is a
         sample log of a restore.




                                        All Rights Reserved.
                                        Copyright    2001-2003.basisconsultant.com          Page 4 of 9
Type          Handbook Document
 Area          SAP Basis
 Topic         Homogeneous System Copy using Online/Offline Database Backup
 Author        Huseyin Bilgen




        All the datafiles and online redolog files (only for Offline DB Backup) must be successfully
        restored.

        At this step, there are 3 probability that must be take into account for the following steps.

        You are using an online database backup of source system to create target system.
        You have to find and put all archive files created during online backup into target systems
        archive directory to be able to recover database. You can also apply all the archives created
        from the online backup start time to latest available.
        You are using an offline database backup of source system which is running in
        ARCHIVELOG mode to create target system.
        You may find the archive files created after offline backup on source system to make database
        current on target system via applying during recovery.
        You are using an offline database backup of source system which is running in
        NOARCHIVELOG mode to create target system.
        You don't have any archive files created on source system so you don't need anything.

        Those differences will be detailed in recovery step.

4. After restoring datafiles and redolog files, a scripts must be prepared on source system to create
   CONTROLFILE of target system. For this you have 2 option.

    4.a. You can use R3COPY program which is under "/kernel/UNIX/COMMON" directory of Kernel
         CD. This program can be used only on UNIX systems. For Windows systems, "4.b" option
         must be used.
         Run this program by ora<sid> user on source system. After some confirmations, execute
         step "(a) Source system: Generating the script CONTROL.SQL".
         This will create a script named CONTROL.SQL under /oracle/<SSID>/sapreorg directory.
         Copy this script into target system (any directory). This file is ready for execution and doesn't
         require any modification.

    4.b. SVRMGRL or SQLPLUS can create a scrpit to create controlfile using current
         CONTROLFILE content. Login to source system as ora<sid> user and execute the following
         SVRMGRL/SQLPLUS commands. To be able to execute following commands, database
         must be at least in MOUNT mode..


                                          All Rights Reserved.
                                          Copyright    2001-2003.basisconsultant.com            Page 5 of 9
Type           Handbook Document
Area           SAP Basis
Topic          Homogeneous System Copy using Online/Offline Database Backup
Author         Huseyin Bilgen


      # svrmgrl
      SVRMGR> connect internal
      SVRMGR> alter database backup controlfile to trace;
      SVRMGR> exit

      As a result of this command, a trace file (e.g. ora_54764_hvd.trc ) will be created under
      /oracle/<SSID>/saptace/usertrace directory. File can be determined by sorting according to
      modification/creation dates (UNIX: # ls –ltr). Most current file must be cheched.

      You have to edit this file to be able to use for CONTROLFILE creation on target system.

           Rename file name as CONTROL.SQL
           Open file to edit using VI (UNIX) or NOTEPAD (WIN).
           Remove all lines before "STARTUP MOUNT" line. Delete all commented "#" lines. Also
           remove all lines after CHARACTER SET WE8DEC;" line.
           Change all Source SID's to Target SID via following commands.

           UNIX (VI): :%s/<SSID>/<TSID>/g
           WIN (NOTEPAD): CTRL+H

           Change the line

           CREATE CONTROLFILE REUSE DATABASE ‘SSID’ NORESETLOGS ARCHIVELOG;

           as follow

           CREATE CONTROLFILE REUSE SET DATABASE ‘TSID’ RESETLOGS ARCHIVELOG;

           If you want to change datafile or redolog file destinations, first move the files on target
           destination at OS level, then edit CONTROL.SQL file for new destinations.

    If structural changes made in database on source system just after the backup restored on
    target machine, differences will exists between datafiles in sapdata directories and datafiles
    referenced in CONTROL.SQL file. Because CONTROL.SQL file is created for the current
    status of source system, but later added files doen't exists in backup so in target system. To
    overcome this problem, just delete the datafiles from CONTROL.SQL file.

    If you don't know which files are created after the backup, let the problems arise during
    CONTROLFILE creation command, and delete the files mentioned as error from
    CONTROL.SQL and re-run creation command.

    After deletion and successful creation of CONTROLFILE's on target system, you have to take
    into account the following subjects:

         If you are not going to recover database to the most current status using archive files, then
         there is no problem.
         But if you are planning to recover database to the most current status using archive files,
         then deleted datafiles will be problem later while application of archive files. At this
         moment, we offer you to keep datafile names you deleted during CONTROLFILE creation
         and add those datafiles with the same sizes on source system after CONTROLFILE
         creation.

5. After CONTROL.SQL script preparation, following commands must be run to create
   CONTROLFILE of target system:

   # su – ora<targetsid>

                                        All Rights Reserved.
                                        Copyright    2001-2003.basisconsultant.com           Page 6 of 9
Type           Handbook Document
 Area           SAP Basis
 Topic          Homogeneous System Copy using Online/Offline Database Backup
 Author         Huseyin Bilgen

   # svrmgrl
   SVRMGR> connect internal
   SVRMGR> @/<path_to_file>/control.sql

   You have to guarantee the successful completion of this command as follow:

   SVRMGR> @control.sql
   Statement processed.
   SVRMGR>

6. Database will be in inconsistent status after creation of CONTROLFILE. This can be viewed by
   trying to open the database.

   SVRMGR> alter database open;
   alter database open
   *
   ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
   SVRMGR> alter database open resetlogs;
   alter database open resetlogs
   *
   ORA-01195: online backup of file 1 needs more recovery to be consistent
   ORA-01110: data file 1: '/oracle/<hedefSID>/sapdata1/system_1/system.data1'

   At this step, a recovery must be made in order to be able to use the database.

7. 3 type of recovery can be made, according to your status mentioned at the end of STEP-3. all the
   recovery types must be used by "USING BACKUP CONTROLFILE" as CONTROLFILE is created
   manually.

   7.a. If your source system is runnig in NOARCHIVELOG mode, then you have to use the
        following command to recover database.

          SVRMGR> recover database using backup controlfile until cancel;

   7.b. If you restored an online backup on target system and put all the archive files created since
        online backup start time, use the following commands.

          SVRMGR> recover database using backup controlfile;

          After execution of this command, Oracle will ask for archive files to be consistent. As archive
          files contains only database changes commands, you will use source system archive file on
          new systems database recovery. Copy all archive files created since online backup on source
          system to archive directory of target system. Archive file names are different from asked
          during recovery session. You can change archive file names for target system via the
          following script.

          cd /oracle/<TSID>/saparch
          for i in `ls|grep <SSID>`;
          do
                file_name=`echo $i |cut -dD -f2`;
                mv $i <TSID>${file_name};
          done

          Alternatively you can enter file names manually as required by recovery session as follow:

          SVRMGR> recover database using backup controlfile;
          ORA-00279: change 44138924 generated at 03/26/2003 00:00:24 needed for thread 1
          ORA-00289: suggestion : /oracle/HVS/saparch/HVSarch1_22746.dbf

                                          All Rights Reserved.
                                          Copyright    2001-2003.basisconsultant.com          Page 7 of 9
Type           Handbook Document
 Area           SAP Basis
 Topic          Homogeneous System Copy using Online/Offline Database Backup
 Author         Huseyin Bilgen

          ORA-00280: change 44138924 for thread 1 is in sequence #22746
          Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
          /oracle/HVS/saparch/HVDarch1_22746.dbf
          Log applied.

          After application of all necessary archives (at least all the archives created during online
          backup must be applied. Archives from this point can be applied to make database current),
          next request for archive is cancelled via CANCEL command.

       ORA-00279: change 44164157 generated at 03/26/2003 01:58:29 needed for thread 1
       ORA-00289: suggestion : /oracle/HVS/saparch/HVSarch1_22754.dbf
       ORA-00280: change 44164157 for thread 1 is in sequence #22754
       Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
       CANCEL
       Media recovery cancelled.
       SVRMGR>

       But recovery session must be started with the following command and cancelled again to ba
       able to start database.

       SVRMGR> recover database using backup controlfile until cancel;
       ORA-00279: change 44164157 generated at 03/26/2003 01:58:29 needed for thread 1
       ORA-00289: suggestion : /oracle/HVS/saparch/HVSarch1_22754.dbf
       ORA-00280: change 44164157 for thread 1 is in sequence #22754
       Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
       CANCEL
       Media recovery cancelled.
       SVRMGR>

       Otherwise following error will arise during database opening.

       SVRMGR> alter database open resetlogs;
       alter database open resetlogs
       *
       ORA-01113: file 1 needs media recovery
       ORA-01110: data file 1: '/oracle/HVS/sapdata1/system_1/system.data1'

       To open database, use the following command:

       SVRMGR> alter database open resetlogs;
       Statement processed.
       SVRMGR>

   7.c. If you restored an offline backup on target system, you can recover database to the time of
        backup completed or you can recover database to the most current status using archive files.
        The archive application and statup of database is same as an online backed up database
        copy in "7.b".

8. after opening database, LISTENER process must be started.

   # su – ora<targetsid>
   # lsnrctl start

   On Windows systems, Oracle Listener is started as below:

       ntscmgr start OracleOraHome817TNSListener

9. To open SAP system, use the following commands.

                                         All Rights Reserved.
                                         Copyright    2001-2003.basisconsultant.com        Page 8 of 9
Type          Handbook Document
 Area          SAP Basis
 Topic         Homogeneous System Copy using Online/Offline Database Backup
 Author        Huseyin Bilgen


   # su - <targetsid>adm
   # startsap

   On Windows systems, Oracle Listener is started as below:

       ntscmgr start SAP<SID>_<SYSNO>
       ntscmgr start SAPOSCOL
       ntscmgr start OracleService<SID>
       startsap name=<TSID> nr=<SYSNO> SAPDIAHOST=<target systems hostname>

10. As your Hardware Key is not changed, you don't have to get additional License Key from
    SAPNET. You can use previous systems (on target system, if SID is not changed) License in new
    system created on target system.

11. Logon to the SAP R/3 System and goto TCODE SE06. Select "Database Copy or Migration" and
    execute "Post Installation Processing".




                                                 SE06

   Change all of the Source System Objects to Target System Objects as asked.

12. Delete old TMS configuration and make new configuration for TMS via STMS TCODE.

13. After all of above steps, you have completed a System Copy using Online/Offline Database
    Backup.




                                       All Rights Reserved.
                                       Copyright    2001-2003.basisconsultant.com        Page 9 of 9

More Related Content

What's hot

Oracle RAC - Standard Edition, Enterprise Edition &amp; One Node
Oracle RAC - Standard Edition, Enterprise Edition &amp; One NodeOracle RAC - Standard Edition, Enterprise Edition &amp; One Node
Oracle RAC - Standard Edition, Enterprise Edition &amp; One Node
Leighton Nelson
 
Sap basis made easy
Sap basis made easySap basis made easy
Sap basis made easy
Durga Balaji M
 
SAP Migration Overview
SAP Migration OverviewSAP Migration Overview
SAP Migration Overview
Sitaram Kotnis
 
SAP R 3 , E C C & SAP S 4 HANA
SAP R 3 , E C C &  SAP S 4 HANASAP R 3 , E C C &  SAP S 4 HANA
SAP R 3 , E C C & SAP S 4 HANA
Madhav Wagle
 
Exclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.infoExclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.info
sapdocs. info
 
Sap basis-notes-keylabs-training
Sap basis-notes-keylabs-trainingSap basis-notes-keylabs-training
Sap basis-notes-keylabs-training
nanda nanda
 
Sap system-measurement-guide
Sap system-measurement-guideSap system-measurement-guide
Sap system-measurement-guide
otchmarz
 
SAP workflow events
SAP workflow eventsSAP workflow events
SAP workflow events
Norikkon, LLC.
 
Wily introscope 7.1 installation guide
Wily introscope 7.1   installation guideWily introscope 7.1   installation guide
Wily introscope 7.1 installation guide
Imam Nurhadi
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730
K Hari Shankar
 
Fi ap- payment release-1
Fi ap- payment release-1Fi ap- payment release-1
Fi ap- payment release-1
Umashankar Babu
 
What's new on SAP HANA Smart Data Access
What's new on SAP HANA Smart Data AccessWhat's new on SAP HANA Smart Data Access
What's new on SAP HANA Smart Data Access
SAP Technology
 
BW Adjusting settings and monitoring data loads
BW Adjusting settings and monitoring data loadsBW Adjusting settings and monitoring data loads
BW Adjusting settings and monitoring data loads
Luc Vanrobays
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
scribid.download
 
Sap basis-training-material
Sap basis-training-materialSap basis-training-material
Sap basis-training-material
Raj p
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
Kranthi Kumar
 
Sap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptxSap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptx
sweta prakash sahoo
 
Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020
Sandesh Rao
 
SAP Basis Training Material | www.sapdocs.info
SAP Basis Training Material | www.sapdocs.infoSAP Basis Training Material | www.sapdocs.info
SAP Basis Training Material | www.sapdocs.info
sapdocs. info
 
Sap solution manager
Sap solution managerSap solution manager
Sap solution manager
Bala Venkata Raju P
 

What's hot (20)

Oracle RAC - Standard Edition, Enterprise Edition &amp; One Node
Oracle RAC - Standard Edition, Enterprise Edition &amp; One NodeOracle RAC - Standard Edition, Enterprise Edition &amp; One Node
Oracle RAC - Standard Edition, Enterprise Edition &amp; One Node
 
Sap basis made easy
Sap basis made easySap basis made easy
Sap basis made easy
 
SAP Migration Overview
SAP Migration OverviewSAP Migration Overview
SAP Migration Overview
 
SAP R 3 , E C C & SAP S 4 HANA
SAP R 3 , E C C &  SAP S 4 HANASAP R 3 , E C C &  SAP S 4 HANA
SAP R 3 , E C C & SAP S 4 HANA
 
Exclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.infoExclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.info
 
Sap basis-notes-keylabs-training
Sap basis-notes-keylabs-trainingSap basis-notes-keylabs-training
Sap basis-notes-keylabs-training
 
Sap system-measurement-guide
Sap system-measurement-guideSap system-measurement-guide
Sap system-measurement-guide
 
SAP workflow events
SAP workflow eventsSAP workflow events
SAP workflow events
 
Wily introscope 7.1 installation guide
Wily introscope 7.1   installation guideWily introscope 7.1   installation guide
Wily introscope 7.1 installation guide
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730
 
Fi ap- payment release-1
Fi ap- payment release-1Fi ap- payment release-1
Fi ap- payment release-1
 
What's new on SAP HANA Smart Data Access
What's new on SAP HANA Smart Data AccessWhat's new on SAP HANA Smart Data Access
What's new on SAP HANA Smart Data Access
 
BW Adjusting settings and monitoring data loads
BW Adjusting settings and monitoring data loadsBW Adjusting settings and monitoring data loads
BW Adjusting settings and monitoring data loads
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
Sap basis-training-material
Sap basis-training-materialSap basis-training-material
Sap basis-training-material
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
Sap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptxSap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptx
 
Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020
 
SAP Basis Training Material | www.sapdocs.info
SAP Basis Training Material | www.sapdocs.infoSAP Basis Training Material | www.sapdocs.info
SAP Basis Training Material | www.sapdocs.info
 
Sap solution manager
Sap solution managerSap solution manager
Sap solution manager
 

Viewers also liked

Sap hana installation_guide_en
Sap hana installation_guide_enSap hana installation_guide_en
Sap hana installation_guide_en
Graciete Martins
 
Sap SD configuration-guide
Sap SD configuration-guideSap SD configuration-guide
Sap SD configuration-guide
techgurusuresh
 
SAP SD Interview Questions with Explanation
SAP SD Interview Questions with Explanation SAP SD Interview Questions with Explanation
SAP SD Interview Questions with Explanation
Nbhati123
 
Sap configuration-guide
Sap configuration-guideSap configuration-guide
Sap configuration-guide
Govind Vikram Aggarwal
 
SAP SD Study material
SAP SD Study material SAP SD Study material
SAP SD Study material
Harsha Halyal
 
SAP MM Configuration Step by Step guide by Tata Mcgraw hill
SAP MM Configuration Step by Step guide by Tata Mcgraw hillSAP MM Configuration Step by Step guide by Tata Mcgraw hill
SAP MM Configuration Step by Step guide by Tata Mcgraw hill
Venet Dheer
 
SAP Migrations made easy
SAP Migrations made easySAP Migrations made easy
SAP Migrations made easy
Dirk Oppenkowski
 
SAP MM Configuration - Real Project Documentation
SAP MM Configuration - Real Project DocumentationSAP MM Configuration - Real Project Documentation
SAP MM Configuration - Real Project Documentation
sapdocs. info
 
Sap MM-configuration-step-by-step-guide
Sap MM-configuration-step-by-step-guideSap MM-configuration-step-by-step-guide
Sap MM-configuration-step-by-step-guide
Venet Dheer
 

Viewers also liked (9)

Sap hana installation_guide_en
Sap hana installation_guide_enSap hana installation_guide_en
Sap hana installation_guide_en
 
Sap SD configuration-guide
Sap SD configuration-guideSap SD configuration-guide
Sap SD configuration-guide
 
SAP SD Interview Questions with Explanation
SAP SD Interview Questions with Explanation SAP SD Interview Questions with Explanation
SAP SD Interview Questions with Explanation
 
Sap configuration-guide
Sap configuration-guideSap configuration-guide
Sap configuration-guide
 
SAP SD Study material
SAP SD Study material SAP SD Study material
SAP SD Study material
 
SAP MM Configuration Step by Step guide by Tata Mcgraw hill
SAP MM Configuration Step by Step guide by Tata Mcgraw hillSAP MM Configuration Step by Step guide by Tata Mcgraw hill
SAP MM Configuration Step by Step guide by Tata Mcgraw hill
 
SAP Migrations made easy
SAP Migrations made easySAP Migrations made easy
SAP Migrations made easy
 
SAP MM Configuration - Real Project Documentation
SAP MM Configuration - Real Project DocumentationSAP MM Configuration - Real Project Documentation
SAP MM Configuration - Real Project Documentation
 
Sap MM-configuration-step-by-step-guide
Sap MM-configuration-step-by-step-guideSap MM-configuration-step-by-step-guide
Sap MM-configuration-step-by-step-guide
 

Similar to 17398351 sap-system-copy-homcopyv1

Guide tohelpyouunderstandvariousmethodsofsystemcopy
Guide tohelpyouunderstandvariousmethodsofsystemcopyGuide tohelpyouunderstandvariousmethodsofsystemcopy
Guide tohelpyouunderstandvariousmethodsofsystemcopy
umang1982
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
Handy_Backup
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
asifmalik110
 
6048618 cloning-procedure-of-r12-single-tier
6048618 cloning-procedure-of-r12-single-tier6048618 cloning-procedure-of-r12-single-tier
6048618 cloning-procedure-of-r12-single-tier
balaji29
 
Oracle database 12c client quick installation guide 8
Oracle database 12c client quick installation guide 8Oracle database 12c client quick installation guide 8
Oracle database 12c client quick installation guide 8
bupbechanhgmail
 
Oracle database 12c client quick installation guide 7
Oracle database 12c client quick installation guide 7Oracle database 12c client quick installation guide 7
Oracle database 12c client quick installation guide 7
bupbechanhgmail
 
Deployment with ExpressionEngine
Deployment with ExpressionEngineDeployment with ExpressionEngine
Deployment with ExpressionEngine
Green Egg Media
 
Percona xtrabackup - MySQL Meetup @ Mumbai
Percona xtrabackup - MySQL Meetup @ MumbaiPercona xtrabackup - MySQL Meetup @ Mumbai
Percona xtrabackup - MySQL Meetup @ Mumbai
Nilnandan Joshi
 
Collaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mysteryCollaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mystery
Nelson Calero
 
8 i rman_love_it
8 i rman_love_it8 i rman_love_it
8 i rman_love_it
Anil Pandey
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
Vimlendu Kumar
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
maclean liu
 
Oracle ocp backup exam
Oracle ocp backup examOracle ocp backup exam
Oracle ocp backup exam
sriram raj
 
Testing Delphix: easy data virtualization
Testing Delphix: easy data virtualizationTesting Delphix: easy data virtualization
Testing Delphix: easy data virtualization
Franck Pachot
 
Rdbms
Rdbms Rdbms
Oracle OCP Backup Exam
Oracle OCP Backup ExamOracle OCP Backup Exam
Oracle OCP Backup Exam
Inprise Group
 
9i lin relnotes
9i lin relnotes9i lin relnotes
9i lin relnotes
Anil Pandey
 
2713897 oracle-unix-oracle
2713897 oracle-unix-oracle2713897 oracle-unix-oracle
2713897 oracle-unix-oracle
sivacse09
 
Sharepoint 2007 backup & restore
Sharepoint 2007 backup & restoreSharepoint 2007 backup & restore
Sharepoint 2007 backup & restore
Decatec
 
Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
Mohsen B
 

Similar to 17398351 sap-system-copy-homcopyv1 (20)

Guide tohelpyouunderstandvariousmethodsofsystemcopy
Guide tohelpyouunderstandvariousmethodsofsystemcopyGuide tohelpyouunderstandvariousmethodsofsystemcopy
Guide tohelpyouunderstandvariousmethodsofsystemcopy
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
 
6048618 cloning-procedure-of-r12-single-tier
6048618 cloning-procedure-of-r12-single-tier6048618 cloning-procedure-of-r12-single-tier
6048618 cloning-procedure-of-r12-single-tier
 
Oracle database 12c client quick installation guide 8
Oracle database 12c client quick installation guide 8Oracle database 12c client quick installation guide 8
Oracle database 12c client quick installation guide 8
 
Oracle database 12c client quick installation guide 7
Oracle database 12c client quick installation guide 7Oracle database 12c client quick installation guide 7
Oracle database 12c client quick installation guide 7
 
Deployment with ExpressionEngine
Deployment with ExpressionEngineDeployment with ExpressionEngine
Deployment with ExpressionEngine
 
Percona xtrabackup - MySQL Meetup @ Mumbai
Percona xtrabackup - MySQL Meetup @ MumbaiPercona xtrabackup - MySQL Meetup @ Mumbai
Percona xtrabackup - MySQL Meetup @ Mumbai
 
Collaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mysteryCollaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mystery
 
8 i rman_love_it
8 i rman_love_it8 i rman_love_it
8 i rman_love_it
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Oracle ocp backup exam
Oracle ocp backup examOracle ocp backup exam
Oracle ocp backup exam
 
Testing Delphix: easy data virtualization
Testing Delphix: easy data virtualizationTesting Delphix: easy data virtualization
Testing Delphix: easy data virtualization
 
Rdbms
Rdbms Rdbms
Rdbms
 
Oracle OCP Backup Exam
Oracle OCP Backup ExamOracle OCP Backup Exam
Oracle OCP Backup Exam
 
9i lin relnotes
9i lin relnotes9i lin relnotes
9i lin relnotes
 
2713897 oracle-unix-oracle
2713897 oracle-unix-oracle2713897 oracle-unix-oracle
2713897 oracle-unix-oracle
 
Sharepoint 2007 backup & restore
Sharepoint 2007 backup & restoreSharepoint 2007 backup & restore
Sharepoint 2007 backup & restore
 
Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
 

Recently uploaded

FIDO Munich Seminar In-Vehicle Payment Trends.pptx
FIDO Munich Seminar In-Vehicle Payment Trends.pptxFIDO Munich Seminar In-Vehicle Payment Trends.pptx
FIDO Munich Seminar In-Vehicle Payment Trends.pptx
FIDO Alliance
 
UiPath Community Day Amsterdam: Code, Collaborate, Connect
UiPath Community Day Amsterdam: Code, Collaborate, ConnectUiPath Community Day Amsterdam: Code, Collaborate, Connect
UiPath Community Day Amsterdam: Code, Collaborate, Connect
UiPathCommunity
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
ZachWylie3
 
FIDO Munich Seminar Introduction to FIDO.pptx
FIDO Munich Seminar Introduction to FIDO.pptxFIDO Munich Seminar Introduction to FIDO.pptx
FIDO Munich Seminar Introduction to FIDO.pptx
FIDO Alliance
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
Zilliz
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
Zilliz
 
Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+
Zilliz
 
It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
Zilliz
 
Keynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive SecurityKeynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive Security
Priyanka Aash
 
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan..."Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...
Fwdays
 
FIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptx
FIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptxFIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptx
FIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptx
FIDO Alliance
 
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Snarky Security
 
Exchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partes
Exchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partesExchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partes
Exchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partes
jorgelebrato
 
Enterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdfEnterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdf
Yury Chemerkin
 
DefCamp_2016_Chemerkin_Yury_--_publish.pdf
DefCamp_2016_Chemerkin_Yury_--_publish.pdfDefCamp_2016_Chemerkin_Yury_--_publish.pdf
DefCamp_2016_Chemerkin_Yury_--_publish.pdf
Yury Chemerkin
 
What's New in Copilot for Microsoft 365 June 2024.pptx
What's New in Copilot for Microsoft 365 June 2024.pptxWhat's New in Copilot for Microsoft 365 June 2024.pptx
What's New in Copilot for Microsoft 365 June 2024.pptx
Stephanie Beckett
 
Self-Healing Test Automation Framework - Healenium
Self-Healing Test Automation Framework - HealeniumSelf-Healing Test Automation Framework - Healenium
Self-Healing Test Automation Framework - Healenium
Knoldus Inc.
 
AMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech DayAMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech Day
Low Hong Chuan
 
Top 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdfTop 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdf
Marrie Morris
 
Increase Quality with User Access Policies - July 2024
Increase Quality with User Access Policies - July 2024Increase Quality with User Access Policies - July 2024
Increase Quality with User Access Policies - July 2024
Peter Caitens
 

Recently uploaded (20)

FIDO Munich Seminar In-Vehicle Payment Trends.pptx
FIDO Munich Seminar In-Vehicle Payment Trends.pptxFIDO Munich Seminar In-Vehicle Payment Trends.pptx
FIDO Munich Seminar In-Vehicle Payment Trends.pptx
 
UiPath Community Day Amsterdam: Code, Collaborate, Connect
UiPath Community Day Amsterdam: Code, Collaborate, ConnectUiPath Community Day Amsterdam: Code, Collaborate, Connect
UiPath Community Day Amsterdam: Code, Collaborate, Connect
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
 
FIDO Munich Seminar Introduction to FIDO.pptx
FIDO Munich Seminar Introduction to FIDO.pptxFIDO Munich Seminar Introduction to FIDO.pptx
FIDO Munich Seminar Introduction to FIDO.pptx
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
 
Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+
 
It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
 
Keynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive SecurityKeynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive Security
 
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan..."Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...
 
FIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptx
FIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptxFIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptx
FIDO Munich Seminar: Biometrics and Passkeys for In-Vehicle Apps.pptx
 
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
 
Exchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partes
Exchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partesExchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partes
Exchange, Entra ID, Conectores, RAML: Todo, a la vez, en todas partes
 
Enterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdfEnterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdf
 
DefCamp_2016_Chemerkin_Yury_--_publish.pdf
DefCamp_2016_Chemerkin_Yury_--_publish.pdfDefCamp_2016_Chemerkin_Yury_--_publish.pdf
DefCamp_2016_Chemerkin_Yury_--_publish.pdf
 
What's New in Copilot for Microsoft 365 June 2024.pptx
What's New in Copilot for Microsoft 365 June 2024.pptxWhat's New in Copilot for Microsoft 365 June 2024.pptx
What's New in Copilot for Microsoft 365 June 2024.pptx
 
Self-Healing Test Automation Framework - Healenium
Self-Healing Test Automation Framework - HealeniumSelf-Healing Test Automation Framework - Healenium
Self-Healing Test Automation Framework - Healenium
 
AMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech DayAMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech Day
 
Top 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdfTop 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdf
 
Increase Quality with User Access Policies - July 2024
Increase Quality with User Access Policies - July 2024Increase Quality with User Access Policies - July 2024
Increase Quality with User Access Policies - July 2024
 

17398351 sap-system-copy-homcopyv1

  • 1. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen System Copy Guides Volume 1 Homogeneous System Copy using Online/Offline Database Backup By basisconsultant.com All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 1 of 9
  • 2. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen Reasons for Copying a SAP System SAP recommends that you make a system copy in order to build a test, demo, training or standby system (Oracle and Informix: standby systems cannot be created with a system copy). You should perform upgrades in a test system first. This way you can identify customer pecific problems which might result from modifications. Thus, we can sort the general needs for a system copy as follow: To create a new training system for end-user or project team education To create a DEMO system To create a Test system for upgrade or other purposes. To recover a system on another machine with the same platform after a crash. To copy large clients. If a client very large to export/import, it is better to do a system copy rather than client transport. If a system copy takes place between systems with same platform ( operating system and database system ) , we call this HOMOGENEOUS SYSTEM COPY. If The system copy takes place between systems with different platforms ( at least one of the component must be different, OS or RDBMS ), we call this HETEROGENEOUS SYSTEM COPY. There 3 ways of a Homogeneous System Copy in R/3 Systems. 1. Homogeneous System Copy using Online / Offline Database Backup. 2. Homogeneous System Copy using R3LOAD Procedure. 3. Homogeneous System Copy using R3COPY Procedure. This guide is prepared for a Homogeneous System Copy using Online/Offline Database Backup. The procedure described tested on AIX 4.3.3/Oracle 8.1.7, AIX 5.1/Oracle 8.1.7, AIX 5.1/Oracle 9.2.0 and Win2K/Oracle 8.1.7 platforms. The command reference given in this guide is taken from a homogeneous system copy done on AIX 4.3.3/Oracle 8.1.7 platform. Differences of other platforms such as Windows will be shown in the same sections. Homogeneous System Copy using Online/Offline Database Backup This guide is prepared for a Homogeneous System Copy using Online/Offline Database Backup. Steps for a Homogeneous system copy are briefly as below: Preparations on Target System. Restore Online/Offline Backup of Source System onto Target System. Create CONTROLFILE creation script on Source System. Modification of CONTROLFILE script and creation of CONTROLFILEs of Target System. Recovery of Oracle Database on Target System. Completion of System Copy Prerequisites Following conditions must be provided to copy a system: Both Source and Target Systems must have Same Operating System and Database System. Also Patch levels must be same. You have sufficient free space for sapdata directories on target system. For Windows systems, you have to create all drives where datafiles resides on source system. Use most current database backup in order to shorten database creation time. All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 2 of 9
  • 3. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen Procedure 1. Data and Log directories on target system must be cleaned before restoring source database. Here below are the commands to clean directories. Before this, you have to stop all SAP and Oracle processes. # su - <targetsid>adm # stopsap all # exit # su – ora<targetsid> # lsnrctl stop # exit # cd /oracle/<SID>/ # rm –rf sapdata?/* # rm –rf origlog?/* # rm –rf mirrlog? # rm –rf sapreorg/* # rm –rf saparch/* # rm –rf saptrace/usertrace/* # rm –rf saptrace/background/* # rm –rf sapbackup/* # rm –rf sapcheck/* On Windows systems, SAP and Oracle services can be stopped via the following commandline program after logging as <sid>adm: ntscmgr stop SAP<SID>_<SYSNO> ntscmgr stop SAPOSCOL ntscmgr stop OracleService<SID> 2. You have to resize the following file systems before restore process. Take into account sizes of source system. /oracle/<SID>/sapdata1 /oracle/<SID>/sapdata2 /oracle/<SID>/sapdata3 /oracle/<SID>/sapdata4 /oracle/<SID>/sapdata5 /oracle/<SID>/sapdata6 /oracle/<SID>/saparch 3. After cleaning necessary file systems/directories, you have to restore most current database backup to target system. For this, find the detail backup log (e.g. bdkxxsrh.anf) for that backup on source system. You can determine this from back<SID>.log summary backup log file or using DB12. All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 3 of 9
  • 4. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen DB12 - Backup Logs back<SID>.log File Copy this detailed backup log file into /oracle/<TSID>/sapbackup directory on target system. Use BRRESTORE command below to restore the source database on target system. You can also restore datafiles and online redolog files (if you are using offline backup) using backup tools such as BACKFM tool of IBM TSM. On Windows systems, while restoring source database on target system, you have to keep same mount points for Oracle Data Directories. For example if all of your source data directories resides on "d:>" disk (d:oracle<SSID>sapdatax), then you have to create data dirs. at target system on "d:>" disk. After restore process, you can change the directories. For example you can distribute sapdatax directories on many disks. This will be mentioned in CONTROLFILE creation step later. 3.a. Mount the necessary backup volume on target system. 3.b. Use the following command to begin restore: # su - ora<tsid> # cd sapbackup # brrestore -m full -b <det_log_file> -c (det_log_file= for example bdkxxsrh.anf) At the first step of restore, system will recognize that the Oracle SID is different on target machine (where the restore command executed) and in backup. Also, Oracle_Home parameters in backup and in current system will be different and recognized by brrestore. But the restore command will restore the datafiles to match current systems file system. Here is a sample log of a restore. All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 4 of 9
  • 5. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen All the datafiles and online redolog files (only for Offline DB Backup) must be successfully restored. At this step, there are 3 probability that must be take into account for the following steps. You are using an online database backup of source system to create target system. You have to find and put all archive files created during online backup into target systems archive directory to be able to recover database. You can also apply all the archives created from the online backup start time to latest available. You are using an offline database backup of source system which is running in ARCHIVELOG mode to create target system. You may find the archive files created after offline backup on source system to make database current on target system via applying during recovery. You are using an offline database backup of source system which is running in NOARCHIVELOG mode to create target system. You don't have any archive files created on source system so you don't need anything. Those differences will be detailed in recovery step. 4. After restoring datafiles and redolog files, a scripts must be prepared on source system to create CONTROLFILE of target system. For this you have 2 option. 4.a. You can use R3COPY program which is under "/kernel/UNIX/COMMON" directory of Kernel CD. This program can be used only on UNIX systems. For Windows systems, "4.b" option must be used. Run this program by ora<sid> user on source system. After some confirmations, execute step "(a) Source system: Generating the script CONTROL.SQL". This will create a script named CONTROL.SQL under /oracle/<SSID>/sapreorg directory. Copy this script into target system (any directory). This file is ready for execution and doesn't require any modification. 4.b. SVRMGRL or SQLPLUS can create a scrpit to create controlfile using current CONTROLFILE content. Login to source system as ora<sid> user and execute the following SVRMGRL/SQLPLUS commands. To be able to execute following commands, database must be at least in MOUNT mode.. All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 5 of 9
  • 6. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen # svrmgrl SVRMGR> connect internal SVRMGR> alter database backup controlfile to trace; SVRMGR> exit As a result of this command, a trace file (e.g. ora_54764_hvd.trc ) will be created under /oracle/<SSID>/saptace/usertrace directory. File can be determined by sorting according to modification/creation dates (UNIX: # ls –ltr). Most current file must be cheched. You have to edit this file to be able to use for CONTROLFILE creation on target system. Rename file name as CONTROL.SQL Open file to edit using VI (UNIX) or NOTEPAD (WIN). Remove all lines before "STARTUP MOUNT" line. Delete all commented "#" lines. Also remove all lines after CHARACTER SET WE8DEC;" line. Change all Source SID's to Target SID via following commands. UNIX (VI): :%s/<SSID>/<TSID>/g WIN (NOTEPAD): CTRL+H Change the line CREATE CONTROLFILE REUSE DATABASE ‘SSID’ NORESETLOGS ARCHIVELOG; as follow CREATE CONTROLFILE REUSE SET DATABASE ‘TSID’ RESETLOGS ARCHIVELOG; If you want to change datafile or redolog file destinations, first move the files on target destination at OS level, then edit CONTROL.SQL file for new destinations. If structural changes made in database on source system just after the backup restored on target machine, differences will exists between datafiles in sapdata directories and datafiles referenced in CONTROL.SQL file. Because CONTROL.SQL file is created for the current status of source system, but later added files doen't exists in backup so in target system. To overcome this problem, just delete the datafiles from CONTROL.SQL file. If you don't know which files are created after the backup, let the problems arise during CONTROLFILE creation command, and delete the files mentioned as error from CONTROL.SQL and re-run creation command. After deletion and successful creation of CONTROLFILE's on target system, you have to take into account the following subjects: If you are not going to recover database to the most current status using archive files, then there is no problem. But if you are planning to recover database to the most current status using archive files, then deleted datafiles will be problem later while application of archive files. At this moment, we offer you to keep datafile names you deleted during CONTROLFILE creation and add those datafiles with the same sizes on source system after CONTROLFILE creation. 5. After CONTROL.SQL script preparation, following commands must be run to create CONTROLFILE of target system: # su – ora<targetsid> All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 6 of 9
  • 7. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen # svrmgrl SVRMGR> connect internal SVRMGR> @/<path_to_file>/control.sql You have to guarantee the successful completion of this command as follow: SVRMGR> @control.sql Statement processed. SVRMGR> 6. Database will be in inconsistent status after creation of CONTROLFILE. This can be viewed by trying to open the database. SVRMGR> alter database open; alter database open * ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SVRMGR> alter database open resetlogs; alter database open resetlogs * ORA-01195: online backup of file 1 needs more recovery to be consistent ORA-01110: data file 1: '/oracle/<hedefSID>/sapdata1/system_1/system.data1' At this step, a recovery must be made in order to be able to use the database. 7. 3 type of recovery can be made, according to your status mentioned at the end of STEP-3. all the recovery types must be used by "USING BACKUP CONTROLFILE" as CONTROLFILE is created manually. 7.a. If your source system is runnig in NOARCHIVELOG mode, then you have to use the following command to recover database. SVRMGR> recover database using backup controlfile until cancel; 7.b. If you restored an online backup on target system and put all the archive files created since online backup start time, use the following commands. SVRMGR> recover database using backup controlfile; After execution of this command, Oracle will ask for archive files to be consistent. As archive files contains only database changes commands, you will use source system archive file on new systems database recovery. Copy all archive files created since online backup on source system to archive directory of target system. Archive file names are different from asked during recovery session. You can change archive file names for target system via the following script. cd /oracle/<TSID>/saparch for i in `ls|grep <SSID>`; do file_name=`echo $i |cut -dD -f2`; mv $i <TSID>${file_name}; done Alternatively you can enter file names manually as required by recovery session as follow: SVRMGR> recover database using backup controlfile; ORA-00279: change 44138924 generated at 03/26/2003 00:00:24 needed for thread 1 ORA-00289: suggestion : /oracle/HVS/saparch/HVSarch1_22746.dbf All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 7 of 9
  • 8. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen ORA-00280: change 44138924 for thread 1 is in sequence #22746 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} /oracle/HVS/saparch/HVDarch1_22746.dbf Log applied. After application of all necessary archives (at least all the archives created during online backup must be applied. Archives from this point can be applied to make database current), next request for archive is cancelled via CANCEL command. ORA-00279: change 44164157 generated at 03/26/2003 01:58:29 needed for thread 1 ORA-00289: suggestion : /oracle/HVS/saparch/HVSarch1_22754.dbf ORA-00280: change 44164157 for thread 1 is in sequence #22754 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} CANCEL Media recovery cancelled. SVRMGR> But recovery session must be started with the following command and cancelled again to ba able to start database. SVRMGR> recover database using backup controlfile until cancel; ORA-00279: change 44164157 generated at 03/26/2003 01:58:29 needed for thread 1 ORA-00289: suggestion : /oracle/HVS/saparch/HVSarch1_22754.dbf ORA-00280: change 44164157 for thread 1 is in sequence #22754 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} CANCEL Media recovery cancelled. SVRMGR> Otherwise following error will arise during database opening. SVRMGR> alter database open resetlogs; alter database open resetlogs * ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '/oracle/HVS/sapdata1/system_1/system.data1' To open database, use the following command: SVRMGR> alter database open resetlogs; Statement processed. SVRMGR> 7.c. If you restored an offline backup on target system, you can recover database to the time of backup completed or you can recover database to the most current status using archive files. The archive application and statup of database is same as an online backed up database copy in "7.b". 8. after opening database, LISTENER process must be started. # su – ora<targetsid> # lsnrctl start On Windows systems, Oracle Listener is started as below: ntscmgr start OracleOraHome817TNSListener 9. To open SAP system, use the following commands. All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 8 of 9
  • 9. Type Handbook Document Area SAP Basis Topic Homogeneous System Copy using Online/Offline Database Backup Author Huseyin Bilgen # su - <targetsid>adm # startsap On Windows systems, Oracle Listener is started as below: ntscmgr start SAP<SID>_<SYSNO> ntscmgr start SAPOSCOL ntscmgr start OracleService<SID> startsap name=<TSID> nr=<SYSNO> SAPDIAHOST=<target systems hostname> 10. As your Hardware Key is not changed, you don't have to get additional License Key from SAPNET. You can use previous systems (on target system, if SID is not changed) License in new system created on target system. 11. Logon to the SAP R/3 System and goto TCODE SE06. Select "Database Copy or Migration" and execute "Post Installation Processing". SE06 Change all of the Source System Objects to Target System Objects as asked. 12. Delete old TMS configuration and make new configuration for TMS via STMS TCODE. 13. After all of above steps, you have completed a System Copy using Online/Offline Database Backup. All Rights Reserved. Copyright 2001-2003.basisconsultant.com Page 9 of 9