Вы находитесь на странице: 1из 33

System Copy for Clustered SAP Systems.

System Copy for Clustered SAP Systems.

Prepared By Chris Kernaghan 19th July 2004

Chris Kernaghan

Page 1 of 33

28/01/2012

System Copy for Clustered SAP Systems. System Copy for Clustered SAP Systems..............................................................................1 Initial System Build before database cutover.........................................................................3 Oracle Database Cutover .......................................................................................................4 Setting up Database Users and License Keys.......................................................................15 Changing RFCs for new destinations..................................................................................25 Appendix A...........................................................................................................................27 Appendix B...........................................................................................................................31

Chris Kernaghan

Page 2 of 33

28/01/2012

System Copy for Clustered SAP Systems. This procedure is taken from several sources, the R3copy note (147243), the Oracle 9i Database upgrade guide, and the 4.7 Enterprise installations manual.

Initial System Build before database cutover


1. Build Standard SAP Vanilla system, keeping the drive config as the source system (if this needs to change please follow the procedure and then use Appendix A when instructed.) 2. Cluster the system as per manual Log in as SAPService<SID> on both nodes and execute NTENV2REG and NTREG2ENV to copy the environment settings from the <SID>ADM user to the SAPService<SID> user. This ensures that all users have access to the same environment variables. (Possibly you might need to do this for the cluster user also) 3. Copy the correct configuration files, Oracle and SAP 4. Copy the kernel from the original system 5. Stop SAP and database via cluster administrator, once system is verified as stable to working correctly

Chris Kernaghan

Page 3 of 33

28/01/2012

System Copy for Clustered SAP Systems.

Oracle Database Cutover


6. Remove Database from failsafe group 6.1. Open Failsafe manager 6.2. Navigate to the Database resource on the tree on the left hand pane

6.3. Right click on the resource and select Remove from Group

Chris Kernaghan

Page 4 of 33

28/01/2012

System Copy for Clustered SAP Systems. 6.4. Click Yes to warning dialog regarding shutting down the database and disconnecting users. 6.5. The database will be removed from the group. 6.6. Restart the OracleService<SID>

6.7. Restart the database manually from SQLPlus

6.8. Execute the command Alter system switch logfile; to force the redo logs to archive their contents. Chris Kernaghan Page 5 of 33 28/01/2012

System Copy for Clustered SAP Systems. 6.9. Execute the command Shutdown immediate;

6.10.

Execute the command Startup;

Chris Kernaghan

Page 6 of 33

28/01/2012

System Copy for Clustered SAP Systems. 6.11. Execute the command Shutdown;

6.12. If possible keep the vanilla datafiles until the process is completed. This is to aid problem diagnosis should an error occur by restoring the previous database. The easiest way to do this is to rename the oracle root directories to oracle_old

If any of the locations of files etc are changing you will need to apply Appendix A from this point. If not then restore the files to the correct locations.

Chris Kernaghan

Page 7 of 33

28/01/2012

System Copy for Clustered SAP Systems. 7. Once the restore is completed open a SQLPlus session.

8. Issue the command Startup; The database might take a couple of minutes to come up as it might be recovering

The database has been recovered.

Chris Kernaghan

Page 8 of 33

28/01/2012

System Copy for Clustered SAP Systems. 9. Open Failsafe manager and navigate to the standalone resource under the node

10. Right click and select Verify Standalone Database, enter the required information

Chris Kernaghan

Page 9 of 33

28/01/2012

System Copy for Clustered SAP Systems. 11. Check the log for any critical errors

Once this is verified, select the standalone database resource and right click again. Select Add to Group.

Chris Kernaghan

Page 10 of 33

28/01/2012

System Copy for Clustered SAP Systems. 12. Select the group that you wish to add the database to and the type of resource that you are adding to a group.

13. Enter the details for the database parameters

Click ok to warning regarding the init<sid>.ora not being on cluster disks.

Chris Kernaghan

Page 11 of 33

28/01/2012

System Copy for Clustered SAP Systems. 14. Select no to create a password file.

15. Click finish and confirm the entries

Chris Kernaghan

Page 12 of 33

28/01/2012

System Copy for Clustered SAP Systems. 16. Click yes to warning about disconnecting users

17. The system will attempt to add the database to the failsafe group.

Chris Kernaghan

Page 13 of 33

28/01/2012

System Copy for Clustered SAP Systems. 18. Start SAP from the Cluster administrator, ensure that the in the properties page for the SAP R/3 <SID> Resource, that Do not restart is selected, this prevents Ping-Ponging of the system in the event of a failure

Chris Kernaghan

Page 14 of 33

28/01/2012

System Copy for Clustered SAP Systems.

Setting up Database Users and License Keys


Once the database has been recovered and stable, it is necessary to recreate the Oracle OPS$ users and the SAPDBA roles to enable the BR tools etc to work effectively. 1. Open a command window, execute the following command Rsh <Database Network name> sqlplus /nolog

Chris Kernaghan

Page 15 of 33

28/01/2012

System Copy for Clustered SAP Systems. 2. Execute the next command, Connect / as sysdba

Run the following scripts with the correct parameters. (As the scripts change frequently, open the script to determine the correct parameters) Oradbusr.sql and sapdba_role.sql, both of these scripts can be downloaded from SAP or can be found in the c:\winnt\sapcluster directory or the \Users directory of the original installation. The order of the scripts is vital, the sapdba_role.sql script must be executed before the oradbusr.sql script.

Chris Kernaghan

Page 16 of 33

28/01/2012

System Copy for Clustered SAP Systems. 3. Once the users have been created, it is necessary to create the temporary saplicense keys, you require a separate key for each node of the cluster. To create a temporary license key, move the SAP Resource on to each node and execute the following command Rsh <Sap Network name> saplicense temp

Chris Kernaghan

Page 17 of 33

28/01/2012

System Copy for Clustered SAP Systems. 4. Enter the SAP SID of the system

Chris Kernaghan

Page 18 of 33

28/01/2012

System Copy for Clustered SAP Systems. 5. Then to obtain a hardware to get a permanent license key from SAP execute the command Rsh <SAP Network name> Saplicense get

Execute both these commands on both nodes, while the SAP resource is on that particular node. Once the hardware keys have been provided, log on to SAP Service Marketplace, under the OSS ID of the customer, and request the new keys.

Chris Kernaghan

Page 19 of 33

28/01/2012

System Copy for Clustered SAP Systems.

Resetting TMS for System


The following procedure can be used for A. A new/test system without a connection to an existing transport domain B. A new system which is the first system in a new transport domain It cannot be used for a system which is joining an existing transport domain. (See appendix B) 1. Log into SAP System Execute transaction STMS

Chris Kernaghan

Page 20 of 33

28/01/2012

System Copy for Clustered SAP Systems. 2. Enter system Overview

3. Select Extras-Delete TMS Config

Exit the transaction and re-enter it

Chris Kernaghan

Page 21 of 33

28/01/2012

System Copy for Clustered SAP Systems. 4. The system will ask you to create a new transport domain. If you wish to join an existing domain, (See appendix B).

If not then just accept the defaults and click save. 5. Enter the transport route screen Click the icon for View/Change to enter change mode.

Chris Kernaghan

Page 22 of 33

28/01/2012

System Copy for Clustered SAP Systems. 6. Select the menu option Standard configuration from Configuration Standard Configuration, and then select the configuration required.

7. Enter the appropriate details for the systems. Once completed, click the appropriate system and place in the main screen, then save.

Chris Kernaghan

Page 23 of 33

28/01/2012

System Copy for Clustered SAP Systems.

8. Select Configuration Distribute and Activate

Chris Kernaghan

Page 24 of 33

28/01/2012

System Copy for Clustered SAP Systems.

Changing RFCs for new destinations


1. Execure transaction SM59

2. Expand the TCP/IP destinations and find the RFC relating to SAPOSCOL and SAPXPG, double click the RFC entry

Chris Kernaghan

Page 25 of 33

28/01/2012

System Copy for Clustered SAP Systems. 3. Select Destination Copy, enter the new RFC destination name, do this for the Database network name and the SAP Network name. This needs to be done for both the SAPOSCOL and the SAPXPG entries

4. Test the new RFC destinations, a good test is to use the CheckDB test from DB13. This should be carried out in the four cluster configurations Host Resources CI Database + SAP Database None SAP DB None SAP Database + SAP Database

Chris Kernaghan

Page 26 of 33

28/01/2012

System Copy for Clustered SAP Systems.

Appendix A
Appendix A 1. On the source system execute the command, Alter database backup controlfile to trace;

Appendix A 2.This will create a tracefile in the SAPTrace\usertrace directory. On 9i systems you need to exit SQLPlus before copying the file. Open the file and remove the top lines so that the first line is CREATE CONTROLFILE REUSE DATABASE "P01" NORESETLOGS ARCHIVELOG Edit this line to read CREATE CONTROLFILE SET DATABASE "P01" RESETLOGS ARCHIVELOG Ensure the locations of all the files are correct. Edit the end of the document so that the last line is CHARACTER SET <Database Character set> ;

Chris Kernaghan

Page 27 of 33

28/01/2012

System Copy for Clustered SAP Systems. Appendix A 3.Open a SQLPlus session

Appendix A 4.Issue the command startup nomount

Chris Kernaghan

Page 28 of 33

28/01/2012

System Copy for Clustered SAP Systems. Appendix A 5.Issue the command to run the create.sql script

Appendix A 6.Once the return is Control File created issue the command Alter database open resetlogs;

Chris Kernaghan

Page 29 of 33

28/01/2012

System Copy for Clustered SAP Systems. Appendix A 7.The database will recovery and open, once it has issue the command Shutdown Immediate; and then issue the command Startup;

The database has been recovered, you may proceed to point 9 in the main document.

Chris Kernaghan

Page 30 of 33

28/01/2012

System Copy for Clustered SAP Systems.

Appendix B
Appendix B 1. Once the Appropriate information regarding the existing Transport Domain has been entered and saved on the new system.

You need to log on to the Transport Domain Controller in Client 000. Appendix B 2. Enter the Systems Overview

Chris Kernaghan

Page 31 of 33

28/01/2012

System Copy for Clustered SAP Systems. Appendix B 3. The new system will appear with a different icon in the status window to the existing systems. To include the system in the domain, you need to select SAP System Approve

Appendix B 4. Then you need to select SapSystem Update configuration

This will distribute the configuration.

Chris Kernaghan

Page 32 of 33

28/01/2012

System Copy for Clustered SAP Systems. Appendix B 5. Go into the Transport routes and ensure that the routes are correct and that they have been distributed and activated (Follow instructions above for configuration instructions)

Chris Kernaghan

Page 33 of 33

28/01/2012

Вам также может понравиться