Skip to Content
Author's profile photo Former Member

SAPCTL Functionality and Usage for Oracle RAC environments

Hello,

Now we are going to show the functionality and the usage of sapctl service in RAC environments. Normally between srvctl, crsctl, sapctl you can get confuse with the commands you need to administrate the SAP HA subsystems (ASCS, ERS, DV, etc)

What does SAPCTL does?

1. You can create and remove any Oracle Clusterware configuration of the SAP HA subsystem.

2. You can start and stop the SAP HA subsystem that are created in the Oracle Clusterware, you can choose to start/stop as a whole or individual components.

3. You can check the status of any SAP HA subsystem created in the Oracle Clusterware.

4. You can relocate any SAP HA subsystem created in the Oracle Clusterware.

SAPCTL usage and commands


This working example assumes that you have completed all of this steps:

1. Oracle Clusterware is installed.

2. Oracle RAC is installed.

3. You have installed SAP and the SAPCTL package.

4. You have 2 RAC nodes.

5. Only ASCS and ERS services are installed in Oracle Clusterware, the SAP Instance is installed in a different host (No cluster service).

Previous Info:

First RAC Node:           erpdb01

Second RAC Node:      erpdb02

SAP SID:                      PRD

Oracle Version:            11.2.0.4

ASCS Instance:           ASCS01

ERS Instance:             ERS20

SAPCTL Version:          v8

First log in with sidadm to operating system level.

To check the status of all SAP HA subsystems installed in Oracle Clusterware you use this command:

     sapctl status all -sapsid PRD

/wp-content/uploads/2015/08/sapctl1_775511.png

To check the status of individual SAP HA subsystems installed in Oracle Clusterware you use this command:

     sapctl status abapvip/abapenq/abaprep -sapsid PRD

/wp-content/uploads/2015/08/sapctl2_775512.png

To check the which SAP Instace have been configured by Oracle Clusterware:

     sapctl config

/wp-content/uploads/2015/08/sapctl3_775513.png

To stop all SAP HA subsystems use this command:

     sapctl stop all -sapsid PRD

/wp-content/uploads/2015/08/sapctl4_775529.png

To stop all SAP HA subsystems use this command:

     sapctl start all -sapsid PRD

     As you can see the ERS Service will automatically started in the oposite node (erpdb02) where the ASCS service started.

/wp-content/uploads/2015/08/sapctl5_775530.png

If you need to start/stop individually any subsystem service you can use this commands:

     sapctl start/stop abapenq -sapsid PRD  

     sapctl start/stop abaprep -sapsid PRD

     sapctl start/stop abapvip -sapsid PRD (VIP IP for ASCS service)

/wp-content/uploads/2015/08/sapctl6_775542.png

/wp-content/uploads/2015/08/sapctl7_775543.png

Now the commands to manually relocate subsytem services between the RAC Nodes

     ASCS01 service is running on erpdb01 -> relocate to erpdb02

     ERS20 service is running on erpdb02

     sapctl relocate -sapsid PRD -abapenq/-abaprep ASCS01/ERS20 -to erpdb02/erpdb01

/wp-content/uploads/2015/08/sapctl8_775596.png

After the relocation of ASCS service is done, the ERS service automatically relocates to oposite node.

Hope it helps you!, don’t forget to like and rate if it was helpful.

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Excellent! Nice doc, it complements the rac commands from your previous doc.

      Author's profile photo Ashutosh Chaturvedi
      Ashutosh Chaturvedi

      Hi Michael,

      Excellent blog mate!!

      With Regards

      Ashutosh Chaturvedi

      Author's profile photo Rupesh Shivathare
      Rupesh Shivathare

      Hi Michael,

      This is useful doc for starting and stopping SAP service.

      But for stopping DB services we need to use only crsctl right?

      Regards,

      Rupesh

      Author's profile photo Former Member
      Former Member

      Hi Rupesh.

      We can stop the DB services using srvctl command...

      crsctl will be used to stop the cluster and their services..

      Regards,

      Karthik.R

      Author's profile photo Former Member
      Former Member

      Dear Michael,

      It's very nice doc  the SAPCTL administration. Thanks for the sharing.

      I have question about the SAPCTL configuratioon. Here is my question. Can you please check and help?

      I need to install SAP on a separate server from the ORACLE RAC nodes. I need to understand if we can use the SAPCTL command to failover the SAP instances if we install the Clusterware on the Application Node.

      That is :

       

      1. I have 2 nodes which are ORACLE RAC nodes .
      2. I have 2 Separate Nodes in which I need to achieve HA using the Clusterware. Can I use the SAPCTL to perform the same. or do I necessary need to be co-located with the same Cluster of the Oracle RAC.

       

      Appreciate your quick response.