Register your SAP HANA databases with AWS Systems Manager for SAP
You can register a single node or a high availability setup with multiple nodes for SAP HANA database with AWS Systems Manager for SAP. Ensure that you have completed the setup perquisites described in Get started with AWS Systems Manager for SAP. Follow along these steps to register your database.
Steps
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.
Step 2: Register database
Register your SAP HANA databases using the following command.
Pass the credentials using the JSON file created in Step 1.
// Command template aws ssm-sap register-application \ --application-id
<myApplication>
\ --application-type HANA \ --instances<YOUR_EC2_INSTANCE_ID>
\ --sap-instance-number<YOUR_HANA_SYSTEM_NUMBER>
\ --sid<YOUR_HANA_SID>
\ --region us-east-1 \ --credentials file://<PATH_TO_YOUR_CREDENTIALS_JSON_FILE>
// Example command with sample values aws ssm-sap register-application \ --application-id<myApplication>
\ --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": "myApplication", "Type": "HANA", "Arn": "<APPLICATION_ARN>", "Status": "REGISTERING", "Components": [], "LastUpdated": "2022-08-19T10:58:48.521000-07:00" }, "OperationId": "6bd44104-d63c-449d-8007-6c1b471e3e5e" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // Take note of this operation ID. You'll need it in the next step. }
Note the OperationID
for the next step.
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 approximately five minutes to complete. Use the
following command to check the status of the registration. Replace
with the
<Your_Operation_ID>
OperationID
from the previous step.
aws ssm-sap get-operation \ --operation-id
<YOUR_OPERATION_ID>
\ --region us-east-1
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
<myApplication>
\ --regionus-east-1
// Example to get the summary of an application aws ssm-sap get-application \ --application-id<myApplication>
\ --regionus-east-1
// Example output { "Application": { "Id": "myApplication", "Type": "HANA", "Arn": "arn:aws:ssm-sap:us-east-1:123456789123:HANA/myApplication", "AppRegistryArn": "arn:aws:servicecatalog:us-east-1:123456789123:/applications/myApplication", "Status": "ACTIVATED", "DiscoveryStatus": "SUCCESS", "Components": [ "HDB-HDB00" ^^^^^^^^^^^ // Take note of this component ID. You'll need it in the next step. ], "LastUpdated": "2023-07-06T13:25:35.702000-07:00" }, "Tags": {} }
Step 5: View component summary
Get the component summary with GetComponent
API.
// Command template aws ssm-sap get-component \ --application-id
<myApplication>
\ --component-id<YOUR_COMPONENT_ID_FROM_LAST_STEP>
--regionus-east-1
AWS 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 AWS 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.