SAP SystemRefresh
SAP SystemRefresh
JULY 24
1
SYSTEM REFRESH
System Refresh in SAP HANA system
What is Refresh?
In a few words, system refresh is simply copying one SAP system to another when the target SAP system already exists.
This is similar to a system copy, where the process involves copying the production system (PRD) to the quality assurance (QA or QAS) and/or development (DEV) systems.
Its main purpose is to provide updated data for testing purposes, as well as to facilitate major system upgrades. This is typically done to ensure that non-production systems (i.e.,
Testing, DEV, and QA environments) are aligned with the production system in terms of data and configuration.
One example would be copying the source PRD SAP system to a QAS SAP system. SAP has tools to back up your source system, database clone, or with R3load for ABAP and
Jload for JAVA.
The exact steps and complexity of an SAP system refresh can vary depending on the specific SAP landscape and the organization's requirements, but here is a general overview
of the traditional process.
SAP recommends organizations to perform this process every 3 months. Regular system refreshes are recommended to ensure that the overall data remains consistent and accurate.
It can even help identify and resolve data integrity issues that may have arisen due to system usage.
Figure 1:
System Refresh Manual Process
What’s involved in a manual System Refresh process?
• Planning and Preparation: This involves identifying the involved systems, such as the source (the production system) and the non-production target (quality
assurance, development), determining the scope of the refresh, and which data and configurations need to be copied from the production system to the target system,
and ensuring that the involved systems are backed up to minimize the risk of data loss
• Data Export (Production System): Export the relevant data from the production system. This usually includes data from databases, file systems, and SAP
application data.
• Data Transfer to Target System: Transfer the exported data to the target system. This usually involves copying databases, files, and SAP-specific data
directories.
• Configuration Transfer: Copy the configuration settings and parameters from the production system to the target system. This usually includes SAP profiles,
instance profiles, and any custom configurations.
• Perform System Refresh Activities in Target System: These include restoring the database to match the state of the production system at the time of the
export and applying necessary patches or support packages
• Perform Post-Refresh Activities: Such as validating the data and configuration in the target system to ensure that they match the production system
accurately, and performing tests (if necessary) to ensure that the refreshed system behaves as expected
So, in a single word System refresh is nothing but copying an SAP system to another.
Let us say the system from which copy is being done is called as source system and system in which data to be copied as target system.
System refresh activity comprises of following 3 phases
2
• Pre refresh activity
• Refresh activity (Database restoration)
• Post refresh activity
Pre-refresh Activity:
3
• Check space in /Hana/shared/, /Hana/log/, /Hana/Data/,
/usr/sap/trans, /usr/sap, /Hana/backup (if backup file stores in
local filesystem
• Copy the Backup file from source to Target system if files are
stored in local filesystem Backup folder.
• If files are stored in 3rd party tool, then request for the specific
date and time backup file to the Backup Team to place in your
mentioned Target system local folder.
• If additional space required in local file system, check with your OS
or Cloud Team to add space.
7. Shutdown the Target System Ensure that the target system is shut down.
Capture screenshot of all the SAP and Hana services running/stopped
screenshots before stopping and after stopping.
8. System Message Put a system message before a week of your activity, so that all the end user
will get notify as system will be not available due to System refresh activity
“FROM” date to “TO” Date.
SCC8 transaction can be used for export of user master and authorization profiles in SAP system.
Please login to target system and go to SCC8 tcode. SAP_USER profile to be used to export user master and authorizations in SAP system.
So, please select profile as SAP_USER and input the correct target system and target client in which user master needs to be imported later.
4
and execute
5
We should follow above process and export users from all clients that are available in SCC4. User master export may not be required for clients 001 and 066 (as these are
standard clients).
Please make note of which Export contains which client’s user data so that you can import them later again (as part of post refresh steps).
If we have backed them up in a transport request, it is easy for us to import them later in the target system. If we haven’t backed them up, we may have to
manually create all these entries which will be a tedious and time-consuming task. So, we have to backup all these entries.
In the backend, all the above configurations will be stored in specific tables. If we can identify and include those tables in a transport request and export, then
we can import it back whenever these settings are required during post refresh.
We need to create a transport request of type “Transport of Copies” to serve this purpose
To create the same, Go to SAP transaction SE01 à Create Request à select Transport of Copies
6
Click on Green Check Mark in the above screen.
Please provide Short Description for the transport request (in the above screen) and input the appropriate client in Target. Other fields will get populated
automatically.
Double Click the transport number and add the tables information (highlighted in yellow in the below paragraph) in the respective columns of the transport
request. After that, these configurations can be imported in post refresh stage.
7
R3TR TABU USER_DIR Keys *
8
Include all the above tables details in the transport request and save.
NOTE: Please make sure to release this transport before the refresh starts. Otherwise the cofile and datafile will not generated and you will not be able to
import this transport later. If we can’t import request, then we may have to create/maintain all these configurations manually which will be tedious and
complex task.
Use the HANA studio backup studio to take a complete DB backup either at the disk level or using Backint.
Usually this should be sufficient to perform a DB Refresh but if you are looking for a point in time recovery you may want the backups from the log area as well to include
them post the recovery.
Once the backup is completed you will have to move the backup to a location in the target system , you should have 4 separate files with the your backup prefix . In this case
the prefix is “COMPLETE_DATA_BACKUP_20122015” .
1. Using HANA Studio recover the source database in the target HANA box.
2. Shutdown SAP servers and do a cleanipc
3. Open HANA Studio and right click on the SID (target) where you want to perform the recovery.
4. Login to Hana Studio of QAS system with ID “SYSTEM” user or any other backup restore privilege user.
5. Go to Backup and recovery option.
9
6. From there select recover system option. Once you select this option database will shut down to process recovery.
7. Once the system got shut down, recover screen will open. Kindly select the option based on your requirement. Since I am doing
refresh from PRD to QAS with Data backup. I selected the Last option.
10
8. If you want to back up from the specific path where the data file is stored, select option “Specify backup without catalog”.
11
9. Now provide the backup path and the same backup prefix name there in the “Backup Data file”.
12
10. Now Provide the New license key path or you can skip this option and you can update license after recovery.
13
11. Make sure the backup file copied from the PRD system have proper permission of QAS system.
12. Once the recovery completed successfully, the database will start automatically. Make sure all services are running in HANA DB.
6. Start SAP servers After changing all the things in Application server, start the SAP using cmd
STARTSAP R3”.
7. Start sap system and login with sap* user
8. Install SAP license • In SAP environment, there will be a requirement to install a license to a
new installed SAP system or to a system refreshed from another system.
• This is the primary step in the post refresh activities of an SAP system.
SAP license key can be requested from Service Marketplace from the
following link: "http://me.sap.com/licensekey
• Download license key for an SAP system and store in your local desktop.
• Once the license files are downloaded from market place, login into 000
client using SAP* user of an SAP system on which you would like to
apply license.
• Execute transaction SLICENSE to apply the license.
• Click on “Old Licenses” tab to list old licenses existing in the system.
• Select each license and delete license by navigating. Repeat this step
until all old licenses are deleted.
• To install new license, click on install button. This provides the file
manager, navigate to the location where license file that was downloaded
14
from marketplace was kept in your desktop and select the file and click
open to input the license file.
• It then displays message after successful installation of license key.
9. Prevent batch job from running by setting all jobs from • After system refresh, you may have to hold jobs from execution in target
released to scheduled (using SM37) system because the target system consists of source system jobs and they
shouldn’t run.
• So, it is suggested to hold all the jobs from execution and release only
required jobs and basis standard jobs (housekeeping jobs).
• Sometimes, there might be duplicate schedule of same job and you want
to hold the duplicate job to prevent multiple executions.
• In these cases, to hold the jobs to prevent from execution, we need to set
the status of those jobs from “Released” to “Scheduled”.
Steps: -
• Execute SM37.
• Keep * in the user field and job field.
• Select only RELEASED jobs ---- Execute.
• All the jobs which are released will be displayed.
• Select the job ->go to the JOB tab in menu -> click on Released ->
Scheduled.
• Then all the selected jobs status will be set as “Scheduled” and those
jobs won’t get executed till you release them again.
10. Delete/recreate TMS for target system using SE06 • Deleting and recreating the TMS configuration for the target system using
SE06 after a system refresh is a critical step to ensure the integrity,
consistency, and accuracy of the transport landscape in SAP.
• It helps prevent transport-related issues and ensures smooth operation of
the TMS in the refreshed system landscape.
• By recreating the TMS configuration, you have the opportunity to
redefine and recreate transport routes between systems in the landscape.
• This ensures that transport routes are correctly configured to facilitate
the movement of transport requests between systems in the refreshed
landscape.
• Do not delete the STMS configuration or transport routes if the domain
controller for the source and target is same.
11. Import user master for all clients (which was done as part Steps:
of Pre-refresh steps)
• Login to target system (ex: QAS).
• Execute STMS. * Go to Import queue of QAS.
• Add that transport request which was generated before refresh activity
and import it. Then perform post processing using SCC7.
12. Import transports related to AL11, SE03, SMLG, RZ12, • The import queue in the target system retains all the released transport
SM59, SALE and SM69 backup (which was done in pre-refresh requests that were present before the system refresh.
steps) • These requests remain in the queue with their statuses and contents
preserved.
• Import the Released Transport Request in QAS system.
13. Execute BDLS transaction • BDLS is used for LOGICAL System Name conversion after System Refresh
activity.
• In BDLS Conversion, Production Logical System Name is changed to
Quality Logical System Name.
Example:
If we are doing refresh from PRD Client 850 to QAS Client 850 then we
need to run BDLS for PRDCLNT850 –> QASCLNT850
14. Delete old SAP profiles and import new profiles using RZ10 After system refresh, the target system will have SAP profiles of source system.
transaction So, we need to delete the old profiles and import new SAP profiles of the target
system.
How to delete existing SAP profiles after system refresh?
15
Perform this for all the old profiles.
Go to RZ10 transaction and navigate to Utilities tab -> Import Profiles -> Of active
servers.
This will import all the profiles of active servers in the SAP system.
Go to transaction RZ10 and navigate to Utilities tab -> Check all profiles -> Of
active servers.
This will display profile check log with details of any inconsistencies.
15. Perform spool consistency check using SP12 transaction Performing a spool consistency check helps detect any inconsistencies, errors, or
discrepancies in the spool system configuration, such as missing devices, incorrect
printer definitions, or unresolved print requests.
Ensure that print requests are processed accurately and output documents are
delivered to the intended destinations without errors.
Steps:
Execute SP12.
After the check is completed, the system will display the results, indicating any
inconsistencies, errors, or warnings detected during the process.
16. Delete old update records using SM13 transaction Deleting old update records helps optimize system performance by reducing the
volume of data stored in the database tables.
17.Delete/Reorganize transaction RFC’s using SM58 • During a system refresh, RFC entries from the source system may be
transaction copied to the target system's transaction RFC queue.
• These entries could be no longer relevant in the target system
environment.
• Deleting or reorganizing these RFC entries ensures that only valid and
necessary entries remain in the queue.
• The presence of unnecessary RFC entries in the transaction RFC queue
can increase system overhead and resource consumption, including
database space, memory usage, and processing time.
• Deleting or reorganizing RFC entries helps minimize system overhead and
ensures that system resources are used effectively.
18.Delete/Reorganize Inbound/Outbound queues using • Go to txn: SMQ1, you can press F5 (or Edit -->Select All) and then click
SMQ1/SMQ2 transaction on Delete Icon.
• Go to txn: SMQ2, you can press F5 (or Edit -->Select All) and then click
on Delete Icon.
19. Delete batch job logs by executing RSBTCDEL report using • Deleting old batch job logs removes unnecessary data, freeing up storage
SE38 transaction space and optimizing system performance.
• This helps to optimize system performance, ensure data privacy and
compliance, and facilitate effective log management in SAP environments.
20. Delete Old spool requests by executing RSPO0041 report • The accumulation of old spool requests can consume significant database
using SE38 transaction resources and impact system performance.
• Deleting old spool requests frees up database space and improves system
performance by reducing the load on the database server.
21. Create/modify necessary partner profiles using WE20 • SAP Transaction WE20 (Partner Profile) is used in SAP for managing
transaction partner profiles and communication settings.
• It allows users to create, change, and display partner profiles, which
define the communication parameters and settings for exchanging data
with external partners (such as customers, vendors, and banks) in various
SAP modules.
16
• Partner profiles play a crucial role in ensuring the integrity and
reliability of data exchange processes between SAP systems and external
partners.
• By creating or modifying partner profiles after a system refresh,
organizations can maintain data exchange integrity and minimize the risk
of communication errors or data inconsistencies.
22. Modify necessary ports using WE21 transaction • SAP Transaction WE21 (Port Maintenance) is used to configure
communication channels in SAP systems.
• It allows users to define various ports and their associated parameters to
establish connections with external systems.
• WE21 is essential for integrating different systems and enabling seamless
data exchange, ensuring smooth business processes and efficient
information flow.
• You can also create transport request with we20 and we21 tables and
import them after the system refresh.
23. Perform mail configuration using SCOT transaction • Configuring mail settings in SCOT is essential to ensure the reliable
delivery of emails from the SAP system to external recipients and vice
versa.
• It allows administrators to specify the SMTP (Simple Mail Transfer
Protocol) server and other mail parameters required for sending and
receiving emails.
24. Delete old mail related entries using SOST transaction • Old mail-related entries in the SOST transaction can clutter the user
interface and make it difficult to find relevant information.
• By deleting outdated entries, users can navigate the SOST transaction
more efficiently and focus on managing current mail requests and
messages.
25. Execute SGEN transaction or run RSGENINVLAS report (no Executing SGEN or RSGENINVLAS helps regenerate ABAP load objects, such as
variant is required) using SE38 executable programs, function modules, and classes, to ensure optimal system
performance.
26. Make necessary services active through SICF transaction • This is essential for enabling web-based functionalities, supporting
integration scenarios, enabling external access, facilitating Fiori
applications, enhancing user experience, and ensuring compliance with
security policies in SAP environments.
• It ensures that the SAP system is accessible and functional for users,
partners, and external systems in the updated system landscape.
Let's say our target host is host01, the source SID is PRD, the system number is 00, and the source schema is SAPPRD with the password sapprd#!
The above example is for the Unix system for Windows its a bit different (Refer SAP Note 1709838)
Execute a hdbuserstore list you should find the new Key set as below
KEY DEFAULT
ENV:host01:30015
User: SAPPRD
17
This confirms that the key is set .
Schema Change:
Go to HANA Studio, and the contents should be visible under Catalog and Contents. Under Catalog, you should also discover the source Schema.
Before we start the apps on the target system, there is one more thing that needs to be done.
Modify the /dbs/hdb/schema to SAPPRD (or whatever your source schema is) in the DEFAULT profiles.
BDLS execution:
BDLS is used for LOGICAL System Name conversion after System Refresh activity.When we refresh our quality system (QAS) from Production system (PRD)
then in Quality system production system entries come in database that need to changed with Quality system’s entry in order to Quality system work properly .
BDLS conversion is mandatory step in Post System Refresh Steps ,In BDLS Conversion ,Production Logical System Name is changed to Quality Logical System Name.
Example:
If we are doing refresh from PRD Client 300 to QAS Client 300 then we need to run BDLS for
PRDCLNT300 –> QASCLNT300
First you can execute in test mode by selecting Test run then you can analyze the result to see how many entries are getting
converted.
For actual run – Deselect test run check box and execute in background.
Which all system entries should be converted in BDLS
Go to Quality system – and execute transaction WE20 to check partner profile.
Open Partner Type LS and here you’ll find production entries of partner system of production which have come now in QAS after System refresh so all the Production
Partner Logical System Entries need to be converted with respected quality systems’ logical name.
18
Where to Check Logical System Name
You can check Logical System Name entries in BD54 transaction.
How to verify BDLS after execution
• Check BDLS job status from SM37 and from spool of BDLS background job ,you can get status of BDLS execution.
• Check SCC4 -Now it has QAS entry
• Check We20- Now it has quality system’s Partner Logical Name.
SAP Profiles IMPORT:
Generally, we import SAP profiles under 2 circumstances:
• After new SAP system installation (as part of post installation steps)
• While performing system refresh activity (as part of post refresh steps)
After system refresh, the target system will have SAP profiles of source system. So, we need to delete the old profiles and import new SAP profiles of the target
system.
To delete existing profiles of SAP system, go to transaction RZ10 and select the profile to be deleted as shown below:
19
After selecting the profile to be deleted, navigate to Profile -> Delete -> All Versions -> Of a profile (as shown below). This will delete the profile
Please carry out above step for all the old profiles (Default, Start profiles, Instance profiles) that are existing in the system and delete all of them
How to import SAP profiles (as part of post installation / post refresh steps)?
RZ10 tcode is used for importing SAP profiles. Go to RZ10 transaction and navigate to Utilities -> Import Profiles -> Of active servers (as shown below)
20
This will import all the profiles of active servers in the SAP system and below profile check log will be displayed. This log contains details whether all profiles are
imported correctly or not.
To check consistency of all profiles of active servers, we have go to transaction RZ10 and
navigate to Utilities -> Check all profiles -> Of active servers
This will display profile check log with details of any inconsistencies.
21
22
Step -2:
Go to STMS
23
Step -3:
Highlight the transport request and click on the truck symbol to import overview -> continue.
Step -4:
Choose TR in sequence for import in STMS.
Step -5:
After successful import, run the client import post processing in SCC7.
Client import postprocessing (SCC7)
You need to perform postprocessing activities to adapt the runtime environment to the current state of the data.
Choose -> Administration -> System Administration -> Administration -> Client Admin. ->Client Transport ->Import Editing.
24
Request <S-SID>KO<number> will hold the cross-client data
Request <S-SID>KT<number> will hold the client dependant data,
Request <S-SID>KX<number> will also hold some client dependant data.
Note:- The system automatically detects these are client export transport requests and automatically performs the import of the 3 requests.
Step -6:
Goto SCC7->Select the TR no -> click “ Schedule as Background job”-> select background server -> click on immediately->click on continue.
25
26
The log will be available in SCC3 Tcode.
Important Note: - It may be technically possible to start the transaction SCC7 in the source client, but you should not do so because it may cause data loss. You
should protect the source client from overwriting by the client copy tools by choosing protection level 1 in transaction SCC4.
Do not use the same client as the source for several copies or client transports at the same time.
27