
Following diagram is a reference architecture for SAP Netweaver & ASE DB HA on Windows Server in Microsoft Azure .
Hostname | Description | OS Version | DB Version | SAP & DB SID |
azwinascs1 | ASCS/ERS Node1 + Fault Manager | Windows 2019 | - | PR1 |
azwinascs2 | ASCS Node2 + Fault Manager | Windows 2019 | - | |
Pr1-ascsha | Virtual hostname for ASCS Cluster | - | - | |
azwinsydb1 | ASE DB Node1 (Primary) | Windows 2019 | ASE 16.0.03.07 | |
azwinsydb2 | ASE DB Node1 (Secondary) | Windows 2019 | ASE 16.0.03.07 | |
azwinpas1 | SAP Primary Application Server | Windows 2019 | - | |
sofssycl1 | SOFS Node1 | Windows 2016 | - | |
sofssycl2 | SOFS Node2 | Windows 2016 |
Skipping other SWPM standard installation screenshots. Recommendation is to keep the DB data and Log files in separate Disks.
Once DB installation is finished, Install the PAS & AAS instances.
Sample file are attached in the link.
Update SID, hostname, userid, passwords, port numbers and path in the sample files.
.\setupConsole -f M:\sybase\sybdb1_dma.rs -i silent
isql -Usapsso -P<password> -SPR1 -X
>sp_locklogin sa, unlock
>go
sc create SybaseDRAgent_PR1 binpath=M:\sybase\PR1\DM\RMA-16_0\compatibility\WinService\x64\Release\drservice.exe obj=contoso234\sybpr1 password="<password>"
cd M:\sybase\PR1\ASE-16_0\bin
setuphadr.bat M:\sybase\sybdb1_setup_hadr.rs
Rename the profile directory(path is mentioned in the error) to profile1 temporarily to bypass the issue. Rename it back to profile as soon as we reach to next screen in swpm.
Skipping other SWPM standard installation screenshots. Recommendation is to keep the DB data and Log files in separate Disks.
Sample file are attached in the link.
Update SID, hostname, userid, passwords,port numbers and path in the sample files.
.\setupConsole -f M:\sybase\sybdb2_dma.rs -i silent
isql -Usapsso -P<password> -SPR1 -X
>sp_locklogin sa, unlock
>go
sc create SybaseDRAgent_PR1 binpath=M:\sybase\PR1\DM\RMA-16_0\compatibility\WinService\x64\Release\drservice.exe obj=contoso234\sybpr1 password="<Password>"
cd M:\sybase\PR1\ASE-16_0\bin
setuphadr.bat M:\sybase\sybdb2_setup_hadr.rs
isql -UDR_admin -P<password> -Sazwinsydb1:4909
sap_set_replication_service Site1, contoso234\sybpr1, <password>
sap_set_replication_service Site1, restart
isql -UDR_admin -P<password> -Sazwinsydb2:4909
sap_set_replication_service Site2, contoso234\sybpr1, <password>
sap_set_replication_service Site2, restart
Make sure SAPLOCALHOST parameter points the Fileshare Name.
In both the DB Nodes. Login as <sid>adm user and Run the following command.
rsecssfx put DB_CONNECT/SYB/DR_USER DR_admin -plain
rsecssfx put DB_CONNECT/SYB/DR_PASSWORD <password of DR_admin>
In both the DB Nodes, Login as syb<sid> user and run the following command.
cd C:\Program Files\SAP\hostctrl\exe
saphostctrl -user sapadm <password of sapadm> -function LiveDatabaseUpdate -dbname PR1 -dbtype syb -dbuser DR_admin -dbpass <password of DR_admin> -updatemethod Execute -updateoption TASK=SET_USER_PASSWORD -updateoption USER=DR_ADMIN
Perform these steps on the Primary and Secondary DB servers to configure Replication Server to specify the maximum number of the CPUs and the maximum size of the memory for the Replication Server instance.
In DB Node 1 & 2, Login as syb<sid> and run the following command
sap_tune_rs Site1, 6, 2 (In Node 1)
sap_tune_rs Site2, 6, 2 (in Node 2)
saphostctrl -user sapadm <password of sapadm> - -function LiveDatabaseUpdate -dbname PR1 -dbtype syb -updatemethod Check -updateoption TASK=REPLICATION_STATUS
Refer to SAP Note 1891560.
Adapt the user environment for <sid>adm:
Adapt dbs_syb_ha:
dbs_syb_ha = 1
Adapt dbs_syb_server:
The host name can contain a list of host names:
dbs_syb_server = <primary hostname>:<standby hostname>
The port can contain a list of ports:
dbs_syb_port =<primary_port>:<standby_port>
If both ports are equal, this parameter is not required.
Restart the SAP application servers to activate the changes.
Only for Netweaver Java environment.
Open the config tool and To enable failover for the J2EE Engine / Java EE, you have to change the connection URL in the secure storage (see SAP Note 867976):
jdbc:sybase:Tds:<hostname1:port1>,<hostname2:port2>/<SID>?<your current parameters>&HADR_MODE=NONE
<hostname1> is the name of the server of your primary node, and <hostname2> is the name of your standby node. The same applies for the port numbers. The parameter HADR_MODE=NONE does NOT mean that data replication is switched off.
SAPLOCALHOST=sapglobal (Fileshare Name)
RSEC_SSFS_KEYPATH=\\sapglobal\sapmnt\PR1\SYS\global\security\rsecssfs\key
set RSEC_SSFS_DATAPATH=\\sapglobal\sapmnt\PR1\SYS\global\security\rsecssfs\data
C:\Program Files\SAP\hostctrl\exe>rsecssfx list
C:\usr\sap\PR1\ASCS00\work>set Path=%Path%;\\sapglobal\sapmnt\PR1\SYS\global\syb\NTAMD64\sybodbc
C:\Program Files\SAP\hostctrl\exe>\\sapglobal\sapmnt\PR1\SYS\exe\uc\NTAMD64\sybdbfm install
replication manager agent user DR_admin and password set in Secure Store.
Keep existing values (yes/no)? (yes)
SAPHostAgent connect user: (sapadm)
Enter password for user sapadm.
Enter value for SAPLOCALHOST: (sapglobal)
Enter value for primary database host: (azwinsyascs2)
azwinsydb1
Enter value for primary database name: (PR1)
PR1
Enter value for primary database port: (4901)
Enter value for primary site name:
Site1
Enter value for primary database heart beat port: (13777)
Enter value for standby database host: (azwinsyascs2)
azwinsydb2
Enter value for standby database name: (PR1)
Enter value for standby database port: (4901)
Enter value for standby site name :
Site2
Enter value for standby database heart beat port: (13787)
Enter value for fault manager host: (sapglobal)
azwinsyascs2
Enter value for heart beat to heart beat port: (13797)
Enter value for support for floating database ip: (no)
Enter value for use SAP ASE Cockpit if it is installed and running: (no)
installation finished successfully.
#-----------------------------------------------------------------------
# Start sybha
#-----------------------------------------------------------------------
_SYBHAD = $(DIR_EXECUTABLE)\sybdbfm$(FT_EXE)
_SYBHA_PF = $(DIR_PROFILE)\SYBHA.PFL
Restart_Program_06 = local $(_SYBHAD) hadm pf=$(_SYBHA_PF)
C:\usr\sap\PR1\ASCS00\work>sybdbfm status
fault manager running, pid = 8284, fault manager overall status = OK, currently executing in mode PAUSING
*** sanity check report (14)***.
node 1: server azwinjsydb1, site Site1.
db host status: OK.
db status OK hadr status STANDBY.
node 2: server azwinjsydb2, site Site2.
db host status: OK.
db status OK hadr status PRIMARY.
replication status: SYNC_OK.
failover prerequisites fulfilled: YES.
Login to one of the DB Node as user syb<sid> and run the following command as
C:\Program Files\SAP\hostctrl\exe>saphostctrl -user sapadm <password of sapadm> - -function LiveDatabaseUpdate -dbname PR1 -dbtype syb -updatemethod Execute -updateoption TASK=FAILOVER -updateoption FAILOVER_FORCE=1 -updateoption FAILOVER_TIME=30
FM will detect the failover and show the status as Primary role switches to DB Node2.
C:\usr\sap\PR1\ASCS00\work>sybdbfm status
fault manager running, pid = 8284, fault manager overall status = OK, currently executing in mode PAUSING
*** sanity check report (14)***.
node 1: server azwinsydb1, site Site1.
db host status: OK.
db status OK hadr status STANDBY.
node 2: server azwinsydb2, site Site2.
db host status: OK.
db status OK hadr status PRIMARY.
replication status: SYNC_OK.
failover prerequisites fulfilled: YES.
We can crash the ASE DB (Primary) using the tool ‘notmyfault’. FM will detect the unavailability of Primary DB and turn the secondary DB as Primary.
C:\usr\sap\PR1\ASCS00\work>sybdbfm status
fault manager running, pid = 8284, fault manager overall status = OK, currently executing in mode PAUSING
*** sanity check report (6901)***.
node 1: server azwinsydb1, site Site1.
db host status: OK.
db status DB DEAD hadr status UNREACHABLE.
node 2: server azwinsydb2, site Site2.
db host status: OK.
db status OK hadr status PRIMARY.
replication status: INDOUBT.
failover prerequisites fulfilled: NO.
Once the VM is restarted. Start the ASE DB and Replication server Services.
Once the command is completed, FM will show that DB sync is OK.
C:\usr\sap\PR1\SCS01\work>sybdbfm status
fault manager running, pid = 8284, fault manager overall status = OK, currently executing in mode PAUSING
*** sanity check report (9126)***.
node 1: server azwinjsydb1, site Site1.
db host status: OK.
db status OK hadr status STANDBY.
node 2: server azwinjsydb2, site Site2.
db host status: OK.
db status OK hadr status PRIMARY.
replication status: SYNC_OK.
failover prerequisites fulfilled: YES.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
10 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |