Role start_sap
The role start_sap is used to start one or multiple SAP instances, either for a given SAP system ID (tag -t sap_start_instances
) or for all SAP systems that are configured in file /usr/sap/sapservices (tag -t sap_start_all_systems
). If a requested SAP instance is already active, the request will be ignored and no error message will be sent. The role start_sap is using the sapcontrol command of the SAP Host Agent as suggested in SAP Note 1763593. It requires that the SAP start services for the selected instances are active. By default, the SAP start services are started automatically when the subsystem QUSRWRK is started. If the SAP start services are not active, they can be started by using this role with the tag -t sap_start_services
.
If the role start_sap is used with tag -t sap_start_instances
, it needs the SAP system ID as input in variable startsap_input_sap_sid
. An SAP instance number can be provided optionally in variable startsap_input_sap_instance_nr
. If an instance number is provided, only this instance is started. If no instance number is provided, start_sap will start all configured instances for the given SID, also on remote servers in a distributed landscape. It is recommended that the role start_sap is executed on the logical partition or server that hosts the central services instance (ASCS, SCS), the primary application server instance, or the central instance.
If the role start_sap is used with tag -t sap_start_all_systems
, the values in the variables startsap_input_sap_sid
and startsap_input_sap_instance_nr
are ignored. Instead, all SAP systems that are configured in file /usr/sap/sapservices will be started with all their instances.
If the role start_sap is used with tag -t sap_start_services
, you can specify a SAP system ID in variable startsap_input_sap_sid
or the special value "*"
. If you specify "*"
, SAP start services will be started for all SAP systems that are configured in /usr/sap/sapservices.
Table of contents
Requirements
This role is intended for the operating system IBM i. The target system must be enabled to execute Ansible playbooks. For details, see the prerequisites section in Ansible Content for IBM Power Systems - IBM i with SAP Software.
The SAP start services for the requested SAP system must be configured in file /usr/sap/sapservices. In a standard installation, they are started automatically after an IPL when subsystem QUSRWRK is started (autostart job entry SAPINIT). They can be started manually by calling program R3SAP400/SAPINIT
or by executing the role start_sap with tag -t sap_start_services
.
Variables
Variable |
Usage |
Required |
---|---|---|
|
Directory path on the target host where the sapcontrol executable is located |
Yes 1 |
|
SAP system ID or |
Yes 2 |
|
SAP instance number |
No 3 |
|
Timeout in seconds when waiting for instance to be completely started |
Yes 1 |
Remarks:
Defaults
Suggested default values are provided in defaults/main.yml:
Variable |
Default |
---|---|
|
|
|
|
|
For internal use only |
|
For internal use only |
|
For internal use only |
Dependencies
None.
Example Playbook
The example playbook is used to start all instances of an SAP system with the SAP system ID (SID) PRD. It is based on the assumption that a configuration file and an inventory file with contents similar to the configuration documentation exist in the current directory. The ASCS instance is installed on host ibmiserver01.mycorp.com, and the SAP start services for SAP system PRD are active on all hosts that have instances for SAP system PRD. The example playbook in the current directory is named start_sap.yml and has the following contents:
- hosts: ibmiserver01.mycorp.com
vars:
- startsap_input_sap_sid: "PRD"
roles:
- role: <ansible_dir>/roles/start_sap
To execute this playbook, enter the command:
ansible-playbook --verbose start_sap.yml -t sap_start_instances
Note: When using the role start_sap with tag -t sap_start_instances
to start instances of an SAP system on several hosts, you only need to execute the role on one host, typically the host that holds the central services instance. When using the role start_sap with tag -t sap_start_services
to start the SAP start services, you must execute it on all hosts that hold SAP instances for the specified SAP system.
License
This collection is licensed under the Apache 2.0 license.
Copyright
Copyright IBM Corporation 2021,2022