Sun Cluster 3.1 Data Service for SAP

Installing and Configuring SAP and Database

This section contains the procedures you need to install and configure SAP and the database.

How to Install SAP and the Database

Use this procedure to install SAP and the database.

  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.


    Note –

    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 an SAP 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 a Cluster or How to Install an SAP Scalable Application Server.

How to Install an SAP Scalable Application Server

Use this procedure to install scalable application server instances. This procedure assumes that you installed the central instance and the database. This procedure includes additional steps for SAP 6.10 and SAP 6.20 users to ensure that Sun Cluster HA for SAP can manage and bring online SAP 6.10 and SAP 6.20 services. SAP 6.10 and SAP 6.20 create one startsap script and one stopsap script. Other SAP versions create one of each of theses scripts for each service you create. This difference accounts for the additional steps for SAP 6.10 and SAP 6.20 users.


Tip –

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 or the Failover Application Server.

    • 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.

    Create a local directory for each new application server.

    Example:


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

    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.


  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 log file and the stop log file will be installed on the local file system.

    Example:


    # ln -s /usr/sap/local/SID/D03 /usr/sap/SID/D03
    
  5. Install the application server.

  6. Are you using SAP 6.10 or SAP 6.20?

  7. Become user sapsidadm.

  8. Make a copy of the startsap script and the stopsap script, and save these files in the SAPSIDadm home directory. The filenames that you choose specify this instance.


    # cp /usr/sap/SID/SYS/exe/run/startsap \
    $SAPSID_HOME/startsap_instance-number
    
    # cp /usr/sap/SID/SYS/exe/run/stopsap \
    $SAPSID_HOME/stopsap_instance-number
    
  9. Make backup copies of the following files because you will modify them. In the SAP profile directory, modify all the filenames for this instance. The filenames that you choose must be specific to this instance, and they must follow the same naming convention you chose in Step 8.


    # mv SAPSID_Service-StringSystem-Number_physical-hostname \
    SAPSID_Service-StringSystem_instance-number
    
    # mv START_Service-StringSystem-Number_physical-hostname \
    START_Service-StringSystem_instance-number
    
  10. Modify the contents of the files you created in Step 9 to replace any reference to the physical host with the instance number.


    Caution – Caution –

    It is important that you make your updates consistent so that you can start and stop this application server instance from all the nodes that will run this scalable application server. For example, if you make these changes for SAP instance number 02, then use 02 where this instance number appears. If you do not use a consistent naming convention you will be unable start and stop this application server instance from all the nodes that will run this scalable application server.


  11. Edit the start script and the stop script so that the startup log file and the stop log file 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
  12. 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.

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

  14. Create the SAP logon group if you use a logon group.

Where to Go From Here

Go to Configuring Sun Cluster HA for DBMS.

How to Enable Failover SAP Instances to Run in a 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). Use this procedure to enable SAP to run in a cluster.

  1. Make backup copies of the files you will modify in Step 5 through Step 8.

  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. Are you using SAP 6.10 or SAP 6.20?

  5. Make a copy of the startsap script and the stopsap script, and save these files in the SAPSIDadm home directory. The filenames that you choose must specify this instance.


    # cp /usr/sap/SID/SYS/exe/run/startsap  \
    $SAPSID_HOME/startsap_logical-hostname_instance-number
    # cp /usr/sap/SID/SYS/exe/run/startsap \
    $SAPSID_HOME/stopsap_logical-hostname_instance-number
    
  6. Become user sapsidadm, and then perform the following tasks.

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

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

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

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

    For Application Server:


    SAPLOCALHOST=as-logical-hostname
    
  8. 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.

  9. 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 Configuring Sun Cluster HA for DBMS.