System Copy for Cluster

download System Copy for Cluster

of 33

Transcript of System Copy for Cluster

  • 8/3/2019 System Copy for Cluster

    1/33

    System Copy for Clustered SAP Systems.

    System Copy for

    Clustered SAPSystems.

    Prepared ByChris Kernaghan19th July 2004

    Chris Kernaghan Page 1 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    2/33

    System Copy for Clustered SAP Systems.System Copy for Clustered SAP Systems.............................................................................. 1Initial System Build before database cutover ......................................................................... 3Oracle Database Cutover ....................................................................................................... 4Setting up Database Users and License Keys ....................................................................... 15

    Changing RFCs for new destinations .................................................................................. 25Appendix A ........................................................................................................................... 27Appendix B ........................................................................................................................... 31

    Chris Kernaghan Page 2 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    3/33

    System Copy for Clustered SAP Systems.This procedure is taken from several sources, the R3copy note (147243), the Oracle 9iDatabase 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 (ifthis needs to change please follow the procedure and then use Appendix A wheninstructed.)

    2. Cluster the system as per manualLog in as SAPService on both nodes and execute NTENV2REG and

    NTREG2ENV to copy the environment settings from the ADM user to theSAPService user. This ensures that all users have access to the sameenvironment 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 system5. 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

  • 8/3/2019 System Copy for Cluster

    4/33

    System Copy for Clustered SAP Systems.

    Oracle Database Cutover

    6. Remove Database from failsafe group

    6.1. Open Failsafe manager6.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

  • 8/3/2019 System Copy for Cluster

    5/33

    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

    6.7. Restart the database manually from SQLPlus

    6.8. Execute the command Alter system switch logfile; to force the redo logs toarchive their contents.

    Chris Kernaghan Page 5 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    6/33

    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

  • 8/3/2019 System Copy for Cluster

    7/33

    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 isto 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 fromthis point. If not then restore the files to the correct locations.

    Chris Kernaghan Page 7 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    8/33

    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

  • 8/3/2019 System Copy for Cluster

    9/33

    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

  • 8/3/2019 System Copy for Cluster

    10/33

    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. SelectAdd to Group.

    Chris Kernaghan Page 10 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    11/33

    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.ora not being on cluster disks.

    Chris Kernaghan Page 11 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    12/33

    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

  • 8/3/2019 System Copy for Cluster

    13/33

    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

  • 8/3/2019 System Copy for Cluster

    14/33

    System Copy for Clustered SAP Systems.

    18. Start SAP from the Cluster administrator, ensure that the in the properties page for theSAP R/3 Resource, that Do not restart is selected, this prevents Ping-Ponging ofthe system in the event of a failure

    Chris Kernaghan Page 14 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    15/33

    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 OracleOPS$ users and the SAPDBA roles to enable the BR tools etc to work effectively.

    1. Open a command window, execute the following command

    Rsh sqlplus /nolog

    Chris Kernaghan Page 15 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    16/33

    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 changefrequently, open the script to determine the correct parameters)

    Oradbusr.sql and sapdba_role.sql, both of these scripts can be downloaded fromSAP or can be found in the c:\winnt\sapcluster directory or the \Users directory ofthe original installation.

    The order of the scripts is vital, the sapdba_role.sql script must be executed beforethe oradbusr.sql script.

    Chris Kernaghan Page 16 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    17/33

    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 saplicense temp

    Chris Kernaghan Page 17 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    18/33

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

    Chris Kernaghan Page 18 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    19/33

    System Copy for Clustered SAP Systems.5. Then to obtain a hardware to get a permanent license key from SAP execute the

    command

    Rsh Saplicense get

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

    Chris Kernaghan Page 19 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    20/33

    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 domainB. 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 appendixB)

    1. Log into SAP System

    Execute transaction STMS

    Chris Kernaghan Page 20 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    21/33

    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

  • 8/3/2019 System Copy for Cluster

    22/33

    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

  • 8/3/2019 System Copy for Cluster

    23/33

  • 8/3/2019 System Copy for Cluster

    24/33

    System Copy for Clustered SAP Systems.

    8. Select Configuration Distribute and Activate

    Chris Kernaghan Page 24 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    25/33

    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 andSAPXPG, double click the RFC entry

    Chris Kernaghan Page 25 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    26/33

    System Copy for Clustered SAP Systems.

    3. Select Destination Copy, enter the new RFC destination name, do this for theDatabase network name and the SAP Network name. This needs to be done for boththe SAPOSCOL and the SAPXPG entries

    4. Test the new RFC destinations, a good test is to use the CheckDB test from DB13. Thisshould be carried out in the four cluster configurations

    Host CI DB

    Resources Database + SAP None

    Database SAP

    None Database + SAP

    SAP Database

    Chris Kernaghan Page 26 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    27/33

    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 9isystems 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" NORESETLOGSARCHIVELOG

    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 ;

    Chris Kernaghan Page 27 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    28/33

    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

  • 8/3/2019 System Copy for Cluster

    29/33

    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 commandAlter database open resetlogs;

    Chris Kernaghan Page 29 of 33 28/01/2012

  • 8/3/2019 System Copy for Cluster

    30/33

    System Copy for Clustered SAP Systems.Appendix A 7.The database will recovery and open, once it has issue the commandShutdown 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

  • 8/3/2019 System Copy for Cluster

    31/33

    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

  • 8/3/2019 System Copy for Cluster

    32/33

    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

  • 8/3/2019 System Copy for Cluster

    33/33

    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 configurationinstructions)