Role stop_db
The role stop_db is used to stop a database instance. Currently supported databases are IBM Db2 for Linux, Unix and Windows (LUW), Oracle and SAP HANA. When using this role, you must specify the database system id in a variable and select the database type through a tag. If the requested database is not active, the request will be ignored and an informational message will be sent. A description of the tags and variables can be found in the related sections of this document.
Table of contents
Requirements
This role is intended for the operating system IBM AIX. The target system must be enabled to execute Ansible playbooks. For details, see the prerequisites section in Ansible Content for IBM Power Systems - AIX with SAP Software.
The requested database instance must be installed on the managed node and operational.
Variables
DB Type |
Variable |
Usage |
Required |
---|---|---|---|
IBM Db2 LUW |
|
DB system ID |
Yes |
SAP HANA |
|
DB system ID |
Yes |
|
Instance number of SAP HANA DB |
Yes |
|
Oracle |
|
DB system ID |
Yes |
|
SAP system ID |
Yes |
Defaults
None
Dependencies
None.
Example Playbook
The example playbook is used to stop instance number 00 of an SAP HANA database with the database system ID PRD on host ibmaixserver01.mycorp.com. 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 example playbook in the current directory is named stop_hana_db.yml and has the following contents:
- hosts: ibmaixserver01.mycorp.com
vars:
- stopdb_input_db_sid: "PRD"
- stopdb_input_hdb_instance_number: 00
roles:
- role: <ansible_dir>/roles/stop_db
To execute this playbook, enter the command:
ansible-playbook --verbose -t sap_stop_hana stop_hana_db.yml
License
This collection is licensed under the Apache 2.0 license.
Copyright
Copyright IBM Corporation 2022