Friday, October 1, 2010

SAP System Copy Procedure...

Here is a procedure I have put together over the years for SAP system copies.
Some of it is specific for the landscapes I setup. This one is for ECC 6.0 on SQL 2005 in Windows Server 2003, but I am sure the general procedure can be very helpful:

This document describes how to perform a homogeneous system copy of an MS SQL Server database by using the backup/restore method, or the detach/attach method in an SAP environment. The SAPinst installation tool supports both methods.

The backup/restore method and the detach/attach method have the following advantages compared to the R3load/database independent method:
  1. You can use an existing backup

  2. The process is much faster



Pre-Copy Requirements

• An SAP ECC 6.0 system, QAS, (similar to PRD in memory and disk configuration) should be installed with a valid SAP license key. (NOTE: Be certain that both the DNS name and NetBIOS name of the server are in all CAPITALS, 8 characters or less, and contain no special characters.)
• The source system should be backed up (Full Backup) and the media should be accessible from the target system.
• Perform a backup of the original QAS system to restore to in case of difficulties.
• Anything from the target that will need to be restored (user definitions, profiles, jobs, printers, RFC destinations, etc.) after the copy must be saved out. In addition, take a snapshot of the client change settings (SCC4), system change options (SE03), workbench organizer/transport system configuration (SE06), and any other setting that will need to be restored in the target system.
• Identify which transports exist in QAS but not in PRD and remind the owners that all transports which have not moved to PRD before the copy will no longer exist in QAS. Preferably, everything should be pushed through pre-copy (including LCP and CRT imports, Hot Packs, and other SAP transports associated with notes).
• Communicate to everyone that any spool data, datasets, master data, etc. which exist only in QAS will need to be moved elsewhere, printed out, or otherwise repositioned before the copy.
• Security profiles and user lists need to be repositioned so they can be recreated post-copy.
• Any external programs affected by the move (BSI, etc.) must be dealt with post-copy.

System Copy Steps

1. Create Java Export files from the source system:
  • a. Logon to the source server as an administrator

  • b. Execute sapinst.exe from the Installation Master media

  • c. Go to SAP ERP 6.0 > Software Life-Cycle Options > System Copy > MS SQL Server > Source System Export > Central System > Based on AS ABAP and AS Java > Database and Central Instance and click “Next”

  • d. Enter \PRD\SYS\profile in the Profile Directory field, and click “Next”

  • e. Enter the Administrative Password and click “Next”

  • f. Select Use database specific tools and click “Next”

  • g. Enter the backup directory you wish to use for the java migration data in the Export Location field and click “Next”

  • h. Verify the information in the Parameter Summary screen and click “Next”

  • i. The export should take 15 to 20 minutes

  • j. Copy the export directory to the Target Server for later use

2. Stop the target SAP system with the SAP Management Console
3. Make a copy of all the files in the \QAS\SYS\profile\ directory
4. Create a new backup of the source SAP system database
5. Restore the target SAP system database from the backup created in step 4. Depending on database size this can take several minutes or several hours.
6. Run the SAP-provided system copy tool:
  • a. Logon to the target server as an administrator

  • b. Execute sapinst.exe from the Installation Master media

  • c. Go to SAP ERP 6.0 > Software Life-Cycle Options > System Copy > MS SQL Server > Target System Installation > Central System > Based on AS ABAP and AS Java > Central System and click “Next”

  • d. Select Custom Parameter Mode and click “Next”

  • e. Browse to the Java Components installation media and click “Next”

  • f. Leave the default path for JDK Directory and click “Next”

  • g. Enter the target system ID (QAS) and click “Next”

  • h. Enter the Administrative Password in both fields and click “Next”

  • i. Enter the Administrative Password in both fields and click “Next”

  • j. Select Homogeneous System Copy and click “Next”

  • k. Leave the default Database Connection and click “Next”

  • l. Select Use Existing Database and click “Next”

  • m. Leave the default settings and click “Next”

  • n. Leave the default settings and click “Next”

  • o. Leave the default settings and click “Next”

  • p. Leave the default settings and click “Next”

  • q. Browse to the Migration Export copied in step 1-j and click “Next”

  • r. Enter J2EE_ADMIN in the Administrator User field, enter the Administrative Password in both password fields, and click “Next”

  • s. Leave the default settings and click “Next”

  • t. Enter the Administrative Password and click “Next”

  • u. Browse to the Kernel installation media and click “Next”

  • v. Verify the information in the Parameter Summary screen and click “Next”

  • w. Enter the Solution Manager Key and click “Next” *see appendix for generating the Solution Manager Key

  • x. Depending on system size, this may take several minutes or several hours

7. Stop the target SAP system using the SAP Management Console
8. Restore the files copied in step 3
9. Start the target SAP system
10. Cancel any production batch jobs:
  • a. Transaction SM37, enter job name, user “*”, and date range including the next day, job status “released” and click “execute”

  • b. Select the job, go to the Job menu and click “released->scheduled” 

11. Delete Source System profiles and Import the correct SAP profiles
  • a. Transaction RZ10

  • b. Go to Utilities > Import Profiles > Of Active Servers

12. Delete Source System Licenses and install the new Licenses
  • a. Transaction SLICENSE, click “New Licenses”

  • b. Select Each license and go to Edit > Delete License

  • c. Click Install and enter the path to the license key file provided by SAP in the browse field and click Open

  • d. If you are unable to install the permanent license key, it may be necessary to truncate the SAPLIKEY table first, then repeat 12-c

13. Reinitialize in the transport domain
  • a. Logon to client 000

  • b. Transaction STMS

14. (Optional) Change the login screen to reflect the correct system information
  • a. Transaction SE61

  • b. Select general text, ZLOGIN_SCREEN_INFO, change

  • c. Change the text and save

15. Change the Logical System
  • a. Transaction SCC4

  • b. Click the edit button

  • c. Double-click client 100

  • d. Change the Client Role to Test, and save

  • e. Then change the Logical System to the appropriate name, and save

16. If you are using workflow, you will need to reinitialize it 
  • a. Transaction SWU3

  • b. Execute the line items marked with a red ‘X’

17. If you are using BI, re-activate the system in RSA1 on the BI system
18. Check the BSI Tax Factory connection by executing report RPUBTCU0 from Transaction SE38. The results should show no errors. Warnings are okay.
19. Verify the Adobe Document Services connection
  • a. Transaction SM59

  • b. Edit the HTTP connection ADS

  • c. Go to the Logon & Security tab and enter the Administrative Password in the password field, and save

  • d. Transaction SE38

  • e. Execute program FP_TEST_00, print preview to test ADS connection

  • f. A simple adobe form with lines and numbers will be rendered if successful

20. Apply any necessary transports
21. Change the logical spool server to point to correct system:
  • a. Transaction SPAD

  • b. Select Display for Spool Servers

  • c. Double click SAP_PRINT SERVER

  • d. Click the change button

  • e. In the mapping field select the appropriate application server, and save

22. Lock/Unlock users as necessary, using Transaction SU01 
23. Stop and restart the SAP system 
24. Run SGEN to recompile programs and reports
25. Run BDLS to change logical system

Appendix:
- Generating a solution manager key
  • o Logon to any solution manager system

  • o Transaction SMSY

  • o Click the Other Object…

  • o In the System field, type in QAS

  • o Click the Generate Installation/Upgrade Key

  • o Verify the information is correct and click on Generate Key

  • o Copy the Installation/Upgrade Key for use in step 6-w

- The target system is installed using the exports from the source system - On the SAPinst screen SAP SystemDatabase make sure to select Homogeneous System Copy (MS SQL Server-specific: Detach/Attach or Backup).
- For more information about the system copy procedure, see also SAP Notes 193816 and 151603.

- With SQL Server, you can use backup images across the platforms I386, IA64, x64. That is, you can make a backup on one type of platform and use it on another type.

- You can only attach SQL Server 2000 files to SQL Server 2005 but not vice versa.





I hope this helps...