Register your SAP HANA databases with Systems Manager for SAP
You can register a single node or a high availability setup with multiple nodes for SAP HANA database with Systems Manager for SAP. Ensure that you have completed the setup perquisites described in Get started with Systems Manager for SAP. Follow along these steps to register your database.
Topics
Step 1: Create a JSON for credentials
Create a JSON file to store the credentials you created in Register SAP HANA database credentials in AWS Secrets Manager.
[ { "DatabaseName": "<YOUR_SID>/<YOUR_DATABASE_NAME>", "CredentialType": "ADMIN", "SecretId": "<YOUR_SECRET_NAME>" }, { "DatabaseName": "<YOUR_SID>/<ANOTHER_ONE_OF_YOUR_DATABASE_NAME>", "CredentialType": "ADMIN", "SecretId": "<YOUR_SECRET_NAME>" } ]
-
Enter a unique name for the JSON file. For example,
SsmForSapRegistrationCredentials.json
. -
For
DatabaseName
, ensure that you enter both, the system ID and the database name. -
For
SecretId
, use the Secret name created in Step 4 of Register SAP HANA database credentials in AWS Secrets Manager.
The following is an example JSON file.
[ { "DatabaseName": "HDB/SYSTEMDB", "CredentialType": "ADMIN", "SecretId": "HANABackup" }, { "DatabaseName": "HDB/HDB", "CredentialType": "ADMIN", "SecretId": "HANABackup" } ]
Step 2: Register database
Register your SAP HANA databases using the following command.
Make sure to use the correct SAP HANA database instance number and SAP HANA database name (SID). These are different than the SAP instance number and SAP System Identifier.
Command Template
aws ssm-sap register-application --application-id <APPLICATION_ID> --application-type HANA --instances <YOUR_EC2_INSTANCE_ID> --sap-instance-number <YOUR_HANA_DATABASE_SYSTEM_NUMBER> --sid <YOUR_HANA_DATABASE_SID> --region <REGION> --credentials file://<PATH_TO_YOUR_CREDENTIALS_JSON_FILE>
Example command with sample values
aws ssm-sap register-application \ --application-id myHanaApplication \ --application-type HANA \ --instances i-0123456789abcdefg \ --sap-instance-number 00 \ --sid HDB \ --region us-east-1 \ --credentials file://SsmForSapRegistrationCredentials.json
Example JSON response
{ "Application": { "Id": "myHanaApplication", "Type": "HANA", "Arn": "<APPLICATION_ARN>", "Status": "REGISTERING", "Components": [], "LastUpdated": "2022-08-19T10:58:48.521000-07:00" }, "OperationId": "6bd44104-d63c-449d-8007-6c1b471e3e5e" //(1) }
-
Take note of this operation ID. You’ll need it in the next step.
In the preceding example, the instance number is 00 and SID is HDB. This can be verified with /usr/sap/<SID>/HDB<instance number>
. For example, the path will be /usr/sap/HDB/HDB00
.
Note
To register a high availability SAP HANA database, you can input either the primary or the secondary instance ID with the --instances
parameter. For example, for a high availability SAP HANA database residing on primary node i-0123456789abcdefg
and secondary node i-9876543210abcdefg
, you can specify database registration in any one of the following ways.
-
--instances i-0123456789abcdefg
-
--instances i-9876543210abcdefg
Step 3: Check registration status
The registration may take a few minutes to complete. Use the following command to check the status of the registration. Replace <YOUR_OPERATION_ID>
with the OperationID
from the previous step.
aws ssm-sap get-operation --operation-id <YOUR_OPERATION_ID> --region <REGION>
Step 4: Verify registration
Verify the registration with GetApplication API. You can also view the details of registered databases with ListDatabases and GetDatabase API.
Command template
aws ssm-sap get-application --application-id <APPLICATON_ID> --region <REGION>
Example to get the summary of an application
aws ssm-sap get-application \ --application-id myHanaApplication \ --region us-east-1
Example output
{ "Application": { "Id": "myHanaApplication", "Type": "HANA", "Arn": "arn:aws:ssm-sap:us-east-1:123456789123:HANA/myHanaApplication", "Status": "ACTIVATED", "DiscoveryStatus": "SUCCESS", "Components": [ "HDB-HDB00" //(1) ], "LastUpdated": "2023-07-06T13:25:35.702000-07:00" }, "Tags": {} }
-
Take note of this component ID. You’ll need it in the next step.
Step 5: View component summary
Get the component summary with GetComponent API.
aws ssm-sap get-component --application-id <APPLICATION_ID> --component-id <YOUR_COMPONENT_ID_FROM_LAST_STEP> --region <REGION>
Systems Manager for SAP provides two types of components for an SAP HANA application – parent and child.
-
HANA
– there is only one parent component representing the logical database. -
HANA_NODE
– there are multiple child components representing database host entities.
See the following table for examples of single node and high availability SAP HANA database setup with Systems Manager for SAP.
Backup your database – optional
Now the registration is complete, and you can begin data protection operations, including backup and restore of your SAP HANA databases. For more details, see AWS Backup documentation.