Heterogeneous System Copy
Transcript of Heterogeneous System Copy
Post ArticleWelcome! Guest New User? Register | Login
Home Tutorials FAQ Transaction Codes Useful Tips SAP Institutes Books Resume Jobs
Submit Resume Post Job Interview Questions
Search SAP Tutorials Search
Digg This Search... Μου αρέσει!
Page 1 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
Post your Article
Home » SAP Tutorials » SAP BASIS Tutorials »
System Copy Guides
By: saket | 22 Jun 2008 5:19 pm
Homogeneous System Copy using Online/Offline DatabaseReasons for Copying a SAP System
SAP recommends that you
demo, training or standby
cannot be created with a system copy). You should perform upgrades in a
test system first. This way
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 enda. To create a DEMO systemb. To create a Test system for upgrade or other purposes.c. To recover a system on another machine with the same platform after acrash.
d.
To copy large clients. If a client very large toa system copy rather than client
e.
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
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.1.Homogeneous System Copy using R3LOAD Procedure.2.Homogeneous System Copy using R3COPY Procedure.3.
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
The command reference given in this guide is taken from a homogeneous system copy done on AIX
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
are briefly as below:
Preparations on Target System.a. Restore Online/Offline Backup of Source System onto Target System.b. Create CONTROLFILE creation script on Source System.c. Modification of CONTROLFILE script and creation of CONTROLFILEs of Target System.d. Recovery of Oracle Database on Target System.e. Completion of System Copyf.
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 levelsa.You have sufficient free space for sapdata directories on target system.b. Digg This Search... Μου αρέσει!
Page 2 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
For Windows systems, you have to create all drives where datafiles resides on source system.c.Use most current database backup in order to shorten database creation time.d.
Procedure
1. Data and Log directories on target system must be cleaned before restoring source database. Here below
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
sapreorg/* # rm –rf saparch/* # rm –rf saptrace/usertrace/* # rm –rf saptrace/background/* # rm
You have to resize the following file systems before restore process. Take into account sizes of source1./oracle//sapdata1 /oracle//sapdata2 /oracle//sapdata3 /oracle//sapdata4 /oracle/2.
After cleaning necessary file systems/directories, you have to restore most current database backup tothe detail backup log (e.g. bdkxxsrh.anf) for that backup on source system. You can determine this fromlog file or using DB12.
1.
DB12 -Backup Logs
back.log File
Copy this detailed backup log file into /oracle//sapbackup directory on target system. Use
source database on target system. You can also restore datafiles and online redolog files (if you are using
tools such as BACKFM tool of IBM TSM.
S.A.P Basis
Certification
Pass Netweaver™
Exam 1st Time Get Basis Certification in
Days www.sapbasiscertification.com
FI training
Configure Finance module in 30 days
Become a Super FI
Consultant www.sapficoconsultant.com
Safe Online Data
Storage
Secure Data
Consolidation. 128 Bit SSL High Security.
24x7x365 Support ProjectFusion.com/Safe_Online_
Data MiningAnalytical CRM and
Credit Risk Data
Mining solutions &
consulting www.g-stat.com
Disaster Recovery Systems
Two-way web
managed alert service
for business continuity www.alarmtilt.com
Digg This Search... Μου αρέσει!
Page 3 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
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
restore command will restore the datafiles to match current systems file system. Here is a sample log of a
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
recovery.
You are using an offline database backup of source system which is running in NOARCHIVELOG mode to
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
this you have 2 option.Digg This Search... Μου αρέσει!
Page 4 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
4.a. You can use R3COPY program which is under "/kernel/UNIX/COMMON" directory of Kernel CD. This
UNIX systems. For Windows systems, "4.b" option must be used. Run this program by ora
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.
user and execute the following SVRMGRL/SQLPLUS commands. To be able to execute following commands,
MOUNT mode..
# svrmgrl SVRMGR> connect internal SVRMGR> alter database backup controlfile to trace; SVRMGR>
As a result of this command, a trace file (e.g. ora_54764_hvd.trc ) will be created under /oracle/
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.SQLa.Open file to edit using VI (UNIX) or NOTEPAD (WIN).b.
Remove all lines before "STARTUP MOUNT" line. Delete all commented "#" lines. Also removeWE8DEC;" line.
c.
Change all Source SID's to Target SID via following commands.d.
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
# su – ora
# svrmgrl SVRMGR> connect internal SVRMGR> @/ /control.sql Digg This Search... Μου αρέσει!
Page 5 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
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
SVRMGR> alter database open; alter database open * ORA-01589: must use RESETLOGS or NORESETLOGS
SVRMGR> alter database open resetlogs; alter database open resetlogs * ORA-01195: online backup of file 1 needs more
consistent ORA-01110: data file 1: '/oracle//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
"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
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
commands.
SVRMGR> recover database using backup controlfile;
After execution of this command, Oracle will ask for archive files to be consistent. As archive
commands, you will use source system archive file on new systems database recovery. Copy all archive files
on source system to archive directory of target system. Archive file names are different from asked during recovery
change archive file names for target system via the following script.
cd /oracle//saparch for i in `ls|grep `; do
file_name=`echo $i |cut -dD -f2`; mv $i ${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
thread 1 ORA-00289: suggestion : /oracle/HVS/saparch/HVSarch1_22746.dbf
ORA-00280: change 44138924 for thread 1 is in sequence #22746 Specify log: {=suggested | filename |
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
suggestion : /oracle/HVS/saparch/HVSarch1_22754.dbf ORA-00280: change 44164157 for
{=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
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
sequence #22754 Specify log: {=suggested | filename | AUTO | CANCEL} CANCEL Media recovery cancelled.
Otherwise following error will arise during database opening.
SVRMGR> alter database open resetlogs; alter database open resetlogs * ORA-01113: file 1 needs media
1: '/oracle/HVS/sapdata1/system_1/system.data1'
To open database, use the following command:
SVRMGR> alter database open resetlogs; Statement processed. SVRMGR>
Digg This Search... Μου αρέσει!
Page 6 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
7.c. If you restored an offline backup on target system, you can recover database to the time of
database to the most current status using archive files. The archive application and statup of database is
database copy in "7.b".
8. after opening database, LISTENER process must be started.
# su – ora # lsnrctl start
9. To open SAP system, use the following commands.
# su -adm # startsap
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.
1.
Logon to the SAP R/3 System and goto TCODE SE06. Select "Database Copy or Migration" andProcessing".
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.1.After all of above steps, you have completed a System Copy using Online/Offline Database2.
Comments
Really very useful one .. thanks
By: | 25 Jun 2008
Thanks !! very detailed info. Appreciated
By: | 21 Jun 2009
Good work done. Important screen shot make this article very helpful.. Thanks :)
Ads by Google Sap Resumes Sap Jobs Sap Books Sap Fresher Sap Material
Ads by Google Sap Tutorials Sap ERP Sap Software Sap MM
Digg This Search... Μου αρέσει!
Page 7 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
By: | 04 Aug 2009
GOOD
By: | 17 Aug 2009
Good job done. This would be like a standard guide for learners. Thank you Saket. Pranay
By: | 27 Aug 2009
Thanks fren, It's good to me.
By: | 22 Sep 2009
Nice article ! good for interview point of view ! Thanks,
By: Sd | 24 Sep 2009
Hi guys. Obscurity is a good thing. You can fail in obscurity. It removes the fear of failure. Help me! Need information about: Master cleanse diet healthy. I found only this - buy the master cleanse diet. 90 diaper bag fleurville sling tote: theoutdated country and made it in the demand for completely 25 types. Best rated diaper bags: taylor swift is usually knownscience scale. With love :o, Affrica from Guinea.
By: | 14 Oct 2009
hello saket, Thanks for your effort in posting the document, which was very useful for my reference. Thank you very much
By: | 20 Jan 2010
gr8 job....very detailed document !
By: | 11 Feb 2010
many thanks .. good procedure !!! very good explained
By: Mohamed ABDELMOULA | 29 Mar 2010
Dear gurus, Please translate it for Unix too. Who has such experience. Regards Bhajan
By: | 17 May 2010
Hello Saket, This one of the good post. Well documented for each platform Unix/Windwos. Regards Dharmendra
By: Dharmendra Kumar | 17 May 2010
Leave a comment
Type the characters you see in the picture below.
Digg This Search... Μου αρέσει!
Page 8 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/
SAP Online Help | SAP Jobs | SAP Training | SAP Books | SAP Software | SAP News | RSS/Syndication | Contact Us
Free Classifieds & Business Listing | SAP ERP Support/Consulting | Online Travel Portal & Community | Terms Of Use | Terms & Conditions
©2005-2010 SAP Techies. All rights reserved.
Digg This Search... Μου αρέσει!
Page 9 of 9System Copy Guides , SAP BASIS Tutorials & Training material, BASIS Tutorials, Help
1/9/2010http://www.saptechies.com/system-copy-guides/