Sun Cluster 3.0 5/02 Supplement

Installing and Configuring SAP and Database

Use the procedures in this section to perform the following tasks.

How to Install SAP and the Database

To install SAP and the database, perform the following steps.

  1. Become superuser on one of the nodes in the cluster where you are installing the central instance.

  2. Install SAP binaries on a cluster file system.


    only -

    Before you install SAP software on a cluster file system, use the scstat(1M) command to verify that the Sun Cluster software is fully operational.


    1. For all of the SAP-required kernel parameter changes, edit the /etc/system file on all of the cluster nodes that will run the SAP application.

      After you edit the /etc/system file, reboot each node. See the SAP document R/3 Installation on UNIX-OS Dependencies for details on kernel parameter changes.

    2. See the SAP document Installation of the SAP R/3 on UNIX for details on how to install the central instance, the database, and the application server instances.

      See "How to Install SAP for Scalable Application Server" for the procedure on how to install a scalable application server in a Sun Cluster environment.

Where to Go From Here

Go to "How to Enable Failover SAP Instances to Run in the Cluster" or "How to Install SAP for Scalable Application Server".

How to Install SAP for Scalable Application Server

To install scalable application server instances, perform the following steps. This procedure assumes that you installed the central instance and the database.


Tip ( only) -

The following file system layout ensures ease of use and prevents data from being overwritten.


  1. Create all SAP directories on cluster file systems.

    • Ensure that the central instance and the database can fail over.

    • Set up the lock file on cluster file system for the central instance to prevent a multiple startup from a different node.

      For the procedure on how to set up a lock file on the central instance, see "How to Set Up a Lock File for Central Instance".

    • Ensure that all application servers can use the SAP binaries on a cluster file system.

  2. Install the central instance and the database on a cluster file system.

    See the SAP document Installation of the SAP R/3 on UNIX for details on how to install the central instance and the database.

  3. On all nodes that will host the scalable application server, create a local directory for the data/log/sec/work directories and the log files for starting and stopping the application server.


    Caution - Caution -

    You must perform this step. If you do not perform this step, you will inadvertently install a different application server instance on a cluster file system and the two application servers will overwrite each other.


    Create a local directory for each new application server.

    Example:


    # mkdir -p /usr/sap/local/SC3/D03
    

  4. Set up a link to point to the local application server directory from a cluster file system, so the application server and the startup/stop log file will be installed on the local file system.

    Example:


    # ln -s /usr/sap/local/SC3/D03 /usr/sap/SC3/D03
    

  5. Install the application server.

  6. Edit the start/stop script so that the startup/stop log files will be node specific under the home directories of users sapsidadm and orasapsid.

    Example:


    # vi startsap_D03
    

    Before:


    LOGFILE=$R3S_LOGDIR/`basename $0.log`

    After:


    LOGFILE=$R3S_LOGDIR/`basename $0`_`uname -n`.log

  7. Copy the application server (with the same SAPSID and the same instance number) on all nodes that run the scalable application server.

    The nodes that run the scalable application server are in the scalable application server resource group nodelist.

  8. Ensure that you can startup and stop the application server from each node, and verify that the log files are in the correct location.

  9. Install the SAP logon group if you use a logon group.

How to Verify SAP Installation for Scalable Application Server

If you installed scalable application server instances in "How to Install SAP for Scalable Application Server", you verified the installation of SAP for the scalable application server in Step 8 of "How to Install SAP for Scalable Application Server".

How to Enable Failover SAP Instances to Run in the Cluster

During SAP installation, the SAP software creates files and shell scripts on the server on which you installed the SAP instance. These files and scripts use physical server names. To run the SAP software with Sun Cluster software, replace references to a physical server with references to a network resource (logical hostname). Throughout these steps, the term physicalserver represents a physical server, and the term logical-hostname represents a network resource.

To enable failover SAP instances to run in the cluster, perform the following steps.

  1. Make backup copies of the files that you will modify in the following steps.

  2. Log in to the node on which you installed the SAP software.

  3. Shut down the SAP instances (central instance and application server instances) and the database.

  4. Become user sapsidadm, and then perform the following tasks.

    1. In the SAPSIDadm home directory, modify all of the file names that reference a physical server name.

    2. In the SAPSIDadm home directory, modify all of the file contents-except log file contents-that reference a physical server name.

    3. In the SAP profile directory, modify all of the file names that reference a physical server name.

  5. As user sapsidadm, add entries for the parameter SAPLOCALHOST.

    Add this entry to the SAPSID_Service-StringSystem-Number_logical-hostname profile file under the /sapmnt/SAPSID/profile directory.

    For Central Instance:


    SAPLOCALHOST=ci-logical-hostname
    

    This entry enables the external application server to locate the central instance by using the network resource (logical hostname or shared address).

    For Application Server:


    SAPLOCALHOST=as-logical-hostname
    

  6. Become user orasapsid, and then perform the following tasks.

    • In the oraSAPSID home directory, modify all of the file names that reference a physical server name.

    • In the oraSAPSID home directory, modify all of the file contents-except log file contents-that reference a physical server name.

  7. Ensure that the /usr/sap/tmp directory owned by user sapsidadm and group sapsys exists on all nodes that can master the failover SAP instance.

Where to Go From Here

Go to "How to Verify SAP and the Database Installation with Central Instance".

How to Verify SAP and the Database Installation with Central Instance

To test starting and stopping the SAP central instance on all of the potential nodes on which the central instance can run, perform the following steps.

  1. Create the failover resource group to hold the network and central instance resources.


    # scrgadm -a -g sap-ci-resource-group [-h nodelist]


    only -

    Use the -h option to the scrgadm(1M) command to select the set of nodes on which the SAP central instance can run.


  2. Verify that you have added to your name service database all of the network resources that you use.

  3. Add a network resource (logical hostname) to the failover resource group.


    # scrgadm -a -L -g sap-ci-resource-group -l ci-logical-hostname [-n netiflist]

  4. Enable the resource group.

    Run the scswitch(1M) command to move the resource group into a managed state and bring the resource group online.


    # scswitch -Z -g sap-ci-resource-group
    

  5. Log in to the cluster member that hosts the central instance resource group.

  6. Ensure that the database is running.

  7. Manually start the central instance.

  8. Start the SAP GUI using the logical hostname, and verify that SAP initializes correctly.

    The default dispatcher port is 3200.

  9. Manually stop the central instance.

  10. Switch this resource group to another cluster member that can host the central instance.


    # scswitch -z -h node -g sap-ci-resource-group
    

  11. Repeat Step 5 through Step 9 until you verify startup and shutdown of the central instance on each cluster node that can host the central instance.

Where to Go From Here

Go to "How to Verify SAP and the Database Installation for Failover Application Server".

How to Verify SAP and the Database Installation for Failover Application Server

To test starting and stopping the failover application server, perform the following steps procedure on all of the potential nodes on which the failover application server can run.

  1. Create the failover resource group to hold the network and application server resources.


    # scrgadm -a -g sap-as-fo-resource-group
    


    only -

    Use the -h option to the scrgadm command to select the set of nodes on which the SAP application server can run.


    # scrgadm -a -g sap-as-fo-resource-group [-h nodelist]


  2. Verify that you added to your name service database all of the network resources that you use.

  3. Add a network resource (logical hostname) to the failover resource group.


    # scrgadm -a -L -g sap-as-fo-resource-group -l as-fo-logical-hostname [-n netiflist]

  4. Enable the resource group.

    Run the scswitch(1M) command to move the resource group into a managed state and bring the resource group online.


    # scswitch -Z -g sap-as-of-resource-group
    

  5. Log in to the cluster member that hosts the application server resource group.

  6. Manually start the application server.

  7. Start the SAP GUI using the logical hostname, and verify that SAP initializes correctly.

  8. Manually stop the application server.

  9. Switch this resource group to another cluster member that can host the application server.


    # scswitch -z -h node -g sap-as-fo-resource-group
    

  10. Repeat Step 5 through Step 7 until you verify startup and shutdown of the application server on each cluster node that can host the application server.

Where to Go From Here

Go to "Configuring Sun Cluster HA for DBMS" for information on how to configure DBMS, an SAP service, so that it is highly available.