Você está na página 1de 18

SAP System Refresh Procedure Document for SAP

R/3 on Windows/Oracle platform.


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 SID
PFM = Target System SID
bp1tulap131 = Source System DB
bp1tulap132 = Source System CI
bp1tulap132 = Source System Application
bp1tulap113 = Intermediate System for Export Storage.
bp1tulap129 = Target CI
bp1tulap130 = Target DB
Prerequisites:
1. Windows login access on Host
2. Checking OS level configuration i.e. <sid>adm, ora<sid> users, environment variable settings
3. Checked /Create and map filesystem same as of Source System
4. Downtime approval for Destination System copy process
5. Verification of file systems
6. Prepare SAP System for system copy-Prechecks
7. Online database backup of Source System
8. Create backup control file of Source System
9. Edit Control file with Target System
10. Checked all required passwords (System, DDIC etc) of Source systems
11. Taking backup of target system configuration
12. Backup RFC Entries /SE09
13. Export User Master /SE09
14. Export Logical System Connections / SALE /SE09
15. Save Logon Groups - SMLG
16. Export STMS_QA worklist tables / SE09
17. Save RFC Groups RZ12
18. Take Screen Shot of BD54
19. WE20 / Partner Profile
20. WE21/ Note Each tRFC
21. SLICENSE /Installed licenses
22. SCC4 /Client Details
23. Offline Backup + File system backup of Target system
BASIS Prerequisites
1. Start Online backup in PRM (Source System)
Use transaction DB13 to schedule
Schedule 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_USER
Target System: PFM
Click on Start Immediately
Take note of the request number.

If above method does not work do the following.

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











3. Execute table export of PFM client 100.

Map \\<<PRM HostName>>\e$ to Z: drive on <<PSM Host Name >> Ensure the scripts
export_pfm_tables.cntl and import_pfm_tables.cntl Conatins all the client dependent and client-
independent tables listed below.

To export the tables contents, execute the following from z:\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,tbdl
s,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,tb
da2,tbd20,tbd62,tede5,ede5t,t242d,t242i,t242s,t242y,t242a,edpp1,edp13,edp21,edp12,edi
poa,edipod,ediport ZZIFC_AR_DD_UNPD,ZZIFC_FILES,ZZIFC_TARGETS)









4. Create a system message
Go to transaction SM02

5. Identify transports for post refresh
Using 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 PRM
Copy the following files from PRM E:\oracle\ora92\database directory to PFM(bptuldbb04)
E:\oracle\ora92\database,
initPRM.utl
initPRM.dba
initPRM.ora
initPRM.sap
initPRM.bki

7. Copy backup and archive logs files from PRM
Identify 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 OracleServicePRM
Oradim new sid PRM

9. System refresh for 1st time, Create the following OS level groups on NT
ORA_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 system
restored to recreate them.

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

11. Shutdown Oracle
Use SAPDBA to shutdown Oracle

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

13. Stop SAP Services
Stop the following SAP Services
SAPOSCOL
SAPPFM_10

14. Remove files
Remove 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<SID>.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 <Drive>:\oracle\PFM to <Drive>:\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 commands
brrestore -b <backuplog.anf> -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 <start_log#>-<end_log#> -c -d util_file -r
e:\oracle\ora92\database\initPRM.utl








20. Start Oracle Service for PRM
Start 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 thread
ORA-00289: suggestion: /oracle/PRM/oraarch/PRMarch1_5435.dbf
ORA-00280: change 76403165 for thread 1 is in sequence #5435
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO
Verify 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 and target
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 <Drive>:\oracle\PRM to <Drive>:\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.sql
Copy oradbusr.sql from installation directory to e:\rename

For 4.6C system

Sqlplus /nolog @e:\rename\oradbusr.sql SAPR3 NT <DB server name> PFM
Sqlplus /nolog @e:\rename\oradbusr.sql SAPR3 NT bp1 PFM (since sapservicePFM is
a domain user)

For 620 system

sqlplus /nolog @e:\rename\oradbusr.sql SAPDAT NT BPTULDBB04 PFM
sqlplus /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 configuration
Post Refresh specific activities
36. 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 APP
To recreate as follows
Settings -> based on current status -> new instances -> generate
Enter 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
table export/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 port definitions) (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 partner definitions for logical
systems) (example PRM_100_IN to be converted to PFM_100_IN)

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






51. SPAD lock all the production printers

52. AL11 Adjust target server and target sid information
DATA_ftp \\<target server>\data\<target sid>\ftp
DATA_inbound \\<target server>\data\<target sid>\inbound
DATA_outbound \\<target server>\data\<target sid>\outbound
DATA_tmp \\<target server>\data\<target sid>\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 Transports
Re-transport all CASSIS transports as per the list received from the CASSIS team.

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







55. Set the client settings
Go to transaction SCC4
Click on Change
Double click on Client 100
Set Client-Specific Objects to No changes allowed
Set Cross-Client Object Changes to No changes to cross-client Customizing objects
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 backup
58. 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

Você também pode gostar