system refresh(sap)

Upload: koinenirajy

Post on 31-Oct-2015

1.040 views

Category:

Documents


62 download

DESCRIPTION

SAP system refresh

TRANSCRIPT

This document outlines how to refresh an SAP R/3 4.6C system on Windows/Oracle platform.

The acronyms used in documents are

PRM = Source System SIDPFM = Target System SIDbp1tulap131 = Source System DBbp1tulap132 = Source System CIbp1tulap132 = Source System Applicationbp1tulap113 = Intermediate System for Export Storage.bp1tulap129 = Target CIbp1tulap130 = Target DBPrerequisites:1. Windows login access on Host2. Checking OS level configuration i.e. adm, ora users, environment variablesettings3. Checked /Create and map filesystem same as of Source System4. Downtime approval for Destination System copy process5. Verification of file systems6. Prepare SAP System for system copy-Prechecks7. Online database backup of Source System8. Create backup control file of Source System9. Edit Control file with Target System10. Checked all required passwords (System, DDIC etc) of Source systems11. Taking backup of target system configuration12. Backup RFC Entries /SE0913. Export User Master /SE0914. Export Logical System Connections / SALE /SE0915. Save Logon Groups - SMLG16. Export STMS_QA worklist tables / SE0917. Save RFC Groups RZ1218. Take Screen Shot of BD5419. WE20 / Partner Profile20. WE21/ Note Each tRFC21. SLICENSE /Installed licenses22. SCC4 /Client Details23. Offline Backup + File system backup of Target systemBASIS Prerequisites1. Start Online backup in PRM (Source System)Use transaction DB13 to scheduleSchedule at least 24 hrs before the planned PFM db roll forward time

2. Execute a user master export of PFM client 100.Go to transaction SCC8 (client export)Choose the following,

Profile: SAP_USERTarget System: PFMClick on Start ImmediatelyTake note of the request number.

If above method does not work do the following.

TP pf=TP_DOMAIN_PSM.PFL export client 100 UI(example of transport #: PFMKT00140, note T not 9)

3. Execute table export of PFM client 100.

Map \\\e$ to Z: drive on Ensure the scripts export_pfm_tables.cntl and import_pfm_tables.cntlConatins all the client dependent and client-independent tables listed below.

To export the tables contents, execute the following fromz:\usr\sap\trans\bin. (Or, the specify the directory locations of the control and log files.command>R3trans w export_pfm_tables.log export_pfm_tables.cntl

Check the log and verify whether the export completed successfully.

Note : List of Client Independent Tables(tpfid,tpfba,tpfht,btcomset,btcomsdl,rzllitab,rzlliclass,tsp03,tsp03c,tsp03d,txcom,t000,tbdls,tbdlst,rfcdes,rfcdoc,edimsg,tbd21,tbd22,edipo,zzifc_pathmap)

List of Client Dependent Tables(TVARUVN,VARI,VARINUM,VARID,VARIT,tbd00,tbd00t,tbd03,tbd05,tbd06,tbda1,tbda2,tbd20,tbd62,tede5,ede5t,t242d,t242i,t242s,t242y,t242a,edpp1,edp13,edp21,edp12,edipoa,edipod,ediport ZZIFC_AR_DD_UNPD,ZZIFC_FILES,ZZIFC_TARGETS)

4. Create a system messageGo to transaction SM02

5. Identify transports for post refreshUsing STMS transport history, identify the transports imported into PFM, but not PRM.This transport list will be re-imported into PFM, post refresh.

6. Copy initPRM files from PRMCopy the following files from PRM E:\oracle\ora92\database directory toPFM(bptuldbb04) E:\oracle\ora92\database,initPRM.utlinitPRM.dbainitPRM.orainitPRM.sapinitPRM.bki

7. Copy backup and archive logs files from PRMIdentify the required backup log file to restore from PRM

Copy the required .anf file from PRM (F:\oracle\PRM\sapbackup) to PFM(F:\oracle\PFM\sapbackup)Copy the backPRM.log from PRM (F:\oracle\PRM\sapbackup) to PFM(F:\oracle\PFM\sapbackup)Copy the archPRM.log from PRM (F:\oracle\PRM\saparch) to PFM(F:\oracle\PFM\saparch)

8. System refresh for 1st time, create OracleServicePRMOradim new sid PRM

9. System refresh for 1st time, Create the following OS level groups on NTORA_PRM_DBA (Add pfmadm, sapservicePFM, bp1\sapservicePFM users)ORA_PRM_OPER (Add pfmadm, sapservicePFM, bp1\sapservicePFM users)

Create Snap-Shots of SM59 R/3 connections and TCP/IP connections, once systemrestored to recreate them.

Create Snap-Shots of WE20 and WE21 information (ALE), once system restored torecreate them.Begin Refresh of PFM10. Stop SAP (CI & APP)Use SAP Management console to stop SAP in CI & APP servers

11. Shutdown OracleUse SAPDBA to shutdown Oracle

12. Stop Oracle ServicesStop the following Oracle Services, OracleOraHome92Agent OracleOraHome92TNSListener OracleServicePFM

13. Stop SAP ServicesStop the following SAP Services SAPOSCOL SAPPFM_10

14. Remove filesRemove all datafiles under I:\, J:\, K:\, and L:\. Do not remove the sapdata directories Please remove datafiles from the new driv es NOTE: if control files are saved under sapdata, do not remove the cntrl directories, but rename the CNTRL.DBF files

Remove origlog and mirrorlog files Do not remove origlog* and mirrlog*diretcories Go to G:\ and H:\ to remove files

15. Rename directories Rename the :\oracle\PFM to :\oracle\PRM Please do the same for all drives except E:\

16. Set the environment variables for the current session Go to Command Prompt Set Oracle_SID=PRM Set SAPDATA_HOME=F:\oracle\PRM Set DSMI_CONFIG=e:\usr\sap\PFM\SYS\exe\run\dsm_opt\tsmsrv3.opt Set SAPBACKUP=F:\oracle\PRM\sapbackup Set SAPARCH=F:\oracle\PRM\saparch Set SAPCHECK=F:\oracle\PRM\sapcheck Note:- Do not close the command prompt session

17. Regenerate BKI file Use the same command prompt session to execute the following commands, backint p e:\oracle\ora92\database\initPRM.utl f password Note: - Please get the password from basis pool members

18. Restore the database Use the same command prompt session to execute the following commandsbrrestore -b -d util_file -r e:\oracle\ora92\database\initPRM.utl -m full -l E Verify the restore completed successfully

19. Restore the archive logs Review the copied archive log (Step 2.1) to obtain the range of logs to restore Use the same command prompt session to execute the following commands brrestore -a - -c -d util_file -r e:\oracle\ora92\database\initPRM.utl

20. Start Oracle Service for PRMStart oracle service OracleServicePRM using computer management

21. Execute Point in Time recovery Use the same command prompt session to execute the following commands sqlplus /nolog SQL> connect / as sysdba SQL> startup mount SQL> recover database using backup controlfile until time '2004-03-19:18:00:00' (CHANGE DATE & TIME ACCORDINGLY)ORA-00279: change 76403165 generated at 03/09/2004 19:56:02 needed for threadORA-00289: suggestion: /oracle/PRM/oraarch/PRMarch1_5435.dbfORA-00280: change 76403165 for thread 1 is in sequence #5435Specify log: {=suggested | filename | AUTO | CANCEL}AUTOVerify recovery finished successfully

22. Create trace file SQL> alter database open resetlogs; Verify database opened successfully Please check the oracle alert log for more info. SQL> alter system switch logfile; [execute 10 times ] SQL> Alter database backup controlfile to trace resetlogs; SQL> shutdown Close the command prompt session.

23. Adjust the initPFM.ora file Compare the initPRM.ora with initPFM.ora and make changes accordingly. NOTE: careful adjusting all parameters (memory is not the same for source andtarget servers)

24. Edit the trace file to create control.sql Copy the trace file from usertrace directory to e:\rename Rename the old control.sql from e:\oracle Rename the new trace file to control.sql Edit the control.sql Remove all the lines before 'Create control file' line Change 'REUSE' to 'SET' Replace all occurrences of 'PRM' with 'PFM' Remove the line 'alter database open' Remove the line 'RECOVER DATABASE USING BACKUP CONTROLFILE' Save the control.sql

25. Stop Oracle Service for PRM Stop oracle service OracleServicePRM using computer management Change the startup type for service OracleServicePRM to Disabled

26. Rename Directories Rename :\oracle\PRM to :\oracle\PFM Perform the above steps for all drives except E:\

27. Start Oracle Service for PFM Start the following oracle services, OracleServicePFM OracleTNSlistener OracleOraHome92Agent

28. Rename and start DB with new name Sqlplus /nolog SQL>Connect / as sysdba SQL>Startup nomount SQL>@e:\rename\control.sql Make sure there are no errors

SQL>alter database open resetlogs

29. Execute oradbusr.sqlCopy oradbusr.sql from installation directory to e:\rename

For 4.6C system

Sqlplus /nolog @e:\rename\oradbusr.sql SAPR3 NT PFMSqlplus /nolog @e:\rename\oradbusr.sql SAPR3 NT bp1 PFM (since sapservicePFM isa domain user)

For 620 system

sqlplus /nolog @e:\rename\oradbusr.sql SAPDAT NT BPTULDBB04 PFMsqlplus /nolog @e:\rename\oradbusr.sql SAPDAT NT bp1 PFM

30. Start SAP Services (CI) Start the following SAP Services SAPOSCOL SAPPFM_10

31. Start SAP(CI) without background and spool processes. Change number of process for background and spool to 0

32. Install New SAP License (login as sap* and run tcode: slicense) Installation Number: ?????????? System ID: PFM System Number:000000000310246581 Hardware Key: ??????????? License Key: D2NT2GOIJHFMEHLLOM7ACLTL Valid to: 31.12.9999

33. Lock All users Using transaction su01, Mass changes to lock users. (all users or only selected users)

34. Set up the workbench organizer Login to client 000 as the user DDIC Go to SE06 Select Database Copy or Database Migration Click on Perform Post-Installation Actions Do you want to reinstall the CTS? YES Source System of database copy: PRM Delete TMS Configuration? YES Delete old versions of the transport routes? YES Do you want to delete the old versions of the transport routes? YES

35. Configure STMS Note:- For PFM refresh, Transport domain controller = PSM Transport Route = PSM > PFM > PRM > GRM

For PFM refresh, Login to PSM client 000 as user sap* Go to STMS Click on systems Select PFM Click on Delete Distribute and update the configuration

Now login to PFM client 000 as user sap*Go to STMS You will get a popup window. Confirm that transport domain is DOMAIN_PSM and domain controller is PSM Now click on Save

Now Login to PSM client 000 as user sap* Go to STMS Click on systems Select PFM Click on Approve Distribute and update the configuration

Now click on Transport routes Click on Change Click on Save Distribute and update the configurationPost Refresh specific activities36. Regenerate BKI file Use command prompt session to execute the following commands, backint p e:\oracle\ora92\database\initPFM.utl f password Note: - Please get the password from basis pool members

37. Start SAP(APP)Start SAP using SAP MMC in CI & APP

38. RFC Server Groups Call transaction RZ12 Delete all PRM Server groups. Double click on bp1tulap129_PFM_10 Enter parallel_generators as server group Click on Save Double click on bp1tulap130_PFM_10 Enter parallel_generators as server group Click on Save

39. Delete the old SID system statistics Using transaction ST03 delete all of the old system statistics relating to old_SID. Go to transaction ST03 Choose ->Go to ->Performance database -> Contents of DB, from the menu path. Press the Delete data group pushbutton.

40. Import table entries from table export. To import the tables contents, execute the following command from within your local c:\usr\sap\trans\bin. (Or, the specify the directory locations of the control and log files.

command>R3trans w import_pfm_tables.log u 8 import_pfm_tables.cntl

41. Import Profiles Go to RZ10 Select Utilities > Import profiles > Active servers

42. Delete the Old Profiles (Verify only due to table export/import.) Go to RZ10 Select the old(source PRM) Instance profile Click on Profile -> Delete -> All Versions -> Of a Profile Select YES to confirm Select YES to delete from the operating system Perform the same steps to delete the old START profile

43. Modify logon groups (Verify only due to table export/import.) Go to transaction SMLG Delete logon group PRM Double click on instance bp1tulap129_PFM_10 Enter PFM as logon group and click on copy Double click on instance bp1tulap130_PFM_10 Enter PFM as logon group and click on copy Click on save

44. Modify Operation modes and instances (Verify only due to table export/import.) Go to transaction RZ04 Click on Instances/Operation modes Now select the PRM CI and click on delete entry Perform the same for PRM APPTo recreate as follows Settings -> based on current status -> new instances -> generateEnter the following, (NOT needed) Hostname: bptuldbb04 SAP system number: 10 Start profile name: START_DVEBMGS10_ BP1TULAP129 Instance profile name: PFM_DVEBMGS10_ BP1TULAP129 Click on Save Enter * as operation mode Click on Save Assign WP distribution to other OP modes? NO Click on Save Perform the same for PFM APP (bp1tulap129)

45. BDLS converting logical systems 1. Convert PRMCLNT100 to PFMCLNT100 2. Convert PRMCLNT200 to PFMCLNT200 3. Convert BP_TP5_100 to BP_TI5_120 4. Convert GP1_050 to GI1_050

46. SM59 adjustments or recreation of R/3 and TCP/IP (Verify only due to tableexport/import.)

a. Adjust as per the snap-shots of pre-refresh document (logical system names,userid/password used etc)b. Any Production related setting not adjusted should be disabled (example: GP1_050)or deleted (PRMCLNT100, PRMCLNT200)

47. WE20 adjustments or recreation of ports (Verify only due to table export/import.) 1. Adjust as per the snap-shots of pre-refresh document (we20 portdefinitions) (example PRMCLNT100 to be converted to PFMCLNT100)

48. WE21 adjustments or recreation of partner type LS 1. Adjust as per the snap-shots of pre-refresh document (we21 partnerdefinitions for logical systems) (example PRM_100_IN to be converted toPFM_100_IN)

49. SP12 tempse consistency check50. SPAD consistency check of spool database

51. SPAD lock all the production printers

52. AL11 Adjust target server and target sid information DATA_ftp \\\data\\ftp DATA_inbound \\\data\\inbound DATA_outbound \\\data\\outbound DATA_tmp \\\data\\tmp

DB02 adjust tablespaces by adding datafiles through SAPDBA if needed (any tablespace >95% full needs to be looked into)

52. Import the user export to PFM client 100. Use STMS to import the user export. Go to SCC7 to complete the user import Select Schedule as Background Job

53. Perform TransportsRe-transport all CASSIS transports as per the list received from the CASSIS team.

54. Set the system change optionUsing transaction SE06 set the system change option to Not Modifiable.

55. Set the client settings Go to transaction SCC4 Click on ChangeDouble click on Client 100 Set Client-Specific Objects to No changes allowed Set Cross-Client Object Changes to No changes to cross-client Customizingobjects Change the client role to Production

56. Run SM21, ST22 for sanity check. Verify that there are no errors and dump after refresh.57. Start Online Backup Use DB13 Schedule immediate online backup58. Schedule Archive log backups and Online Backups (It should be scheduled as per the backup strategy based on data growth) Use DB13 Schedule Archive log backups Schedule Online Backups