SAP System Refresh:


          Copy of existing system (PRD) to another existing system (QAS). System refresh means copying the production (PRD) data on to the quality (QAS) to test the real data.
Process:
1. PRE STEPS
2. DB REFRESH
3. POST STEPS
Overview of refresh:
Pre Steps on the Target system (In this case it is QAS). It is required to keep the dependencies of the target system to restore them later i.e. after refresh.
Ex: After Refresh, the target system QAS behaves like production System. Se we need to delete the source dependencies and restore the target dependencies, Users, RFC Connections, Batch Jobs, License, Printers, and Roles etc.
  1. Take a copy of them using transport requests, screen shots etc.
  2. Delete the entire SAPDATA files from target QAS System
  3. Backup and generate the control file from source system PRD.
  4. Restore the database from Tape or Disk.
  5. Create Control file with new database structure of QAS after modifying S_SID with T_SID.
  6. Make the BTC Processes to zero (0) so that no background job is trigger
  7. Start the system and restore the target dependencies (post-activities)

Pre-refresh activities:

  1. Create the transport of copies by using SE01 and specify the following objects/ tables USR01, USR02, RFCDES and TBDLS and then we need to release the Transport of Copies.- Copy the cofiles & datafiles in usr\sap\sid\trans
  2. Take the screen shots of SM59, BD54, DB13, SM37, AL11 (All the SAP Directories), WE20 (IDOCS), SMLG, RZ12 (RFC SERVER GROUPS), RZ70 (In order to populate the backend system details to SLD), RZ04 (Operation Modes) SCC4, SPAM.
  3. Then, we need to delete all the data files related to QAS system. sapdata1, sapdata2 etc. First, we need to stop the oracle services. The structure should remain same. Directories like sapdata1... sapdata...n, MirrorlogA/B, OriglogA/B

Actual Refresh activities: 


Performing Refresh Activity on Database of PRD (Source)

Coming to Production (PRD), 

  1. Take offline backup (located under \orcale\PRD\sapbackup\<filename>.afd. Copy <filename>.afd and paste in \oracle\QAS\sapbackup structure folder of QAS system and generate control file by following command SQL> alter database backup controlfile to trace. Find the trace file in the following location “D:\oracle\PRD\saptrace\usertrace”. Check the latest file that is-generated.
  2. Copy that file and paste it onto the Desktop of QAS system. Modify the file as following                            Rename the file to control.sql.
    Remove all the content above the line STARTUP NOMOUNT and below CHARACTER SET URF8 
    Replace NORESETLOGS with RESETLOGS.
    Replace ARCHIVELOG with NOARCHIVELOG. 
    Replace Source <SID> with Target <SID>
    In addition, copy paste (control.sql­) in \oracle\QAS\sapbackup.
  3. Open the .afd backup file (Ex. bdjvujux.afd) present in sapbackup directory. Replace the PRD with the QAS and save it.
  4. Now, restore the database
    Check the presence of the  paths for the creation of the control files oracle\oracle\QAS\origloga\cntrl
    \oracle\QAS\origlogb\cntrl
    \oracle\QAS\sapdata1\cntrl
    If one of these paths is not present, create it.
  5. Start the services of Oracle.
    OracleServiceQAS
  6. Start the database entering the command
    Startup nomount;
  7. Login to sql from the location where the control.sql file is located.
    In our case, \oracle\QAS\sapbackup, Run

    @control.sql
  8. After the control file created, the Oracle is in Mounted state.
    Select status from v$instance;
  9. Execute,
    Alter database open resetlogs;
    Now dB is in open status.
  10. Execute,
    Select username from dba_users;
    You can view the PRD OPS$ users
  11. Now, copy ORADBUSR.SQL file from installation folder copy to sap backup directory and run.
     You can find in C:\Program Files\sapinst_instdir\ERP\SYSTEM\ORA\CENTRAL\AS.
  12. Execute the ORADBUSR.SQL file from the same location (\oracle\QAS\sapbackup\) from SQL
    @ORADBUSR.SQL
  13. Now, check again with the 10th step command.
    Select username from dba_users;
  14. Now, drop users of PRD system. Check again and confirm
    Drop user <username>cascade;
  15. Execute,
    grant connect to “OPS$Hostname/SIDADM”;
    grant sapdba to “OPS$Hostname/SAPSERVICESID;
    grant dba to “OPS$Hostname/SIDADM”;
    grant dba to “OPS$Hostname/SAPSERVICESID;

Post refresh activities:


  1. Make the Batch Work Processes to zero (0). Set the parameter rdisp/wp_no_btc=0, so that no background job is trigger
  2. Set the parameter rdisp/btctime=0, so that jobs are not picked up by the scheduler.
  3. Start sap system and login with sap* user
  4. Install SAP license
  5. Delete/recreate TMS for target system using SE06
  6. Configure SAP transport system (using STMS)
  7. Import transports related to AL11, SE03, SMLG, RZ12, SM59, SALE and SM69 backup (which was done as part of pre-refresh steps)
  8. Run transaction BDLS to change Logical System names.
  9. Delete old SAP profiles and import new profiles using RZ10 transaction
  10. Schedule only standard background jobs in SM36.
  11. Schedule RDDIMPDP job.
  12. Upgrade Kernel if required.
  13. Perform mail configuration using SCOT transaction
  14. Delete old mail related entries using SOST transaction.
  15. Make necessary services active through SICF transaction
  16. Execute SGEN transaction


No comments:

Post a Comment