Task 02. Stop Database

Let’s learn how the cluster works when the HANA database is stopped


Stop Primary Database on prihana

When HDB STOP occurs in primary node prihana, check whether secondary node sechana node is normally changed to the primary node. image02

  1. Connect to EC2 Instance Console

  2. Select HANA-HDB-Primary instance and click Connect. image01-01

  3. Select Session Manager, click Connect and then connect to prihana instance through Session Manager. image01-02

  4. Stop HANA DB on prihana (use hdbadm user)

    sudo su - hdbadm
    HDB stop
    

    image01-07

  5. Check cluster and HSR status on sechana

  6. Connect to EC2 Instance Console

  7. Select HANA-HDB-Secondary instance and click Connect. image01-08

  8. Select Session Manager, click Connect and then connect to sechana instance through Session Manager. image01-02

  9. Check cluster status.

    • crm_mon is a command that provides the current state of cluster (use root user).
    • Execute the command below to check if sechana is in Master status.
    sudo su -
    crm_mon -rfn1
    

    image01-09

  10. Check SAP HANA System Replication (HSR)

    • Using SAPHanaSR-showAttr, prihana node confirms SOK (use root user)
    SAPHanaSR-showAttr
    

    image01-10

  11. After taking over, clean up the resource status

    crm resource cleanup rsc_SAPHanaTopology_HDB_HDB00
    

    image01-11

  12. Connect to Bastion Host and check the Dashboard of HAWK web (refer to Lab02)

    • You can see that Overlay IP Resource has been moved to sechana. image01-12

Stop Primary Database on sechana

When HDB STOP occurs in primary node sechana, check whether secondary node prihana node is normally changed to primary node. image03

  1. Connect to EC2 Instance Console

  2. Select HANA-HDB-Secondary instance and click Connect. image01-08

  3. Select Session Manager, click Connect and then connect to sechana instance through Session Manager. image01-02

  4. Stop HANA DB on sechana (use hdbadm user)

    sudo su - hdbadm
    HDB stop
    

    image01-13

  5. Check cluster and HSR status on prihana.

  6. Connect to EC2 Instance Console

  7. Select HANA-HDB-Primary instance and click Connect. image01-01

  8. Select Session Manager, click Connect and then connect to prihana instance through Session Manager. image01-02

  9. Check cluster status.

    • crm_mon is a command that provides the current state of cluster (use root user).
    • Execute the command below to check if prihana is in Master status.
    sudo su -
    crm_mon -rfn1
    

    image01-14

  10. Check SAP HANA System Replication (HSR)

    • Using SAPHanaSR-showAttr, sechana node confirms SOK (use root user)
    SAPHanaSR-showAttr
    

    image01-15

  11. After taking over, clean up the resource status

    crm resource cleanup rsc_SAPHanaTopology_HDB_HDB00
    

    image01-11

  12. Connect to Bastion Host and check the Dashboard of HAWK web (refer to Lab02)

    • You can see that Overlay IP Resource has been moved to prihana. image01-16

© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.