lib/sles4sap/sap_host_agent.pm

SYNOPSIS

Package with functions related to interaction with SAP Host Agent (Command saphostctrl). Those can be used for collecting data about instances and performing various operations. Keep in mind that command needs to be executed using either root or sidadm.

saphostctrl_list_databases

saphostctrl_list_databases([as_root=>1]);

Uses saphostctrl to get list of all databases residing on host. Returns parsed output as ARRAYREF. Data for each DB is contained in a HASH Example: $VAR1 = { 'Hostname' => 'qesdhdb01l029', 'Release' => '2.00.075.00.1702888292', 'Vendor' => 'HDB', # HDB = SAP hana database (not SID) 'Type' => 'hdb', # type of hana DB - hdb, mdc (multitenant), systemdb 'Instance name' => 'PRD00' }; $VAR2 = { 'Hostname' => 'qesdhdb01l029', 'Type' => 'hdb', 'Release' => '2.00.075.00.1702888292', 'Instance name' => 'QAS01', 'Vendor' => 'HDB' };

parse_instance_name

parse_instance_name($instance_name);

Splits instance name into SID and instance ID. Example: DBH01 -> sid=DBH, id=01