Homogeneous System Copy Using Online
Homogeneous System Copy Using Online
Homogeneous System Copy Using Online
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. Homogeneous System Copy using Online / Offline Database Backup. Homogeneous System Copy using R3LOAD Procedure. 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.
a. b. c. d. e.
1. 2. 3.
Prerequisites
a. b. c. d. 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.
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 -adm # stopsap all # exit # su ora # lsnrctl stop # exit # cd /oracle// # 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/*
1. 2. 2.
You have to resize the following file systems before restore process. Take into account sizes of source system. /oracle//sapdata1 /oracle//sapdata2 /oracle//sapdata3 /oracle//sapdata4 /oracle//sapdata5 /oracle//sapdata6 /oracle//saparch 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.log summary backup log file or using DB12.
back.log File Copy this detailed backup log file into /oracle//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.
3.a. Mount the necessary backup volume on target system. 3.b. Use the following command to begin restore: # su -ora # cd sapbackup # brrestore -m full -b -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.
a. b. c. d.
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 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//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 user and execute the following SVRMGRL/SQLPLUS commands. To be able to execute following commands, database must be at least in MOUNT mode.. # 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//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///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.
5. After CONTROL.SQL script preparation, following commands must be run to create CONTROLFILE of target system: # su ora # svrmgrl SVRMGR> connect internal SVRMGR> @/ /control.sql You have to guarantee the successful completion of this command as follow:
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 # lsnrctl start
1. 2.
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. Logon to the SAP R/3 System and goto TCODE SE06. Select "Database Copy or Migration" and execute "Post Installation Processing".
1. 2.
SE06 Change all of the Source System Objects to Target System Objects as asked. Delete old TMS configuration and make new configuration for TMS via STMS TCODE. After all of above steps, you have completed a System Copy using Online/Offline Database Backup. - See more at: http://www.saptechies.org/system-copy-guides/#sthash.CvAkPxfh.dpuf