Use the procedure in this section to perform the following tasks.
Set up a lock file for the central instance or the failover application server.
Set up a lock file for a scalable application server.
Set up a lock file to prevent multiple startups of the SAP instance when the instance is already active on one node. Multiple startups of the same instance cause each startup to fail. Furthermore, the failure prevents SAP shutdown scripts from performing a clean shutdown of the instances, which might cause data corruption.
If you set up a lock file, when you start the SAP instance the SAP software locks the file startup_lockfile. If you start the same instance outside the Sun Cluster environment and then try to start SAP under the Sun Cluster environment, the Sun Cluster HA for SAP data service will attempt to start the same instance. However, because of the file-locking mechanism, this attempt will fail. The data service will log appropriate error messages in /var/adm/messages.
The only difference between the lock file for the central instance or the failover application server and the lock file for a scalable application server is that the lock file for the scalable application server resides on the local file system and the lock file for the central instance or the failover application server resides on a cluster file system.
Use this procedure to set up a lock file for the central instance or the failover application server.
Install the latest patch for the sapstart executable, which enables Sun Cluster HA for SAP users to configure a lock file.
Set up the lock file for the central instance or the failover application server on a cluster file system.
Edit the profile that sapstart uses to start the instance such that you add the new SAP parameter, sapstart/lockfile, for the central instance or failover application server. This profile is the one that is passed to sapstart as a parameter in the startsap script.
For the central instance, type the following.
sapstart/lockfile =/usr/sap/SAPSID/ \ Service-StringSystem-Number/work/startup_lockfile |
For the failover application server, type the following.
sapstart/lockfile =/usr/sap/SAPSID/ Dinstance-id/work/startup_lockfile |
New parameter name.
Work directory for the central instance.
Work directory for failover application server.
Lock file name that Sun Cluster HA for SAP uses.
SAP creates the lock file.
You must locate the lock file path on a cluster file system. If you locate the lock file path locally on the nodes, a startup of the same instance from multiple nodes cannot be prevented.
Use this procedure to set up a lock file for a scalable application server.
Install the latest patch for the sapstart executable, which enables Sun Cluster HA for SAP users to configure a lock file.
Set up the application server lock file on the local file system.
Edit the profile that sapstart uses to start the instance such that you add the new SAP parameter, sapstart/lockfile, for scalable application server. This profile is the one that is passed to sapstart as a parameter in the startsap script.
sapstart/lockfile =/usr/sap/local/SAPSID/Dinstance-id/work/startup_lockfile |
New parameter name
Work directory for the scalable application server
Lock file name that Sun Cluster HA for SAP uses
SAP creates the lock file.
The lock file will reside on the local file system. The lock file does not prevent multiple startups from other nodes, but the lock file does prevent multiple startups on the same node.