system_refreshhh.docx

Embed Size (px)

Citation preview

  • 7/30/2019 system_refreshhh.docx

    1/21

    SAP System Refresh

    Procedure Document

    01:19

    Posted by Enter22

    SAP System RefreshProcedure Document

    for SAP R/3 onWindows/Oracleplatform.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

    http://www.sapadminhelp.com/2012/06/sap-system-refresh-procedure-document.htmlhttp://www.sapadminhelp.com/2012/06/sap-system-refresh-procedure-document.htmlhttp://www.sapadminhelp.com/2012/06/sap-system-refresh-procedure-document.htmlhttp://www.sapadminhelp.com/2012/06/sap-system-refresh-procedure-document.html
  • 7/30/2019 system_refreshhh.docx

    2/21

    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. adm, ora 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-Prechecks7. 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 - SMLG16. 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 Prerequisites1. 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

  • 7/30/2019 system_refreshhh.docx

    3/21

    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 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.cntl Conatins all the client dependent and

    client-independent tables listed below.

    http://3.bp.blogspot.com/-HKAUSjPH9AE/T9L5soXU-pI/AAAAAAAACL8/mRTlrGHdC4k/s1600/System+Copy_05.jpg
  • 7/30/2019 system_refreshhh.docx

    4/21

    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,e

    dipoa,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

    http://1.bp.blogspot.com/-UftoyhjXiYI/T9L6eVkWKUI/AAAAAAAACME/kJbwJdVUlYY/s1600/System+Copy_06.jpg
  • 7/30/2019 system_refreshhh.docx

    5/21

    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 PFM10. 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

  • 7/30/2019 system_refreshhh.docx

    6/21

    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 cntrldirectories, 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

  • 7/30/2019 system_refreshhh.docx

    7/21

    18. Restore the database

    Use the same command prompt session to execute the following commands

    brrestore -b -d util_file -r e:\oracle\ora92\database\initPRM.utl -m full

    -l E

    Verify the restore completed successfully

    http://1.bp.blogspot.com/-dB0nvlSOJjA/T9L8W4ZR_VI/AAAAAAAACMM/yzNDY86YM2c/s1600/System+Copy_07.jpg
  • 7/30/2019 system_refreshhh.docx

    8/21

    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 commandsbrrestore -a - -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 commandssqlplus /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

    http://3.bp.blogspot.com/-HS8uKaAiqIA/T9L9CD0noII/AAAAAAAACMc/zS7kZ-jh2Kw/s1600/System+Copy_09.jpghttp://3.bp.blogspot.com/-Z-sRZd6hN5M/T9L8rB_CkKI/AAAAAAAACMU/WuCdEn3cJbE/s1600/System+Copy_08.jpghttp://3.bp.blogspot.com/-HS8uKaAiqIA/T9L9CD0noII/AAAAAAAACMc/zS7kZ-jh2Kw/s1600/System+Copy_09.jpghttp://3.bp.blogspot.com/-Z-sRZd6hN5M/T9L8rB_CkKI/AAAAAAAACMU/WuCdEn3cJbE/s1600/System+Copy_08.jpg
  • 7/30/2019 system_refreshhh.docx

    9/21

    ORA-00289: suggestion: /oracle/PRM/oraarch/PRMarch1_5435.dbf

    ORA-00280: change 76403165 for thread 1 is in sequence #5435

    Specify log: {=suggested | filename | AUTO | CANCEL}

    AUTO

    Verify recovery finished successfully

    http://2.bp.blogspot.com/-BFUXq-U0AF8/T9L9mgttnSI/AAAAAAAACMk/b1lEcNMD2FY/s1600/System+Copy_10.jpg
  • 7/30/2019 system_refreshhh.docx

    10/21

    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.sqlCopy 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

  • 7/30/2019 system_refreshhh.docx

    11/21

    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

    http://3.bp.blogspot.com/-rWWeJ2mVesk/T9MAClJz_SI/AAAAAAAACMs/ncgR93oK5mA/s1600/System+Copy_11.jpg
  • 7/30/2019 system_refreshhh.docx

    12/21

    http://4.bp.blogspot.com/-70W2h_U4AWo/T9MATjeIdUI/AAAAAAAACM0/vp_6hMb7mno/s1600/System+Copy_12.jpg
  • 7/30/2019 system_refreshhh.docx

    13/21

    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 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 organizerLogin 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

  • 7/30/2019 system_refreshhh.docx

    14/21

    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

    http://4.bp.blogspot.com/-FAVNRsNCC3Y/T9MBWhKEXVI/AAAAAAAACM8/Zlm0Okrljlk/s1600/System+Copy_13.jpg
  • 7/30/2019 system_refreshhh.docx

    15/21

    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

    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

    http://1.bp.blogspot.com/-fevFmnCc8vk/T9MCT1u6t5I/AAAAAAAACNE/0MAWLAQPksw/s1600/System+Copy_15.jpg
  • 7/30/2019 system_refreshhh.docx

    16/21

    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

  • 7/30/2019 system_refreshhh.docx

    17/21

    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 PRMDouble 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

    http://1.bp.blogspot.com/-meg3IOR74ZY/T9MD5KfGjEI/AAAAAAAACNU/cYXwmjOZNjM/s1600/System+Copy_17.jpghttp://3.bp.blogspot.com/-lSQCXp58lw8/T9MDUI8GZLI/AAAAAAAACNM/rViYE-LPu9w/s1600/System+Copy_16.jpghttp://1.bp.blogspot.com/-meg3IOR74ZY/T9MD5KfGjEI/AAAAAAAACNU/cYXwmjOZNjM/s1600/System+Copy_17.jpghttp://3.bp.blogspot.com/-lSQCXp58lw8/T9MDUI8GZLI/AAAAAAAACNM/rViYE-LPu9w/s1600/System+Copy_16.jpg
  • 7/30/2019 system_refreshhh.docx

    18/21

    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 followsSettings -> 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

  • 7/30/2019 system_refreshhh.docx

    19/21

    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

    http://3.bp.blogspot.com/-3XCdDgRnOgo/T9MFVTtUtMI/AAAAAAAACNc/PtD63gXtPOg/s1600/System+Copy_18.jpg
  • 7/30/2019 system_refreshhh.docx

    20/21

    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 \\\data\\ftp

    DATA_inbound \\\data\\inbound

    DATA_outbound \\\data\\outboundDATA_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 importSelect Schedule as Background Job

    53. Perform Transports

    http://2.bp.blogspot.com/-_9mGUi4MLZQ/T9MGfAerYgI/AAAAAAAACNs/tl3VOuiZCYc/s1600/System+Copy_20.jpghttp://4.bp.blogspot.com/-zAd5kO5Ly7w/T9MF6Odim3I/AAAAAAAACNk/WstoNAAhxIY/s1600/System+Copy_19.jpghttp://2.bp.blogspot.com/-_9mGUi4MLZQ/T9MGfAerYgI/AAAAAAAACNs/tl3VOuiZCYc/s1600/System+Copy_20.jpghttp://4.bp.blogspot.com/-zAd5kO5Ly7w/T9MF6Odim3I/AAAAAAAACNk/WstoNAAhxIY/s1600/System+Copy_19.jpg
  • 7/30/2019 system_refreshhh.docx

    21/21

    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 settingsGo 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 BackupUse 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

    http://4.bp.blogspot.com/-ZCgl9ukkZx8/T9MGsSXWapI/AAAAAAAACN0/YoXDQTKDoIs/s1600/System+Copy_21.jpg