Skip to Content
Technical Articles
Author's profile photo Katrin Helm

HADR with dedicated network for replication | SAP ASE 16.0 SP03 (non BS)

This blog post should detail all required and additional steps to enable/setup a dedicated network for the replication data traffic within a SAP Adaptive Server Enterprise (ASE) with enabled always-on option in a non Business Suite environment.

Following setup will be considered:

(A DR setup – with a third node – is not part of this guide yet)

 

The purposes of a dedicated replication network are:

  • Productive communication independent
  • Inital SRS setup does not interfere with the running operation
  • Higher bandwidths achievable
  • More secure in communication (additional/dedicated firewalls/-rules possible)

 

Scope of this guideline:

  1. Adjust environment on PRIM and COMP server
  2. Additional configuration in RMA bootstrap file
  3. Parameter changed in setup_hadr.rs file in accordance to the original one

 

Prerequisites/Environment:

 

**********

 

1. Adjust the environment

After all prerequisites are fulfilled, the adjustment of the environment on PRIM and COMP server can take place. Therefor following steps has to be done on each participating HADR side:

  • If no DNS entry available/possible, the IP address and the appropriate new hostname (e.g. <host>rep) of all parties has to be entered into the /etc/hosts to enable the resolution of them:
    :~ # vi /etc/hosts
    123.456.0.0      primaryrep.domain.com       primaryrep
    123.456.0.1      comprep.domain.com          comprep​

 

  • Adjust the entries in the interfaces file on each side, that backup server and the dataserver will listen to the replication hostname.
    For the dataserver an additional master entry is required with the rep-hostname to setup an additional listener. The query entry is optional just for client application – but it is not relevant for replication.For the backup server entry the hostname has to be completely replaced by the replication hostname.The backup server is not able to listen to more than one hostname, that’s why it has to be replaced completely. The SRS setup is performing a dump and load which should not affect the  productive communication, so we redirect the setup traffic trough the replication network as well.Example for the primary host (please enter the companion host name on companion side):

    /sybase/<SID>: vi interfaces
    
    <SID>
    master tcp ether primary     4901
    master tcp ether primaryrep  4901
    query  tcp ether primary     4901
    
    <SID>_BS
    master tcp ether primaryrep  4902
    query  tcp ether primaryrep  4902
    
    <SID>_JSAGENT
    master tcp ether primary     4903
    query  tcp ether primary     4903

    Now a restart of the dataserver and backup server is needed to change the listeners for persistency

    To skip an immediate restart of the dataserver, the listener can be added temporary via command “sp_listener” as follows:

    1> sp_listener start, 'tcp:primaryrep:4901'
    2> go

    Caution: this is just a temporary solution if the interfaces file was not adjusted – the configuration will be reverted after a restart if the entry in the interfaces file is missing. With each restart, the configuration of the interfaces file is loaded.

2. Adjust the RMA

The host name of the replication network has now to be entered into the bootstrap file of the RMA. This step is necessary to “allow the RMI/JMW socket to be bound to a specific network interface” as mentioned in the file itself:

  • Switch to the config folder of RMA as syb<sid> user ($SYBASE/DM/RMA-16_0/config/)
  • open the bootstrap.prop file
  • Add the IP address of the “own” replication network of this server to the section “java.rmi.server.hostname”
    # ## The following settings allow the RMI/JMX socket to be bound to a specific network interface
    java.rmi.server.hostname=123.456.0.0

If there is no matching folder as described above, please check the last point of the prerequisites.

 

3. Changes in setup_hadr.rs file

During the the setup of HADR, the execution of setuphadr command is necessary – for more information and a sample of the repsonse file to be provided see HADR User Guide / Run setuphadr to Configure HADR.

Following sections has to be adjusted in the response file to configure the replication network as default communication path:

###############################################################################
# Site "PRIM" on host host1 with primary role
###############################################################################

# Host name where SAP ASE run
#
# Enter fully qualified domain name (FQDN)
# if your sites are on different subnet.
PRIM.ase_host_name=primaryrep.domain.com

# We don't support ASE and SRS on different hosts yet
# This is virtual host name for SRS\RMA
# Optional property
#
# Enter fully qualified domain name (FQDN)
# if your sites are on different subnet.
PRIM.rma_host_name=primaryrep.domain.com



[...]


###############################################################################
# Site "COMP" on host host2 with companion role
###############################################################################

# Host name where SAP ASE run
#
# Enter fully qualified domain name (FQDN)
# if your sites are on different subnet.
COMP.ase_host_name=comprep.domain.com

# We don't support ASE and SRS on different hosts yet
# This is virtual host name for SRS\RMA
# Optional property
#
# Enter fully qualified domain name (FQDN)
# if your sites are on different subnet.
COMP.rma_host_name=comprep.domain.com

 

Finalizing

Now the setup can be finalized as documented in the HADR User Guide which can be found here.

After all steps are done, the HA/DR setup should look like this:

(output of dbacockpit with latest BALDR version)

Thanks a lot for reading this guide. If you have any questions, do not hesitate to ask them via Q&A section in the community.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mayank Pratap Singh
      Mayank Pratap Singh

      Thank You for this article .

      Can you kindly suggest in my case .

      Background : Objective is to enable ASE HA /DR capability to ensure high availability for SAP Information Platform services(IPS)/Data Services/Information steward install.

      I have installed ASE and enabled the replication between primary and secondary database nodes for ease of understanding let us call X as the primary node and Y as the secondary node . The replication runs smoothly .

      Now I have installed ASE Fault manager(FM) with virtual hostname as Z with virtual port as 4500 on a third node lets say the hostname running the fault manager is A.

      I intend to use the virtual hostname created during the install of FM in the installation of IPS.

      However I find there is an error returning from the FM as unable to connect to the virtual host.

      Precisely the error looks as

      "09 09:25:09.260 (105606) Driver full version: SAP ASE ODBC Driver/16.0.02.04/16.0 SP02 PL04/P/x86_64/Linux/drv16/Build 1/64-bit/Normal/Fri May 13 UTC 03:01:05 2016/SQLLEN4
      2019 12/09 09:25:09.265 (105606) ERROR in function SQLConnectWithRetry (1349) (SQLConnectWithRetry failed): (30010) [08001] [SAP][ASE ODBC Driver]Client unable to establish a connection
      2019 12/09 09:25:09.271 (105606) ERROR in function SQLConnectWithRetry (1349) (SQLConnectWithRetry failed): (30010) [08001] [SAP][ASE ODBC Driver]Client unable to establish a connection
      2019 12/09 09:25:09.277 (105606) ERROR in function SQLConnectWithRetry (1349) (SQLConnectWithRetry failed): (30010) [08001] [SAP][ASE ODBC Driver]Client unable to establish a connection
      2019 12/09 09:25:09.277 (105606) Connection failed using DRIVER={Adaptive Server Enterprise};server=dsrasedbv.twutil.net;port=4500;uid=sa;pwd=xxxxxxxx;EncryptPassword=1;logintimeout=3;CommandTimeOut=3;;EnableRedirection=0;.
      2019 12/09 09:25:09.277 (105606) call exited (exit code -1).
      2019 12/09 09:25:09.278 (105606) driver name: Adaptive Server Enterprise"

       

      Questions

      a. Do I need to add the virtual hostname along with the virtual port in the interfaces file of both the nodes ie primary and secondary. Will that resolve this issue.

      b. How will the virtual host map both the physical hostnames/IPs of the primary and secondary nodes.

      c. Do I need to add a listener using sp_listener to run on port 4500 on both primary/secondary node.

      d. Is it feasible that I can use the virtual host name created during FM install in the installation of IPS ?

      An early response is highly appreciated as I am unable to install the production system and go-live is impacted.

      Thanks and Regards

      Kausik Mitra