Automation

This chapter describes how to automate tasks.

This function is only available with the Avantra Pro Edition.

Key features

Automation is

  • Collection of configurable actions

  • Actions that are executed either sequentially and/or concurrently (parallel execution)

  • Automatic execution based on a schedule

  • Manual execution from authorized users

  • Avantra Notifier: a notifier action can trigger an automation

  • Option to monitor a running automation execution

  • Option to interact with a running automation

Automation Actions

Start SAP System

Starts the whole SAP System with all SAP application servers belonging to the SAP system.

Please note that the SAP database is NOT started with this action.

The detailed start procedure is the following:

  1. Avantra checks with R3trans command whether the database is up and running. If the database is not up and running, the SAP System will not be started.

  2. Execute cleanipc <instno> remove on all SAP instances. If the SAP instance is already running, cleanipc is not executed.

  3. Execute the SAPControl StartSystem function. After executing SAPControl StartSystem function, Avantra waits until all SAP instances are up and running. To do that the SAPControl GetSystemInstanceList function is executed. The maximum time to wait is 20 minutes. If not all SAP instances are up and running after 20 minutes, Avantra reports this automation action as failed.

Reference Data
Automation Parameters

WaitingTimeMoniOffStop

Stop SAP System

This action stops an SAP system and all SAP instances belonging to that SAP system.

Please note that the SAP database is NOT stopped with this action.

Avantra executes the SAPControl StopSystem function to stop the SAP system. After executing SAPControl StopSystem function, Avantra waits until all SAP instances are stopped. To do that the SAPControl GetSystemInstanceList function is executed. The maximum time to wait is 20 minutes. If not all SAP instances are stopped after 20 minutes, Avantra reports this automation action as failed.

Reference Data
Automation Parameters

WaitingTimeStartMoniOn

Start SAP Database

Starts the database belonging to an SAP System.

Please note that only the database is started, the SAP instances are NOT started.

How the database is started depends on the database vendor. Avantra currently supports start/stop on the following databases and operating systems:

Linux

Windows

Sybase

Yes

Yes

Oracle

Yes

MaxDB

Yes

DB2

Yes

MSSQL

Yes

HANA System DB

Yes

HANA Tenant

Yes

Restrictions:

  • For SAP HANA database: this action starts only the HANA tenant. The HANA System DB is not started with this action.

  • The agent user might not have permission to start the database. In this case, you have to define the OS user for the SAP system. If set, this user is used to start the database.

  • On Windows, the database runs as Windows Services. The agent user must have permission to start a Windows service. You must give this permission before you execute this action.

Stop SAP Database

Stops the database belonging to an SAP system.

Please note that only the SAP database is stopped.

The SAP system is not stopped with this action. The supported databases and operating systems can be found in the Start SAP Database action. The SAP system must already be stopped before the database is stopped.

Stopping an SAP database while SAP instances are running will result in fatal errors on your SAP system.

Start SAP System and Database

Starts the SAP database AND the SAP System (all SAP instances). Please read the comments for Start SAP System and Start SAP Database for details on start actions.

Stop SAP System and Database

Stops the SAP System (all SAP instances) AND the SAP database. Please read the comments for Stop SAP System and Stop SAP Database for details on stop actions.

Start SAP System and HANA System DB

Starts the SAP HANA System DB, all SAP HANA tenants, and the SAP system. This is a special action for SAP HANA systems only. While non-HANA SAP systems run on a dedicated database that belongs to the SAP system, HANA SAP systems share one HANA database. Each HANA SAP system runs on a so-called HANA tenant which is part of the HANA database. This action starts the HANA platform (the HANA system DB). Based on your HANA settings, the HANA tenants are started as part of this procedure. Once the HANA system DB is up and running, this automation action starts the HANA tenant database (the database belonging to the SAP system). Based on your HANA settings, this HANA tenant might already be started during the start of the HANA platform. This is not an issue if this is the case, the HANA tenant will not be started again. Once the HANA tenant is up and running, the SAP System is started. Please refer to Start SAP System for details.

Stop SAP System and Database and HANA platform

Stops the SAP System, the SAP HANA tenants database, and the SAP HANA System DB. This action stops the SAP system and SAP database, please refer to Stop SAP System and Database action. After that, the HANA platform (system DB) is stopped as well.

Please be aware that stopping the HANA system DB will stop all running HANA tenants as well! Avantra does NOT warn you if another HANA tenant (for example, hosting another SAP system) is running. This HANA tenant will be stopped too with fatal errors for running applications on this HANA tenant.

So, please use this command with caution.

Start SAP System, Database and servers

This action is only applicable when your SAP systems are running on cloud servers which can be started and stopped from Avantra (please refer to "xxx" how to start and stop servers). Since an SAP system might run on multiple servers, this action detects first all servers which are hosting the SAP system. Then those cloud servers are started. Once the cloud servers are up and running, the SAP system is started. Refer to Start SAP System and Database action.

Stop SAP System, Database and servers

This action is only applicable when your SAP systems are running on cloud servers. Please refer to Start SAP System, Database and servers for details.

Start SAP HANA

Starts an SAP HANA System DB (HANA may start tenants depending on your HANA settings).

Please note that starting HANA tenants requires a user with the DATABASE ADMIN or DATABASE START privilege in the system DB. You need to specify the name and password of that user in Database  Database connection details.

Stop SAP HANA

Stops SAP HANA System DB (all tenants are stopped too).

Please note that stopping HANA tenants requires a user with the DATABASE ADMIN or DATABASE STOP privilege in the system DB. You need to specify the name and password of that user in Database  Database connection details.

Start SAP Instance

Starts a single SAP Instance. The SAPControl Start function is used to start the SAP instance.

Stop SAP Instance

Stops a single SAP Instance. The SAPControl Stop function is used to start the SAP instance.

Start Cloud Server

Starts a single cloud server. The cloud authentication must be correctly defined for this cloud server.

Stop Cloud Server

Stops a cloud server. The cloud authentication must be correctly defined for this cloud server.

Start Database

Starts a standalone database.

Avantra currently supports start/stop on the following standalone databases and operating systems:

Linux

Windows

Sybase

Oracle

MaxDB

DB2

MSSQL

HANA System DB

Yes

HANA Tenant

Yes

Stop Database

Stops a standalone database.

See Start Database for what databases are supported.

Wait For Check Status

This action allows you to wait until a specific check from a specific system receives a defined state. In addition to static and dynamic checks, the Wait for Check Status automation action also supports the custom check type, including Composite Checks (the latter are supported since Avantra Version 20.11.6).

Wait For System Status

This automation action allows you to wait until the selected system gets its status.

Get Process Count

Get the total number of processes of an SAP instance. This action executes the SAPControl function GetProcessList.

Get Process List

Get the detailed process list of an SAP instance This action executes the SAPControl function GetProcessList.

Get SAP Instance List

Get the detailed SAP instance list of the SAP system This action executes the SAPControl function GetSystemInstanceList.

Get Agent Version

Get the version of the Avantra agent.

Wait

This action allows you to wait for a certain amount of time. For example, it can be useful to make sure that the previous action has time to finish.

Run OS Command

Executes operating system commands The commands run with the agent user. Make sure that the agent user has the required permissions to execute the commands.

SSH

Executes a script with an ssh session. You must define SSH credentials that will be used to establish an ssh session. You can either use global credentials defined in Integrations or you can define ad-hoc credentials which are only used and visible for this action. Since the ssh script runs with the defined ssh credentials, it is no longer limited to the agent user permissions. It runs with the permissions given to the ssh user. Use this action if you want to execute script commands with a user other than the agent user.

Starting with Avantra 20.11.5, this automation action depends on the global Avantra Master setting Security.EnableOSCodeExec and can only be used if it is set to true.

Send User Message

Send a message to all users logged in to the SAP system (SAPGUI).

Trigger Event Raise

Raising an SAP Event. The RFC function RSSM_EVENT_RAISE is called. This automation action can be used for example to start an SAP job.

RUN_JS Script

Executes a RUN_JS (RFC capable) script.