Sunteți pe pagina 1din 27

Homogeneous system copy

SAP BASIS SUPPORT Desk Side Procedures


For support of DIAGEO US Document Owner: Mirza Faisal Beg
Note: These process documents reflect the work executed by the ITD GD India team for homogeneous system copy on the Diageo US account.

Document title: Homogeneous system copy

Homogeneous system copy

Table of Contents

IBM Global Services

Page 2 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

1.0 Document Control


Summary of Changes
Version Number 1.0 Version Date 21st Sep 2007 Nature of Change Initial version Date Approved

Document Change Approvers


Reviewing Organization IBM Name Mirza Faisal Beg e-Mail Address faisalbeg@us.ibm.com

The document owner maintains document approval for this document. Corrections to grammar, spelling and format do not require approval or review. Unless otherwise noted in the revision table. All updates have been made by the document owner. Distribution/Notification The Document Approvers are notified via Lotus Notes Email when revised document is issued.

Document Ownership
This document is owned by Sending GEO.

Coordinator Name: Mirza Faisal Beg Email address: faisalbeg@us.ibm.com

Document Review Plans


This document will be reviewed and updated, if necessary, as defined below: As required to correct or enhance information content. Following any organizational changes or restructuring. Following a half yearly review. Comments or other information related to the content of the document should be directed to the document owner.

How to Find the Latest Level of this Document


All other softcopy or hardcopy versions are invalid and are not to be used. Please note that printed copies of this document are for reference only and are not controlled.

IBM Global Services

Page 3 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

2.0 Procedure
1>

First create the change request for doing the system copy from SRC to TGT system and then get all the approvals. Then as a first point, check the target file system requirements to see if it fulfills the source file system space. For this first login to the source system and then go to the directory /usr/sap/trans/refresh. Here you will find the script fsreq.sh. This script can be used to calculate the file system requirements. On the source system , run as follows

2>

Sample figure Now login to the target system (ex: DAL) and run as follows to get the required file system space.

Sample figure
The above command will give you the file system requirements on the target system. Note that this script will keep a buffer of 10GB on each file system. Now ask the unix team to increase the required space on the target systems file system.
3> Capture the following on the target system.

RZ04:
IBM Global Services Page 4 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Sample figure

IBM Global Services

Page 5 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Sample figure 4>SMLG:

IBM Global Services

Page 6 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Sample figure

5>RZ12: Server groups

Sample figure

6> Sap licence information.


IBM Global Services Page 7 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

7> Create the requests on the TGT System.

User Master and Authorization profile export---sap_user (** This is done by the Accenture team. Try to create a export for this if authorization is there as a backup). Go to SCC8 Select the TGT. Select the User and Master profile. Hit on Schedule background Job Select the background server Hit on Schedule job Hit on Immediate button on background schedule window Hit on Save button Select the printer (Let the default printer) Hit on the confirmation window after a background job scheduled

(RSCLXCOP report runs in the background with parameter &0000000000006. Check the status and log in SM37 BTC CLIENTEXPORT/IMPORT xxx)
IBM Global Services Page 8 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy 8> Printer Configurations (SPAD). Execute SPAD/SPAT Change to Edit mode Hit Output Devices button Select Transport All from EditTransport menu Prompts you create a transport request. Create one for these to transport to the same system. 9> Export Logical System Definitions Execute SALE Navigate to Define Logical Systems Select TRG Logical System (SIDxxx) Select Transport option from Table View Menu Select transport request created for SPAD definitions Hit on Include in Request button Save the work. 10> Cross Client Files and Paths (FILE) Select the Logical File Path Definitions in the left panel of the screen Choose the JOURNAL_UPLOAD_TRGSID Select the transport option from Table View main Menu Choose the same transport request defined for SPAD Hit on Include in Request button with dependant entries option Save the work.

IMP note : Here note that sometimes when you are doing the system copy, the target system will be a delivery system and in that case when you create the transport request it will not accept any target system .So if you release this kind of a change request , it will not be exported.
IBM Global Services Page 9 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy So in such cases, you can create a request as transport of copies from SE09 and then include all of the objects from the earlier created change request.

Also note that after you release the change request, make sure to check the export logs to see that the request is exported properly.

11> RFC destinations.

Create a transport of copy in SE01 Select the request created and choose display object list Alter to change mode Hit on new entries Enter the following RFC definition tables R3TR R3TR R3TR
IBM Global Services

TABU TABU TABU

RFCATTRIB RFCCHECK RFCDES


Page 10 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy R3TR TABU

RFCDOC

Note: Here also note that when you create the transport request and add the table entries, put a star in the table key field. Otherwise it will export empty tables only.

Sample figure

12> Trace and alter control file on the source system sqlplus / nolog connect / as sysdba alter database backup controlfile to trace; exit
IBM Global Services Page 11 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy Move the trace file to the target system. Change all occurrences of SRC to TGT (:g/SRC/s//TRG/g) Remove all the lines before STARTUP NOMOUNT Maintain the CREATE CONTROL FILE as follows: CREATE CONTROLFILE SET DATABASE <TRG> RESETLOGS NOARCHIVELOG After CHARACTER SET WE8DEC. maintain the syntax as follows: RECOVER DATABASE ALTER DATABASE OPEN RESETLOGS; :g/SRCSID/s//TRGSID/g

Note: Here if you are doing the system copy using an online backup, then in the control file disable the line RECOVER DATABASE and ALTER DATABASE OPEN RESETLOGS. Because we may need to do an incomplete recovery .We will manually do the recovery and then open the database with reset logs option.

13>Restore all the FS to TGT system (sapdata1 thru sapdata6

If we are doing the system copy using the online backup, then we need to restore the archive log files also. Here the target system is having a different SID.So to do the recovery on the target system, we need to rename all the archive log files to match the name of the target system. For this we can create a script as follows:
14>Note:

ls <SRCSID>* | awk F<SRCSID> {print mv <SRCSID> $2 <TGTSID> $2} > renamearch.ksh For example: ls CP1* | awk FCP1 {print mv CP1 $2 CQ1 $2} > renamearch.ksh chmod 750 renamearch.ksh
IBM Global Services Page 12 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy vi renamearch.ksh (review output file - file should look like the following: mv <SRCSID>arch1_xxxx.dbf <TGTSID>arch1_xxx.dbf. Make adjustments as necessary) ./renamearch.ksh (execute script to r rename all files)

15>Once the archive log files are renamed, then execute the control file script to create the database. SQL>@control.sql Here once you run this script, if you are doing the system copy using online backup, it will ask you for the recovery .And in case of offline backup, it will create the database and open it. So for recovering the database from SQL prompt, run the below command, 16>SQL> recover database using backup controlfile until cancel; Once the database is recovered successfully, then open the database with the following command from SQL prompt SQL> alter database open resetlogs; Now you can shutdown and startup the database. 17> Now start with the post refresh activities

Query the DBA_USERS table to display SRC OPS$SIDADM user id. SQL>Create user OPS$SIDADM identified externally Default tablespace PSAPUSER1D Temporary tablespace PSAPTEMP;

Grant all the needed privileges to TRG OPS$SIDADM >SQL> Grant connect, resources to OPS$SIDADM with admin option; >SQL> Grant DBA to OPS$SIDADM >SQL> Grant SAPDBA to OPS$SIDADM > SQL> Create table OPS$TRGSIDADM.SAPUSER as select * from
OPS$SRCSIDADM.SAPUSER;
IBM Global Services Page 13 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Drop the SRC OPS$SIDADM user with cascade option.


SQL> Drop user OPS$<SRC>SIDADM cascade;

Similarly drop and create a public synonym for the TRG OPS$SIDADM.
SQL> Select * from dba_synonyms where table_name like SAPUSER%; (It should return the SRC OPS$SIDADM row). SQL> drop public synonym sapuser; SQL> Create public synonym sapuser for OPS$TRGSIDADM.SAPUSER; SQL> Select * from dba_synonyms where table_name like SAPUSER%; (It should return the TRG OPS$SIDADM row).

Change the global database name to reflect the TRG database name. Check the SRC global name SQL> Select global_name from global_name; 5.6.1 The SRC global name TRG global name SQL> Alter database rename global_name to SRC SID 5.6.2 Verify the TRG global name SQL> Select global_name from global_name;

Start the SAP


TGTADM> startsap r3

Post Copy Steps


License Key installation
The Hardware key can be retrieved by using saplicense -get
IBM Global Services Page 14 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy Use the command at the <TGTADM> Saplicense install.

Lock the users.


Lock all the SAP users to ensure that no one accidentally logs on to the new system while you are post processing. Go to the ABAP editor (SE38) and execute program ZPBLOCK1 The fields are PCLASS SAP user group, PNAME SAP user id PLOCK Lock radio button, PULOCK Unlock radio button Enter * in the PCLASS and PNAME field and execute This will lock all dialog users apart from those in the administration group SUPER and SYSTEM.

Configuring the Workbench Organizer SE06 and STMS.

Logon to the TGT as SAP* to client 000/ PWD.

Configure the workbench organizer using the TCode SE06 with the database option.

Select post installation processing Reinstall CTS - YES Source system = SRC Change originals from SRC to TGT YES Transport system not configured - ok Change originals from SRC to TGT yes Delete TMS configuration yes Do you want to delete this TMS configuration yes
IBM Global Services Page 15 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy


Delete old version of transport routes yes Do you want to delete the old version of transport routes yes Completed

TCode STMS System <TGT>. Use menu paths Overview Systems System Status for TGT should not be active. To Activate, Login to DAP as SAP* to 000/ PWD Use TCODE STMS and menu path, Overview Systems. Extras distribute and activate configuration. Verify the transport routes on the TGT system. Logon TGT client 000 and use the TCODE STMS. Configuration Adjust with Controller.

Insure the Client settings are as agreed to

Enable the Catt in client via Transaction SCC4 Assign the related Logical System name

IBM Global Services

Page 16 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Validate the SAP system SICK.

Initialize the Mailbox SO01 Import Profiles RZ10. Use RZ10 and then use the menu UTILITIES IMPORT PROFILES.
IBM Global Services Page 17 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Create new Operation Modes RZ04. Adapt timetable for the Operation modes SM63 Adjust the Logon groups SMLG Update the RFC server groups. RZ12 RFC logs clean out Sm58 Login as DDIC in Client 000 on TGT Use SM58.

Delete all the entries.

Scheduling Background Jobs SM36.


The SRC system background jobs have to be deleted and the TGT system SAP standard jobs have to be scheduled Logon as DDIC with Client 000. Use TCode SM36.
IBM Global Services Page 18 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Select standard jobs and click on the Default scheduling button.

IBM Global Services

Page 19 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Deletion of Job logs SE38. Abap program is RSBTCDEL.

.TemSe ConsistencySP12
Select consistency check. Select Delete all if you find any inconsistencies.

IBM Global Services

Page 20 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Change Printer configuration.

UtilitiesFor output Devices Assign server. Click on Display. Click on Convert and unlock. If the Unlock option is not displayed just use Convert.

Adapt RFC Destinations SM59 Setting up the SAP internet gateway, SAPFTP, SAPFTPA, DELCLNT600.

IBM Global Services

Page 21 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Oracle table truncation SE14.


DBSTATHORA, DBSTAIHORA, DBSTATIORA, DBSTATTORA

MONI, PAHI, OSMON, DBSNP, SDBAH, SDBAD, SDBAP, SDBAR,

TPFET, TPFHT, TLOCK.

IBM Global Services

Page 22 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Delete the data from the tables.

DELETE of old UpdatesSM13

IBM Global Services

Page 23 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

SAPDBA plannerDB13

Change the User Login ScreenSE61

IBM Global Services

Page 24 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

Logical system name conversionBDLS

This will execute about 2hrs, so have patience. Check Conversion of Client-pendent and Client-independent tables Uncheck test and check existence. Schedule a background job (by default RBDLSMAP will be released).

Note: here make sure you select the source and target logical system names.
IBM Global Services Page 25 of 27 India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

This completes the system copy process.

IBM Global Services

Page 26 of 27

India- Diageo-SAP Hardcopy For Reference Only

Homogeneous system copy

IBM Global Services

Page 27 of 27

India- Diageo-SAP Hardcopy For Reference Only

S-ar putea să vă placă și