You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sap/workloads/disaster-recovery-sap-hana.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Requirements for additional HSR sites are different for HANA scale-up and HANA s
61
61
62
62
## HANA scale-up: Add HANA multitarget system replication for DR purposes
63
63
64
-
With SAP HANA HA hooks SAPHanaSR/susHanaSR for [SLES](./sap-hana-high-availability.md#implement-hana-resource-agents) and [RHEL](./sap-hana-high-availability-rhel.md#implement-the-python-system-replication-hook-saphanasr), you can add additional sites to HANA system replication. The Pacemaker environment is aware of a HANA multitarget setup.
64
+
With SAP HANA HA hooks SAPHanaSR/susHanaSR for [SLES](./sap-hana-high-availability.md#implement-hana-resource-agents) and [RHEL](./sap-hana-high-availability-rhel.md#implement-sap-hana-system-replication-hooks), you can add additional sites to HANA system replication. The Pacemaker environment is aware of a HANA multitarget setup.
65
65
66
66
Failure of additional sites doesn't trigger any cluster action. The cluster detects the replication status of connected sites and the monitored attribute for the third site can change between `SOK` and `SFAIL` states. Any takeover tests to the additional site or executing your DR exercise process should first place the cluster resources into maintenance mode to prevent any undesired cluster action.
Copy file name to clipboardExpand all lines: articles/sap/workloads/sap-hana-high-availability-netapp-files-red-hat.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -419,7 +419,7 @@ Follow the steps in [Set up Pacemaker on Red Hat Enterprise Linux](./high-availa
419
419
420
420
### Implement the Python system replication hook SAPHanaSR
421
421
422
-
This step is an important one to optimize the integration with the cluster and improve the detection when a cluster failover is needed. We highly recommend that you configure the SAPHanaSR Python hook. Follow the steps in [Implement the Python system replication hook SAPHanaSR](sap-hana-high-availability-rhel.md#implement-the-python-system-replication-hook-saphanasr).
422
+
This step is an important one to optimize the integration with the cluster and improve the detection when a cluster failover is needed. We highly recommend that you configure the SAPHanaSR Python hook. Follow the steps in [Implement the Python system replication hook SAPHanaSR](sap-hana-high-availability-rhel.md#implement-sap-hana-system-replication-hooks).
@@ -217,44 +217,7 @@ The steps in this section use the following prefixes:
217
217
*[2593824 - Linux: Running SAP applications compiled with GCC 7.x](https://launchpad.support.sap.com/#/notes/2593824)
218
218
*[2886607 - Linux: Running SAP applications compiled with GCC 9.x](https://launchpad.support.sap.com/#/notes/2886607)
219
219
220
-
1.**[A]** Install the SAP HANA.
221
-
222
-
To install SAP HANA System Replication, see [Automating SAP HANA Scale-Up System Replication using the RHEL HA Add-On](https://access.redhat.com/articles/3004101).
223
-
224
-
Run the **hdblcm** program from the HANA DVD. Enter the following values at the prompt:
225
-
1. Choose installation: Enter **1**.
226
-
1. Select additional components for installation: Enter **1**.
227
-
1. Enter **Installation Path**[/hana/shared]: Select Enter.
228
-
1. Enter **Local Host Name [..]**: Select Enter.
229
-
1.**Do you want to add additional hosts to the system? (y/n)**[n]: Select Enter.
230
-
1. Enter **SAP HANA System ID**: Enter the SID of HANA, for example: **HN1**.
231
-
1. Enter **Instance Number**[00]: Enter the HANA Instance number. Enter **03** if you used the Azure template or followed the manual deployment section of this article.
232
-
1. Select **Database Mode / Enter Index**[1]: Select Enter.
233
-
1. Select **System Usage / Enter Index**[4]: Select the system usage value.
234
-
1. Enter **Location of Data Volumes**[/hana/data]: Select Enter.
235
-
1. Enter **Location of Log Volumes**[/hana/log]: Select Enter.
236
-
1.**Restrict maximum memory allocation?**[n]: Select Enter.
237
-
1. Enter **Certificate Host Name For Host '...'**[...]: Select Enter.
238
-
1. Enter **SAP Host Agent User (sapadm) Password**: Enter the host agent user password.
239
-
1. Confirm **SAP Host Agent User (sapadm) Password**: Enter the host agent user password again to confirm.
240
-
1. Enter **System Administrator (hdbadm) Password**: Enter the system administrator password.
241
-
1. Confirm **System Administrator (hdbadm) Password**: Enter the system administrator password again to confirm.
242
-
1. Enter **System Administrator Home Directory**[/usr/sap/HN1/home]: Select Enter.
243
-
1. Enter **System Administrator Login Shell**[/bin/sh]: Select Enter.
244
-
1. Enter **System Administrator User ID**[1001]: Select Enter.
245
-
1. Enter **ID of User Group (sapsys)**[79]: Select Enter.
246
-
1. Enter **Database User (SYSTEM) Password**: Enter the database user password.
247
-
1. Confirm **Database User (SYSTEM) Password**: Enter the database user password again to confirm.
248
-
1.**Restart system after machine reboot?**[n]: Select Enter.
249
-
1.**Do you want to continue? (y/n)**: Validate the summary. Enter **y** to continue.
250
-
251
-
1.**[A]** Upgrade the SAP Host Agent.
252
-
253
-
Download the latest SAP Host Agent archive from the [SAP Software Center][sap-swcenter] and run the following command to upgrade the agent. Replace the path to the archive to point to the file that you downloaded:
254
-
255
-
```bash
256
-
sudo /usr/sap/hostctrl/exe/saphostexec -upgrade -archive <path to SAP Host Agent>;
257
-
```
220
+
1.**[A]** Install SAP HANA, following [SAP's documentation](https://help.sap.com/docs/SAP_HANA_PLATFORM/2c1988d620e04368aa4103bf26f17727/2d4de94c8bf14cda8d37278647fff8ab.html).
258
221
259
222
1.**[A]** Configure the firewall.
260
223
@@ -285,8 +248,6 @@ The steps in this section use the following prefixes:
285
248
286
249
1.**[1]** Create the tenant database.
287
250
288
-
If you're using SAP HANA 2.0 or MDC, create a tenant database for your SAP NetWeaver system. Replace **NW1** with the SID of your SAP system.
289
-
290
251
Run the following command as <hanasid\>adm:
291
252
292
253
```bash
@@ -350,77 +311,6 @@ The steps in this section use the following prefixes:
350
311
# site name: SITE1
351
312
```
352
313
353
-
## Configure SAP HANA 1.0 System Replication
354
-
355
-
The steps in this section use the following prefixes:
356
-
357
-
***[A]**: The step applies to all nodes.
358
-
***[1]**: The step applies to node 1 only.
359
-
***[2]**: The step applies to node 2 of the Pacemaker cluster only.
360
-
361
-
1.**[A]** Configure the firewall.
362
-
363
-
Create firewall rules to allow HANA System Replication and client traffic. The required ports are listed on [TCP/IP Ports of All SAP Products](https://help.sap.com/viewer/ports). The following commands are just an example to allow HANA 2.0 System Replication. Adapt it to your SAP HANA 1.0 installation.
Run the following command as root. Make sure to replace the values for HANA System ID (for example, **HN1**), instance number (**03**), and any usernames, with the values of your SAP HANA installation:
373
-
374
-
```bash
375
-
PATH="$PATH:/usr/sap/HN1/HDB03/exe"
376
-
hdbsql -u system -i 03 'CREATE USER hdbhasync PASSWORD "passwd"'
377
-
hdbsql -u system -i 03 'GRANT DATA ADMIN TO hdbhasync'
378
-
hdbsql -u system -i 03 'ALTER USER hdbhasync DISABLE PASSWORD LIFETIME'
379
-
```
380
-
381
-
1.**[A]** Create the keystore entry.
382
-
383
-
Run the following command as root to create a new keystore entry:
384
-
385
-
```bash
386
-
PATH="$PATH:/usr/sap/HN1/HDB03/exe"
387
-
hdbuserstore SET hdbhaloc localhost:30315 hdbhasync passwd
388
-
```
389
-
390
-
1.**[1]** Back up the database.
391
-
392
-
Back up the databases as root:
393
-
394
-
```bash
395
-
PATH="$PATH:/usr/sap/HN1/HDB03/exe"
396
-
hdbsql -d SYSTEMDB -u system -i 03 "BACKUP DATA USING FILE ('initialbackup')"
397
-
```
398
-
399
-
If you use a multitenant installation, also back up the tenant database:
400
-
401
-
```bash
402
-
hdbsql -d HN1 -u system -i 03 "BACKUP DATA USING FILE ('initialbackup')"
403
-
```
404
-
405
-
1.**[1]** Configure system replication on the first node.
406
-
407
-
Create the primary site as <hanasid\>adm:
408
-
409
-
```bash
410
-
su - hdbadm
411
-
hdbnsutil -sr_enable –-name=SITE1
412
-
```
413
-
414
-
1.**[2]** Configure system replication on the secondary node.
Follow the steps in [Setting up Pacemaker on Red Hat Enterprise Linux in Azure](high-availability-guide-rhel-pacemaker.md) to create a basic Pacemaker cluster for this HANA server.
@@ -430,34 +320,23 @@ Follow the steps in [Setting up Pacemaker on Red Hat Enterprise Linux in Azure](
430
320
>
431
321
> When using HA solutions to manage SAP HANA system replication in combination with systemd-enabled SAP HANA instances (refer to SAP Note [3189534](https://me.sap.com/notes/3189534)), additional steps are necessary to ensure that the HA cluster can manage the SAP instance without systemd interference. So, for SAP HANA system integrated with systemd, additional steps outlined in [Red Hat KBA 7029705](https://access.redhat.com/solutions/7029705) must be followed on all cluster nodes.
432
322
433
-
## Implement the Python system replication hook SAPHanaSR
323
+
## Implement SAP HANA system replication hooks
434
324
435
-
This important step optimizes the integration with the cluster and improves the detection when a cluster failover is needed. We highly recommend that you configure the SAPHanaSR Python hook.
325
+
This important step optimizes the integration with the cluster and improves the detection when a cluster failover is needed. It is mandatory for correct cluster operation to enable the SAPHanaSR hook. We highly recommend that you configure both SAPHanaSR and ChkSrv Python hooks.
436
326
437
-
1.**[A]** Install the SAP HANA resource agents on **all nodes**. Make sure to enable a repository that contains the package. You don't need to enable more repositories, if you're using an RHEL 8.x HA-enabled image.
327
+
1.**[A]** Install the SAP HANA resource agents on **all nodes**. Make sure to enable a repository that contains the package. You don't need to enable more repositories, if you're using an RHEL 8.x or higher HA-enabled image.
438
328
439
329
```bash
440
330
# Enable repository that contains SAP HANA resource agents
1.**[A]** Install the HANA `system replication hooks`. The configuration for the replication hooks needs to be installed on both HANA DB nodes.
461
340
462
341
1. Stop HANA on both nodes. Run as <sid\>adm.
463
342
@@ -470,13 +349,24 @@ This important step optimizes the integration with the cluster and improves the
470
349
```output
471
350
[ha_dr_provider_SAPHanaSR]
472
351
provider = SAPHanaSR
473
-
path = /hana/shared/myHooks
352
+
path = /usr/share/SAPHanaSR/srHook
474
353
execution_order = 1
475
-
354
+
355
+
[ha_dr_provider_chksrv]
356
+
provider = ChkSrv
357
+
path = /usr/share/SAPHanaSR/srHook
358
+
execution_order = 2
359
+
action_on_lost = kill
360
+
476
361
[trace]
477
362
ha_dr_saphanasr = info
363
+
ha_dr_chksrv = info
478
364
```
479
365
366
+
If you point parameter `path` to the default `/usr/share/SAPHanaSR/srHook` location, the Python hook code updates automatically through OS updates or package updates. HANA uses the hook code updates when it next restarts. With an optional own path like `/hana/shared/myHooks`, you can decouple OS updates from the hook version that HANA will use.
367
+
368
+
You can adjust the behavior of `ChkSrv` hook by using the `action_on_lost` parameter. Valid values are [ `ignore`|`stop`|`kill` ].
369
+
480
370
1. **[A]** The cluster requires `sudoers` configuration on each cluster node for<sid\>adm. In this example, that's achieved by creating a new file. Use the `visudo` command to edit the `20-saphana` drop-in file as `root`.
481
371
482
372
```bash
@@ -500,7 +390,7 @@ This important step optimizes the integration with the cluster and improves the
500
390
sapcontrol -nr 03 -function StartSystem
501
391
```
502
392
503
-
1. **[1]** Verify the hook installation. Run as <sid\>adm on the active HANA system replication site.
393
+
1. **[1]** Verify the SRHanaSR hook installation. Run as <sid\>adm on the active HANA system replication site.
504
394
505
395
```bash
506
396
cdtrace
@@ -514,7 +404,14 @@ This important step optimizes the integration with the cluster and improves the
514
404
# 2021-04-12 21:37:04.898680 ha_dr_SAPHanaSR SOK
515
405
```
516
406
517
-
For more information on the implementation of the SAP HANA System Replication hook, see [Enable the SAP HA/DR provider hook](https://access.redhat.com/articles/3004101#enable-srhook).
407
+
1. **[1]** Verify the ChkSrv hook installation. Run as <sid\>adm on the active HANA system replication site.
408
+
409
+
```bash
410
+
cdtrace
411
+
tail -20 nameserver_chksrv.trc
412
+
```
413
+
414
+
For more information on the implementation of the SAP HANA hooks, see [Enabling the SAP HANA srConnectionChanged() hook](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_for_sap_solutions/8/html-single/automating_sap_hana_scale-up_system_replication_using_the_rhel_ha_add-on/index#con_enable_hook_automating-sap-hana-scale-up-system-replication) and [Enabling the SAP HANA srServiceStateChanged() hook for hdbindexserver process failure action (optional)](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_for_sap_solutions/8/html-single/automating_sap_hana_scale-up_system_replication_using_the_rhel_ha_add-on/index#con_enable_hdbindexserver_automating-sap-hana-scale-up-system-replication).
0 commit comments