SAP ASE HADR Setup for IDM
2023-11-8 15:36:8 Author: blogs.sap.com(查看原文) 阅读量:11 收藏

Introduction

Intention of this blog is to introduce a prototype setup for configuring HADR for the SAP IDM 8.0 based on SAP Adaptive Server Enterprise.  The SAP Identity Management Setup requires two SAP Adaptive Server Enterprise installations on each host. Key point to note for this scenario:

  • Primary and Standby must have the same:
    • Operating system and its patch levels
    • SAP ASE versions
    • ASE Configuration
    • ASE Logins / Passwords
    • Character Set
    • Sort Order

You can refer to the HADR Users Guide (Link) for more information on pre-requisites and further configuration, troubleshooting and tuning of both HADR environments.

This blog explains how to set this up based on the following steps:

  • SAP IDM System Installation on Primary and Secondary Site
    • SAP Netweaver 7.5 Java Installation
    • SAP ASE Database Instance for SAP Identity Management System
    • SAP Identity Management Standard System
  • Installing Data Movement Option
    • Java Instance
    • IDM Instance
  • Configuring HADR on Primary Host
    • SAP ASE for Java Instance
      • Prepare response file for executing setuphadr on J50 Instance
      • Execute “setuphadr” tool to configure HADR on Primary ASE for J50 Instance
    • SAP ASE for IDM Instance
      • Prepare response file for executing setuphadr on I50 Instance
      • Execute “setuphadr” tool to configure HADR on Primary ASE for I50 Instance
  • Configuring HADR on Standby Host
    • SAP ASE for Java Instance
      • Prepare response file for executing setuphadr on J50 Instance
      • Execute “setuphadr” tool to configure HADR on Standby ASE for J50 Instance
    • SAP ASE for IDM Instance
      • Prepare response file for executing setuphadr on I50 Instance
      • Execute “setuphadr” tool to configure HADR on Standby ASE for I50 Instance

SAP IDM System Installation on Primary and Secondary Hosts:

Follow the SAP IDM Installation guides to install two identical systems. First system will be used as primary system. Second system will be used as a Disaster Recovery / High Availability system.

Installing SAP Netweaver 7.5 Java “Standard System”

Use the following option in the latest “Software Provisioning Manager” to install SAP Netweaver 7.5 Java system in preparation for SAP Identity Management 8.0 System. For this setup I will be using the System ID (SID) “J50” for my setup and all passwords will be set to “P@s$w0rd!” for the sake of simplicity as it is a test system only.

Installing “SAP ASE Database Instance for SAP Identity Management System”

Use the following option in the latest “Software Provisioning Manager” to install “SAP ASE Database Instance for SAP Identity Management System” in preparation for SAP Identity Management 8.0 System. For this setup I will be using the System ID (SID) “I50” for my setup and all passwords will be set to “P@s$w0rd!” for the sake of simplicity as it is a test system only.

Installing SAP Identity Management 8.0 “Standard System”.

Use the following option in the latest “Software Provisioning Manager” to install “SAP Identity Management Standard System”. This setup will require you to connect to the SAP Adaptive Server Enterprise installed in the previous step.

Shutdown the Java Instance (excluding database) on the Standby Host

We will shut down the Netweaver Java Instance on the standby host. We will only start this instance once we perform a database failover, and the current standby host will become the new primary host.

Installing SAP ASE Data Movement Option

We will be installing two instances of SAP ASE Data Movement Option one for the SAP ASE Instance “J50” and one for SAP ASE Instance “I50”. Both ASE Instances were installed and configured in the previous steps.

Installing SAP ASE Data Movement Option for the SAP ASE used for SAP Netweaver Java Instance

Use the following sample response file for installing SAP ASE DM for the Java Instance (J50) on both primary and secondary hosts. This will only install the DM option under the /sybase/J50/DM directory in preparation for setting up HADR for the Java Instance.

#########################################
PRODUCTION_INSTALL=TRUE
INSTALL_SETUP_HADR_SAMPLE=TRUE
RUN_SILENT=true

SAP_HOST_AGENT_PASSWORD=Unknown
ENABLE_COCKPIT_MONITORING=false
INSTALL_SCC_SERVICE=FALSE

USER_INSTALL_DIR=/sybase/J50/
DO_UPDATE_INSTALL=false

CHOSEN_FEATURE_LIST=fase_hadr
CHOSEN_INSTALL_FEATURE_LIST=fase_hadr
CHOSEN_INSTALL_SET=Custom
INSTALL_SAP_HOST_AGENT=FALSE

#do not configure servers
SY_CONFIG_HADR_SERVER=false
SY_CONFIG_SCC_SERVER=false
SY_CONFIG_ASE_SERVER=false
SY_CONFIG_BS_SERVER=false
SY_CONFIG_XP_SERVER=false
SY_CONFIG_JS_SERVER=false
SY_CONFIG_SM_SERVER=false
SY_CONFIG_WS_SERVER=false

#license
SYBASE_PRODUCT_LICENSE_TYPE=license
SYSAM_LICENSE_SOURCE=proceed_without_license
SYSAM_PRODUCT_EDITION=Enterprise Edition
SYSAM_LICENSE_TYPE=AC : OEM Application Deployment CPU License

SYSAM_NOTIFICATION_ENABLE=false

AGREE_TO_SYBASE_LICENSE=true
AGREE_TO_SAP_LICENSE=true
RUN_SILENT=true 
#########################################

Installing SAP ASE Data Movement Option for the SAP ASE used for SAP IDM Instance

Use the following sample response file for installing SAP ASE DM for the SAP IDM Instance (I50) on both primary and secondary hosts. This will only install the DM option under the /sybase/I50/DM directory in preparation for setting up HADR for the IDM Instance.

#########################################
PRODUCTION_INSTALL=TRUE
INSTALL_SETUP_HADR_SAMPLE=TRUE
RUN_SILENT=true

SAP_HOST_AGENT_PASSWORD=Unknown
ENABLE_COCKPIT_MONITORING=false
INSTALL_SCC_SERVICE=FALSE

USER_INSTALL_DIR=/sybase/I50/
DO_UPDATE_INSTALL=false

CHOSEN_FEATURE_LIST=fase_hadr
CHOSEN_INSTALL_FEATURE_LIST=fase_hadr
CHOSEN_INSTALL_SET=Custom
INSTALL_SAP_HOST_AGENT=FALSE

#do not configure servers
SY_CONFIG_HADR_SERVER=false
SY_CONFIG_SCC_SERVER=false
SY_CONFIG_ASE_SERVER=false
SY_CONFIG_BS_SERVER=false
SY_CONFIG_XP_SERVER=false
SY_CONFIG_JS_SERVER=false
SY_CONFIG_SM_SERVER=false
SY_CONFIG_WS_SERVER=false

#license
SYBASE_PRODUCT_LICENSE_TYPE=license
SYSAM_LICENSE_SOURCE=proceed_without_license
SYSAM_PRODUCT_EDITION=Enterprise Edition
SYSAM_LICENSE_TYPE=AC : OEM Application Deployment CPU License

SYSAM_NOTIFICATION_ENABLE=false

AGREE_TO_SYBASE_LICENSE=true
AGREE_TO_SAP_LICENSE=true
RUN_SILENT=true 
#########################################

Important: You need to repeat these 2 installations on the standby host as well.

Configuring HADR on Primary Hosts

In this step we will first configure the HADR for the SAP ASE Instance used by the Java Instance (J50).

Prepare response file for executing setuphadr

In this step we will prepare the setuphadr response file using the sample provided below.

###############################################################################
# Setup HADR sample responses file
#
# This sample responses file setup ASE HADR on
# hosts "host1" (primary) and "host2" (companion).
#
# Prerequisite:
# - New SAP ASE and Backup servers setup and started on "host1" and "host2".
#   See HADR User Guide for requirements on SAP ASE servers.
# - Replication Management Agent (RMA) started on "host1" and "host2".
#
# Usage:
# 1. On host1 (primary), run:
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <this_responses_file>
#
# 2. Change this responses file properties:
#       setup_site=COMP
#       is_secondary_site_setup=true
#
# 3. On host2 (companion), run
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <responses_file_from_step_2>
#
###############################################################################


# ID that identifies this cluster
#
# Value must be unique,
# begin with a letter and
# 3 characters in length.
# Note: Set value to your SID incase of HADR on SAP Business Suite Installations
cluster_id=J50

# Which site being configured
#
# Note:
# You need to set "<setup_site_value>.*"
# properties in this responses file.
setup_site=PRIM

# Set installation_mode
#
# Valid values: true, false
#
# If set to true, installation_mode will be set to "BS". 
# If set to false, installation_mode will be set to "nonBS"
# Note: Set value to true for HADR on SAP Business Suite installations
setup_bs=false


# Note: Set enable_ssl to false for HADR on SAP Business Suite Installations 
# 
# true OR false
enable_ssl=false
# common name, take SYBASE for example
ssl_common_name=J50
ase_ssl_enabled=false
enable_ssl_for_bs=false
# private key file
#ssl_private_key_file=/tmp//hadr.key
# public key file
#ssl_public_key_file=/tmp//hadr.crt
# root CA cert
# NOTE: if you're using self-signed cert, put your public key file here
ssl_ca_cert_file=<certpath>
# ssl password
ssl_password=P@s$w0rd!


# Has the secondary site prepared for ASE HADR
#
# Valid values: true, false
#
# If set to true, "<secondary_setup_site_value>.*"
# properties must set in this responses file.
is_secondary_site_setup=false

# How data is replicated
#
# Valid values: sync, async
synchronization_mode=sync

# SAP ASE system administrator user//password
#
# setuphadr will prompt from standard input if not specified
ase_sa_user=sa
ase_sa_password=P@s$w0rd!

# ASE HADR maintenance user//password
#
# For a Business Suite installation, name the user <custer_id>_maint.
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
hadr_maintenance_user=J50_maint
hadr_maintenance_password=P@s$w0rd!

# Replication Management Agent administrator user//password
#
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
rma_admin_user=DR_admin
rma_admin_password=P@s$w0rd!


# This is for BusS only
# if set to true, DR admin user will be added to secure store
#add_user_to_secure_store=false
# Adding user action will be executed by following user
#sid_admin_user=J50adm
#sid_admin_password=P@s$w0rd!

# If we need to config and start Replication Management Agent
#
# Valid values: true, false
config_start_rma=true

# If we need to create Replication Management Agent windows service
# Only affects windows
#
# Valid values: true, false
# If set to true, rma_service_user and rma_service_password will be used
create_rma_windows_service=false

# Replication Management Agent Service user//password
# Only needed for windows instllations.
# Note: Set value of rma_service_user to sybJ50 user incase of HADR on SAP 
# Business Suite Installations
rma_service_user=sybJ50
rma_service_password=P@s$w0rd!

# Databases that will participate in replication
# and "auto" materialize.
#
# ASE HADR requires SAP ASE to have a database
# with cluster ID name (see "cluster_id" above).

# cluster ID database

participating_database_1=J50
materialize_participating_database_1=true

###############################################################################
# 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=ase-db1

# 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=ase-db1


# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
PRIM.site_name=ROT1

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
PRIM.site_role=primary

# directory where SAP ASE installed
PRIM.ase_release_directory=/sybase/J50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
PRIM.ase_user_data_directory=

PRIM.ase_server_name=J50
PRIM.ase_server_port=5000

PRIM.backup_server_name=J50_BS
PRIM.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
PRIM.backup_server_dump_directory=/sybase/J50/data

# Port numbers for Replication Server and Replication Management Agent on host1
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
PRIM.rma_tds_port=4909
PRIM.rma_rmi_port=7000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
PRIM.srs_port=4905

# Device buffer for Replication Server on host1
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
PRIM.device_buffer_dir=/sybase/J50/data
PRIM.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host1
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
PRIM.simple_persistent_queue_dir=/sybase/J50/data
PRIM.simple_persistent_queue_size=2000


###############################################################################
# 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=ase-db2

# 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=ase-db2

# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
COMP.site_name=WDF2

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
COMP.site_role=companion

# directory where SAP ASE installed
COMP.ase_release_directory=/sybase/J50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
COMP.ase_user_data_directory=

COMP.ase_server_name=J50
COMP.ase_server_port=5000

COMP.backup_server_name=J50_BS
COMP.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
COMP.backup_server_dump_directory=/sybase/J50/data


# Port numbers for Replication Server and Replication Management Agent on host2
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
COMP.rma_tds_port=4909
COMP.rma_rmi_port=7000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
COMP.srs_port=4905

# Device buffer for Replication Server on host2
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.device_buffer_dir=/sybase/J50/data
COMP.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host2
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.simple_persistent_queue_dir=/sybase/J50/data
COMP.simple_persistent_queue_size=2000

Execute “setuphadr” tool to configure HADR on Primary ASE for J50 Instance

You need to logon as sybj50 user to the system and switch to the “/sybase/J50/ASE-16_0/bin/” directory and execute the setuphadr command and the response file prepared in the previous step as parameter for the command. The output will look like as follows:

ase-db1 ASE-16_0/bin% setuphadr ../init/logs/setuphadr_J50_SP4PL4_PRIM.txt
Clean up environment.
Environment cleaned up.
Setup ASE HADR maintenance user
        Create maintenance login "J50_maint"...
        Grant "sa_role" role to "J50_maint"...
        Grant "replication_role" role to "J50_maint"...
        Grant "replication_maint_role_gp" role to "J50_maint"...
        Grant "sap_maint_user_role" role to "J50_maint"...
        Grant "sybase_ts_role" role to "J50_maint"...
        Add auto activated roles "sap_maint_user_role" to user "J50_maint"...
        Allow "J50_maint" to be known as dbo in "master" database...
        Allow "J50_maint" to be known as dbo in "J50" database...
Setup ASE HADR maintenance user...Success
Setup administrator user
        Create administrator login "DR_admin"...
        Grant "sa_role" role to "DR_admin"...
        Grant "sso_role" role to "DR_admin"...
        Grant "replication_role" role to "DR_admin"...
        Grant "hadr_admin_role_gp" role to "DR_admin"...
        Grant "sybase_ts_role" role to "DR_admin"...
        Add user "DR_admin" to DB "sybsystemprocs".
Setup administrator user...Success
Setup Backup server allow hosts
        Backup server on "PRIM" site: Add host "ase-db2" to allow dump and load...
Setup Backup server allow hosts...Success

Setup complete on "PRIM" site.  Please run Setup HADR on "COMP" site to complete the setup.
ase-db1 ASE-16_0/bin%

Prepare response file for executing setuphadr on I50 Instance

In this step we will prepare the setuphadr response file using the sample provided below.

###############################################################################
# Setup HADR sample responses file
#
# This sample responses file setup ASE HADR on
# hosts "host1" (primary) and "host2" (companion).
#
# Prerequisite:
# - New SAP ASE and Backup servers setup and started on "host1" and "host2".
#   See HADR User Guide for requirements on SAP ASE servers.
# - Replication Management Agent (RMA) started on "host1" and "host2".
#
# Usage:
# 1. On host1 (primary), run:
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <this_responses_file>
#
# 2. Change this responses file properties:
#       setup_site=COMP
#       is_secondary_site_setup=true
#
# 3. On host2 (companion), run
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <responses_file_from_step_2>
#
###############################################################################


# ID that identifies this cluster
#
# Value must be unique,
# begin with a letter and
# 3 characters in length.
# Note: Set value to your SID incase of HADR on SAP Business Suite Installations
cluster_id=I50

# Which site being configured
#
# Note:
# You need to set "<setup_site_value>.*"
# properties in this responses file.
setup_site=PRIM

# Set installation_mode
#
# Valid values: true, false
#
# If set to true, installation_mode will be set to "BS". 
# If set to false, installation_mode will be set to "nonBS"
# Note: Set value to true for HADR on SAP Business Suite installations
setup_bs=false


# Note: Set enable_ssl to false for HADR on SAP Business Suite Installations 
# 
# true OR false
enable_ssl=false
# common name, take SYBASE for example
ssl_common_name=I50
ase_ssl_enabled=false
enable_ssl_for_bs=false
# private key file
#ssl_private_key_file=/tmp//hadr.key
# public key file
#ssl_public_key_file=/tmp//hadr.crt
# root CA cert
# NOTE: if you're using self-signed cert, put your public key file here
ssl_ca_cert_file=<certpath>
# ssl password
ssl_password=P@s$w0rd!


# Has the secondary site prepared for ASE HADR
#
# Valid values: true, false
#
# If set to true, "<secondary_setup_site_value>.*"
# properties must set in this responses file.
is_secondary_site_setup=false

# How data is replicated
#
# Valid values: sync, async
synchronization_mode=sync

# SAP ASE system administrator user//password
#
# setuphadr will prompt from standard input if not specified
ase_sa_user=sa
ase_sa_password=P@s$w0rd!

# ASE HADR maintenance user//password
#
# For a Business Suite installation, name the user <custer_id>_maint.
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
hadr_maintenance_user=I50_maint
hadr_maintenance_password=P@s$w0rd!

# Replication Management Agent administrator user//password
#
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
rma_admin_user=DR_admin
rma_admin_password=P@s$w0rd!


# This is for BusS only
# if set to true, DR admin user will be added to secure store
#add_user_to_secure_store=false
# Adding user action will be executed by following user
#sid_admin_user=i50adm
#sid_admin_password=P@s$w0rd!

# If we need to config and start Replication Management Agent
#
# Valid values: true, false
config_start_rma=true

# If we need to create Replication Management Agent windows service
# Only affects windows
#
# Valid values: true, false
# If set to true, rma_service_user and rma_service_password will be used
create_rma_windows_service=false

# Replication Management Agent Service user//password
# Only needed for windows instllations.
# Note: Set value of rma_service_user to sybi50 user incase of HADR on SAP 
# Business Suite Installations
rma_service_user=sybi50
rma_service_password=P@s$w0rd!

# Databases that will participate in replication
# and "auto" materialize.
#
# ASE HADR requires SAP ASE to have a database
# with cluster ID name (see "cluster_id" above).

# cluster ID database

#idm databases

participating_database_1=MXMC_db
materialize_participating_database_1=true

participating_database_2=I50
materialize_participating_database_2=true

###############################################################################
# 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=ase-db1

# 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=ase-db1


# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
PRIM.site_name=ROT1

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
PRIM.site_role=primary

# directory where SAP ASE installed
PRIM.ase_release_directory=/sybase/I50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
PRIM.ase_user_data_directory=

PRIM.ase_server_name=I50
PRIM.ase_server_port=5000

PRIM.backup_server_name=I50_BS
PRIM.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
PRIM.backup_server_dump_directory=/sybase/I50/data

# Port numbers for Replication Server and Replication Management Agent on host1
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
PRIM.rma_tds_port=5909
PRIM.rma_rmi_port=8000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
PRIM.srs_port=5905

# Device buffer for Replication Server on host1
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
PRIM.device_buffer_dir=/sybase/I50/data
PRIM.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host1
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
PRIM.simple_persistent_queue_dir=/sybase/I50/data
PRIM.simple_persistent_queue_size=2000

PRIM.ase_data_device_create_2_1=I50_data_dev, /sybase/I50/data/I50_dev1.dat, 2048
PRIM.ase_log_device_create_2_1=I50_log_dev, /sybase/I50/data/I50_log_dev1.dat, 1024

###############################################################################
# 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=ase-db2

# 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=ase-db2

# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
COMP.site_name=WDF2

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
COMP.site_role=companion

# directory where SAP ASE installed
COMP.ase_release_directory=/sybase/I50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
COMP.ase_user_data_directory=

COMP.ase_server_name=I50
COMP.ase_server_port=5000

COMP.backup_server_name=I50_BS
COMP.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
COMP.backup_server_dump_directory=/sybase/I50/data


# Port numbers for Replication Server and Replication Management Agent on host2
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
COMP.rma_tds_port=5909
COMP.rma_rmi_port=8000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
COMP.srs_port=5905

# Device buffer for Replication Server on host2
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.device_buffer_dir=/sybase/I50/data
COMP.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host2
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.simple_persistent_queue_dir=/sybase/I50/data
COMP.simple_persistent_queue_size=2000

COMP.ase_data_device_create_2_1=I50_data_dev, /sybase/I50/data/I50_dev1.dat, 2048
COMP.ase_log_device_create_2_1=I50_log_dev, /sybase/I50/data/I50_log_dev1.dat, 1024

Create a new database with name “I50

To make the HADR setup work, we would need to create a new database with the same name as the IDM System identifier which is I50 in this case. We have two choices to create this database:

  • Use setuphadr tool will create the database and its corresponding devices.

If we want to let the setuphadr create the database and its devices then we must keep the two parameters “ase_data_device_create_2_1” and “ase_log_device_create_2_1” in the setuphadr response file, otherwise we will need to remove them if we choose to manually create the database before running setuphadr. If we decide to go with this option, then we need to ensure that these two parameters are configured for both Primary (PRIM) and Companion (COMP) section of the response file. If we want to use the manual method, then we need to remove these 2 parameters from the response files to avoid any configuration issues.

  • Manually create this database by using the following sample script:
use master
go
disk init name='I50_data', physname='/sybase/I50/data/I50_data_001.dat', size='2000M', dsync=true
go
disk init name='I50_log', physname='/sybase/I50/log/I50_log_001.dat', size='1000M', dsync=true
go
create database I50
on I50_data = 2000
log on I50_log = 1000
go

Execute “setuphadr” tool to configure HADR on Primary ASE for I50 Instance

You need to logon as sybi50 user to the system and switch to the /sybase/I50/ASE-16_0/bin/” directory and execute the setuphadr command and the response file prepared in the previous step as parameter for the command. The output will look like as follows:

ase-db1 ASE-16_0/bin% setuphadr ../init/logs/setuphadr_J50_SP4PL4_PRIM.txt
Clean up environment.
Environment cleaned up.
Setup user databases
        Create user database I50...
Setup user databases...Success
Setup ASE HADR maintenance user
        Create maintenance login "I50_maint"...
        Grant "sa_role" role to "I50_maint"...
        Grant "replication_role" role to "I50_maint"...
        Grant "replication_maint_role_gp" role to "I50_maint"...
        Grant "sap_maint_user_role" role to "I50_maint"...
        Grant "sybase_ts_role" role to "I50_maint"...
        Add auto activated roles "sap_maint_user_role" to user "I50_maint"...
        Allow "I50_maint" to be known as dbo in "master" database...
        Allow "I50_maint" to be known as dbo in "MXMC_db" database...
        Allow "I50_maint" to be known as dbo in "I50" database...
Setup ASE HADR maintenance user...Success
Setup administrator user
        Create administrator login "DR_admin"...
        Grant "sa_role" role to "DR_admin"...
        Grant "sso_role" role to "DR_admin"...
        Grant "replication_role" role to "DR_admin"...
        Grant "hadr_admin_role_gp" role to "DR_admin"...
        Grant "sybase_ts_role" role to "DR_admin"...
        Add user "DR_admin" to DB "sybsystemprocs".
Setup administrator user...Success
Setup Backup server allow hosts
        Backup server on "PRIM" site: Add host "ase-db2" to allow dump and load...
Setup Backup server allow hosts...Success

Setup complete on "PRIM" site.  Please run Setup HADR on "COMP" site to complete the setup.
ase-db1 ASE-16_0/bin%

Configuring HADR on Standby Host

In this step we will first configure the HADR for the SAP ASE Instance used by the Java Instance (J50).

Prepare response file for executing setuphadr

In this step we will prepare the setuphadr response file using the sample provided below.

###############################################################################
# Setup HADR sample responses file
#
# This sample responses file setup ASE HADR on
# hosts "host1" (primary) and "host2" (companion).
#
# Prerequisite:
# - New SAP ASE and Backup servers setup and started on "host1" and "host2".
#   See HADR User Guide for requirements on SAP ASE servers.
# - Replication Management Agent (RMA) started on "host1" and "host2".
#
# Usage:
# 1. On host1 (primary), run:
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <this_responses_file>
#
# 2. Change this responses file properties:
#       setup_site=COMP
#       is_secondary_site_setup=true
#
# 3. On host2 (companion), run
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <responses_file_from_step_2>
#
###############################################################################


# ID that identifies this cluster
#
# Value must be unique,
# begin with a letter and
# 3 characters in length.
# Note: Set value to your SID incase of HADR on SAP Business Suite Installations
cluster_id=J50

# Which site being configured
#
# Note:
# You need to set "<setup_site_value>.*"
# properties in this responses file.
setup_site=COMP

# Set installation_mode
#
# Valid values: true, false
#
# If set to true, installation_mode will be set to "BS". 
# If set to false, installation_mode will be set to "nonBS"
# Note: Set value to true for HADR on SAP Business Suite installations
setup_bs=false


# Note: Set enable_ssl to false for HADR on SAP Business Suite Installations 
# 
# true OR false
enable_ssl=false
# common name, take SYBASE for example
ssl_common_name=J50
ase_ssl_enabled=false
enable_ssl_for_bs=false
# private key file
#ssl_private_key_file=/tmp//hadr.key
# public key file
#ssl_public_key_file=/tmp//hadr.crt
# root CA cert
# NOTE: if you're using self-signed cert, put your public key file here
ssl_ca_cert_file=<certpath>
# ssl password
ssl_password=P@s$w0rd!


# Has the secondary site prepared for ASE HADR
#
# Valid values: true, false
#
# If set to true, "<secondary_setup_site_value>.*"
# properties must set in this responses file.
is_secondary_site_setup=true

# How data is replicated
#
# Valid values: sync, async
synchronization_mode=sync

# SAP ASE system administrator user//password
#
# setuphadr will prompt from standard input if not specified
ase_sa_user=sa
ase_sa_password=P@s$w0rd!

# ASE HADR maintenance user//password
#
# For a Business Suite installation, name the user <custer_id>_maint.
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
hadr_maintenance_user=J50_maint
hadr_maintenance_password=P@s$w0rd!

# Replication Management Agent administrator user//password
#
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
rma_admin_user=DR_admin
rma_admin_password=P@s$w0rd!


# This is for BusS only
# if set to true, DR admin user will be added to secure store
#add_user_to_secure_store=false
# Adding user action will be executed by following user
#sid_admin_user=J50adm
#sid_admin_password=P@s$w0rd!

# If we need to config and start Replication Management Agent
#
# Valid values: true, false
config_start_rma=true

# If we need to create Replication Management Agent windows service
# Only affects windows
#
# Valid values: true, false
# If set to true, rma_service_user and rma_service_password will be used
create_rma_windows_service=false

# Replication Management Agent Service user//password
# Only needed for windows instllations.
# Note: Set value of rma_service_user to sybJ50 user incase of HADR on SAP 
# Business Suite Installations
rma_service_user=sybJ50
rma_service_password=P@s$w0rd!

# Databases that will participate in replication
# and "auto" materialize.
#
# ASE HADR requires SAP ASE to have a database
# with cluster ID name (see "cluster_id" above).

# cluster ID database

participating_database_1=J50
materialize_participating_database_1=true

###############################################################################
# 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=ase-db1

# 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=ase-db1


# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
PRIM.site_name=ROT1

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
PRIM.site_role=primary

# directory where SAP ASE installed
PRIM.ase_release_directory=/sybase/J50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
PRIM.ase_user_data_directory=

PRIM.ase_server_name=J50
PRIM.ase_server_port=5000

PRIM.backup_server_name=J50_BS
PRIM.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
PRIM.backup_server_dump_directory=/sybase/J50/data

# Port numbers for Replication Server and Replication Management Agent on host1
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
PRIM.rma_tds_port=4909
PRIM.rma_rmi_port=7000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
PRIM.srs_port=4905

# Device buffer for Replication Server on host1
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
PRIM.device_buffer_dir=/sybase/J50/data
PRIM.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host1
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
PRIM.simple_persistent_queue_dir=/sybase/J50/data
PRIM.simple_persistent_queue_size=2000


###############################################################################
# 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=ase-db2

# 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=ase-db2

# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
COMP.site_name=WDF2

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
COMP.site_role=companion

# directory where SAP ASE installed
COMP.ase_release_directory=/sybase/J50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
COMP.ase_user_data_directory=

COMP.ase_server_name=J50
COMP.ase_server_port=5000

COMP.backup_server_name=J50_BS
COMP.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
COMP.backup_server_dump_directory=/sybase/J50/data


# Port numbers for Replication Server and Replication Management Agent on host2
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
COMP.rma_tds_port=4909
COMP.rma_rmi_port=7000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
COMP.srs_port=4905

# Device buffer for Replication Server on host2
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.device_buffer_dir=/sybase/J50/data
COMP.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host2
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.simple_persistent_queue_dir=/sybase/J50/data
COMP.simple_persistent_queue_size=2000

Execute “setuphadr” tool to configure HADR on Standby ASE for J50 Instance

You need to logon as sybj50 user to the system and switch to the “/sybase/J50/ASE-16_0/bin/” directory and execute the setuphadr command and the response file prepared in the previous step as parameter for the command. The output will look like as follows:

ase-db2 ASE-16_0/bin% setuphadr ../init/logs/setuphadr_J50_SP4PL4_COMP.txt
Clean up environment.
Environment cleaned up.
Setup ASE HADR maintenance user
        Create maintenance login "J50_maint"...
        Grant "sa_role" role to "J50_maint"...
        Grant "replication_role" role to "J50_maint"...
        Grant "replication_maint_role_gp" role to "J50_maint"...
        Grant "sap_maint_user_role" role to "J50_maint"...
        Grant "sybase_ts_role" role to "J50_maint"...
        Add auto activated roles "sap_maint_user_role" to user "J50_maint"...
        Allow "J50_maint" to be known as dbo in "master" database...
        Allow "J50_maint" to be known as dbo in "J50" database...
Setup ASE HADR maintenance user...Success
Setup administrator user
        Create administrator login "DR_admin"...
        Grant "sa_role" role to "DR_admin"...
        Grant "sso_role" role to "DR_admin"...
        Grant "replication_role" role to "DR_admin"...
        Grant "hadr_admin_role_gp" role to "DR_admin"...
        Grant "sybase_ts_role" role to "DR_admin"...
        Add user "DR_admin" to DB "sybsystemprocs".
Setup administrator user...Success
Setup Backup server allow hosts
        Backup server on "COMP" site: Add host "ase-db1" to allow dump and load...
        Backup server on "PRIM" site: Add host "ase-db2" to allow dump and load...
Setup Backup server allow hosts...Success
Setup RMA
        Set SAP ID to "J50"...
        Set installation mode to "nonBS"...
        Set maintenance user to "J50_maint"...
        Set site name "ROT1" with SAP ASE host:port to "ase-db1:4901" and Replication Server host:port to "ase-db1:4905"...
        Set site name "WDF2" with SAP ASE host:port to "ase-db2:4901" and Replication Server host:port to "ase-db2:4905"...
        Set site name "ROT1" with Backup server port to "4902"...
        Set site name "WDF2" with Backup server port to "4902"...
        Set site name "ROT1" databases dump directory to "/sybase/J50/data"...
        Set site name "WDF2" databases dump directory to "/sybase/J50/data"...
        Set site name "ROT1" synchronization mode to "sync"...
        Set site name "WDF2" synchronization mode to "sync"...
        Set site name "ROT1" distribution mode to "remote"...
        Set site name "WDF2" distribution mode to "remote"...
        Set site name "ROT1" distribution target to site name "WDF2"...
        Set site name "WDF2" distribution target to site name "ROT1"...
        Set site name "ROT1" device buffer directory to "/sybase/J50/data"...
        Set site name "WDF2" device buffer directory to "/sybase/J50/data"...
        Set site name "ROT1" device buffer size to "5000"...
        Set site name "WDF2" device buffer size to "5000"...
        Set site name "ROT1" simple persistent queue directory to "/sybase/J50/data"...
        Set site name "WDF2" simple persistent queue directory to "/sybase/J50/data"...
        Set site name "ROT1" simple persistent queue size to "2000"...
        Set site name "WDF2" simple persistent queue size to "2000"...
        Set master, J50 databases to participate in replication...
Setup RMA...Success
        Setting up replication on 'standby' host for local database 'master'...................
        Setting up replication on 'standby' host for local database 'J50'.....................
Setup Replication...Success
Materialize Databases
        Materialize database "master"...
                Starting materialization of the master database from source 'ROT1' to target 'WDF2'..
                Completed materialization of the master database from source 'ROT1' to target 'WDF2'..
                Waiting 10 seconds: Before checking if Replication Connection 'J50_WDF2.master' is suspended......
        Materialize database "J50"...
                Materializing database 'J50' automatically from source 'ROT1' to target 'WDF2'..
                Executing ASE dump and load task for database 'J50'................
                Successfully verified materialization on database 'J50'..
                Stop the Replication Agent for database 'J50' on host 'ase-db1:4901' and data server 'J50_ROT1'..
                Configuring Replication Server: set 'hide_maintuser_pwd' to 'on'..
                Waiting 10 seconds: Before checking if Replication Connection 'J50_WDF2.J50' is suspended with dump marker...
                Waiting 10 seconds: Before checking if Replication Connection 'J50_WDF2.J50' is suspended........
Materialize Databases...Success

Prepare response file for executing setuphadr on I50 Instance

In this step we will prepare the setuphadr response file using the sample provided below.

###############################################################################
# Setup HADR sample responses file
#
# This sample responses file setup ASE HADR on
# hosts "host1" (primary) and "host2" (companion).
#
# Prerequisite:
# - New SAP ASE and Backup servers setup and started on "host1" and "host2".
#   See HADR User Guide for requirements on SAP ASE servers.
# - Replication Management Agent (RMA) started on "host1" and "host2".
#
# Usage:
# 1. On host1 (primary), run:
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <this_responses_file>
#
# 2. Change this responses file properties:
#       setup_site=COMP
#       is_secondary_site_setup=true
#
# 3. On host2 (companion), run
#       $SYBASE/$SYBASE_ASE//bin//setuphadr <responses_file_from_step_2>
#
###############################################################################


# ID that identifies this cluster
#
# Value must be unique,
# begin with a letter and
# 3 characters in length.
# Note: Set value to your SID incase of HADR on SAP Business Suite Installations
cluster_id=I50

# Which site being configured
#
# Note:
# You need to set "<setup_site_value>.*"
# properties in this responses file.
setup_site=COMP

# Set installation_mode
#
# Valid values: true, false
#
# If set to true, installation_mode will be set to "BS". 
# If set to false, installation_mode will be set to "nonBS"
# Note: Set value to true for HADR on SAP Business Suite installations
setup_bs=false


# Note: Set enable_ssl to false for HADR on SAP Business Suite Installations 
# 
# true OR false
enable_ssl=false
# common name, take SYBASE for example
ssl_common_name=I50
ase_ssl_enabled=false
enable_ssl_for_bs=false
# private key file
#ssl_private_key_file=/tmp//hadr.key
# public key file
#ssl_public_key_file=/tmp//hadr.crt
# root CA cert
# NOTE: if you're using self-signed cert, put your public key file here
ssl_ca_cert_file=<certpath>
# ssl password
ssl_password=P@s$w0rd!


# Has the secondary site prepared for ASE HADR
#
# Valid values: true, false
#
# If set to true, "<secondary_setup_site_value>.*"
# properties must set in this responses file.
is_secondary_site_setup=true

# How data is replicated
#
# Valid values: sync, async
synchronization_mode=sync

# SAP ASE system administrator user//password
#
# setuphadr will prompt from standard input if not specified
ase_sa_user=sa
ase_sa_password=P@s$w0rd!

# ASE HADR maintenance user//password
#
# For a Business Suite installation, name the user <custer_id>_maint.
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
hadr_maintenance_user=I50_maint
hadr_maintenance_password=P@s$w0rd!

# Replication Management Agent administrator user//password
#
# Password must have at least 6 characters
# setuphadr will prompt from standard input if not specified
rma_admin_user=DR_admin
rma_admin_password=P@s$w0rd!


# This is for BusS only
# if set to true, DR admin user will be added to secure store
#add_user_to_secure_store=false
# Adding user action will be executed by following user
#sid_admin_user=i50adm
#sid_admin_password=P@s$w0rd!

# If we need to config and start Replication Management Agent
#
# Valid values: true, false
config_start_rma=true

# If we need to create Replication Management Agent windows service
# Only affects windows
#
# Valid values: true, false
# If set to true, rma_service_user and rma_service_password will be used
create_rma_windows_service=false

# Replication Management Agent Service user//password
# Only needed for windows instllations.
# Note: Set value of rma_service_user to sybi50 user incase of HADR on SAP 
# Business Suite Installations
rma_service_user=sybi50
rma_service_password=P@s$w0rd!

# Databases that will participate in replication
# and "auto" materialize.
#
# ASE HADR requires SAP ASE to have a database
# with cluster ID name (see "cluster_id" above).

# cluster ID database

#idm databases

participating_database_1=MXMC_db
materialize_participating_database_1=true

participating_database_2=I50
materialize_participating_database_2=true

###############################################################################
# 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=ase-db1

# 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=ase-db1


# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
PRIM.site_name=ROT1

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
PRIM.site_role=primary

# directory where SAP ASE installed
PRIM.ase_release_directory=/sybase/I50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
PRIM.ase_user_data_directory=

PRIM.ase_server_name=I50
PRIM.ase_server_port=5000

PRIM.backup_server_name=I50_BS
PRIM.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
PRIM.backup_server_dump_directory=/sybase/I50/data

# Port numbers for Replication Server and Replication Management Agent on host1
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
PRIM.rma_tds_port=5909
PRIM.rma_rmi_port=8000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
PRIM.srs_port=5905

# Device buffer for Replication Server on host1
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
PRIM.device_buffer_dir=/sybase/I50/data
PRIM.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host1
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
PRIM.simple_persistent_queue_dir=/sybase/I50/data
PRIM.simple_persistent_queue_size=2000

PRIM.ase_data_device_create_2_1=I50_data_dev, /sybase/I50/data/I50_dev1.dat, 2048
PRIM.ase_log_device_create_2_1=I50_log_dev, /sybase/I50/data/I50_log_dev1.dat, 1024

###############################################################################
# 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=ase-db2

# 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=ase-db2

# Site name
#
# Enter value that identifies this site,
# like a geographical location.
# Value must be unique.
COMP.site_name=WDF2

# Site role
#
# Enter the role of this site.
# Valid values: primary, companion
COMP.site_role=companion

# directory where SAP ASE installed
COMP.ase_release_directory=/sybase/I50/

# Directory that stored SAP ASE user data files
# (interfaces, RUN_<server>, error log, etc. files).
# Do not set value if your user data files are in
# SAP ASE installed directory (ase_release_directory).
COMP.ase_user_data_directory=

COMP.ase_server_name=I50
COMP.ase_server_port=5000

COMP.backup_server_name=I50_BS
COMP.backup_server_port=5001

# Directory to store database dumps
# in materialzation
#
# Backup server must able to access this directory
COMP.backup_server_dump_directory=/sybase/I50/data


# Port numbers for Replication Server and Replication Management Agent on host2
#
# In remote topology, these are the companion Replication Server and
# Replication Management Agent.
#
# See "rsge.bootstrap.tds.port.number" properties in
# <SAP ASE installed directory>//DM//RMA-15_5//instances//AgentContainer//config//bootstrap.prop
# for value
COMP.rma_tds_port=5909
COMP.rma_rmi_port=8000
#
# Starting port number to use when setup Replication Server.
# Make sure next two ports (+1 and +2) are also available for use.
COMP.srs_port=5905

# Device buffer for Replication Server on host2
# Recommend size = 128 * N
#       where N is the number of databases to replicate,
#       including the master and cluster ID databases.
#
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.device_buffer_dir=/sybase/I50/data
COMP.device_buffer_size=5000

# Persistent queue directory for Replication Server running on host2
#
# For synchronous replication (synchronization_mode=sync),
# enter directory to an SSD (solid state drive) or other
# type of fast read//write storage device
# Note: For HADR on SAP Business Suite Installations use SID database logsize * 1.5
COMP.simple_persistent_queue_dir=/sybase/I50/data
COMP.simple_persistent_queue_size=2000

COMP.ase_data_device_create_2_1=I50_data_dev, /sybase/I50/data/I50_dev1.dat, 2048
COMP.ase_log_device_create_2_1=I50_log_dev, /sybase/I50/data/I50_log_dev1.dat, 1024

Create a new database with name “I50

To make the HADR setup work, we would need to create a new database with the same name as the IDM System identifier which is I50 in this case. We have two choices to create this database:

  • Use setuphadr tool will create the database and its corresponding devices.

If we want to let the setuphadr create the database and its devices then we must keep the two parameters “ase_data_device_create_2_1” and “ase_log_device_create_2_1” in the setuphadr response file, otherwise we will need to remove them if we choose to manually create the database before running setuphadr. If we decide to go with this option, then we need to ensure that these two parameters are configured for both Primary (PRIM) and Companion (COMP) section of the response file. If we want to use the manual method, then we need to remove these 2 parameters from the response files to avoid any configuration issues.

  • Manually create this database by using the following sample script:
use master
go
disk init name='I50_data', physname='/sybase/I50/data/I50_data_001.dat', size='2000M', dsync=true
go
disk init name='I50_log', physname='/sybase/I50/log/I50_log_001.dat', size='1000M', dsync=true
go
create database I50
on I50_data = 2000
log on I50_log = 1000
go

Execute “setuphadr” tool to configure HADR on Standby ASE for I50 Instance

You need to logon as sybi50 user to the system and switch to the /sybase/I50/ASE-16_0/bin/” directory and execute the setuphadr command and the response file prepared in the previous step as parameter for the command. The output will look like as follows:

ase-db2 init/logs% setuphadr ./setuphadr_I50_SP3PL14_COMP.txt
Clean up environment.
Environment cleaned up.
Setup user databases
        Create user database I50...
Setup user databases...Success
Setup ASE HADR maintenance user
        Create maintenance login "I50_maint"...
        Grant "sa_role" role to "I50_maint"...
        Grant "replication_role" role to "I50_maint"...
        Grant "replication_maint_role_gp" role to "I50_maint"...
        Grant "sap_maint_user_role" role to "I50_maint"...
        Grant "sybase_ts_role" role to "I50_maint"...
        Add auto activated roles "sap_maint_user_role" to user "I50_maint"...
        Allow "I50_maint" to be known as dbo in "master" database...
        Allow "I50_maint" to be known as dbo in "MXMC_db" database...
        Allow "I50_maint" to be known as dbo in "I50" database...
Setup ASE HADR maintenance user...Success
Setup administrator user
        Create administrator login "DR_admin"...
        Grant "sa_role" role to "DR_admin"...
        Grant "sso_role" role to "DR_admin"...
        Grant "replication_role" role to "DR_admin"...
        Grant "hadr_admin_role_gp" role to "DR_admin"...
        Grant "sybase_ts_role" role to "DR_admin"...
        Add user "DR_admin" to DB "sybsystemprocs".
Setup administrator user...Success
Setup Backup server allow hosts
        Backup server on "COMP" site: Add host "ase-db1" to allow dump and load...
        Backup server on "PRIM" site: Add host "ase-db2" to allow dump and load...
Setup Backup server allow hosts...Success
Setup RMA
        Set SAP ID to "I50"...
        Set installation mode to "nonBS"...
        Set maintenance user to "I50_maint"...
        Set site name "ROT1" with SAP ASE host:port to "ase-db1:5000" and Replication Server host:port to "ase-db1:5905"...
        Set site name "WDF2" with SAP ASE host:port to "ase-db2:5000" and Replication Server host:port to "ase-db2:5905"...
        Set site name "ROT1" with Backup server port to "5001"...
        Set site name "WDF2" with Backup server port to "5001"...
        Set site name "ROT1" databases dump directory to "/sybase/I50/data"...
        Set site name "WDF2" databases dump directory to "/sybase/I50/data"...
        Set site name "ROT1" synchronization mode to "sync"...
        Set site name "WDF2" synchronization mode to "sync"...
        Set site name "ROT1" distribution mode to "remote"...
        Set site name "WDF2" distribution mode to "remote"...
        Set site name "ROT1" distribution target to site name "WDF2"...
        Set site name "WDF2" distribution target to site name "ROT1"...
        Set site name "ROT1" device buffer directory to "/sybase/I50/data"...
        Set site name "WDF2" device buffer directory to "/sybase/I50/data"...
        Set site name "ROT1" device buffer size to "5000"...
        Set site name "WDF2" device buffer size to "5000"...
        Set site name "ROT1" simple persistent queue directory to "/sybase/I50/data"...
        Set site name "WDF2" simple persistent queue directory to "/sybase/I50/data"...
        Set site name "ROT1" simple persistent queue size to "2000"...
        Set site name "WDF2" simple persistent queue size to "2000"...
        Set master, MXMC_db, I50 databases to participate in replication...
Setup RMA...Success
Setup Replication
        Setup replication from "ROT1" to "WDF2"...
        Configuring remote replication server.............................
        Configuring local replication server.................................
        Setting up replication on 'standby' host for local database 'master'..................
        Setting up replication on 'standby' host for local database 'I50'...................
        Setting up replication on 'standby' host for local database 'MXMC_db'......................
Setup Replication...Success
Materialize Databases
        Materialize database "master"...
                Starting materialization of the master database from source 'ROT1' to target 'WDF2'...
                Waiting 10 seconds: Before checking if Replication Connection 'I50_WDF2.master' is suspended......
        Materialize database "MXMC_db"...
                Materializing database 'MXMC_db' automatically from source 'ROT1' to target 'WDF2'..
                Executing ASE dump and load task for database 'MXMC_db'......
                Waiting 10 seconds: Before checking if Replication Connection 'I50_WDF2.MXMC_db' is suspended with dump marker....
                Waiting 10 seconds: Before checking if Replication Connection 'I50_WDF2.MXMC_db' is suspended........
        Materialize database "I50"...
                Materializing database 'I50' automatically from source 'ROT1' to target 'WDF2'..
                Executing ASE dump and load task for database 'I50'.....
                Successfully verified materialization on database 'I50'..
                Stop the Replication Agent for database 'I50' on host 'wsx-db1:5000' and data server 'I50_ROT1'..
                Stop the Replication Agent for database 'MXMC_db' on host 'wsx-db1:5000' and data server 'I50_ROT1'..
                Configuring Replication Server: set 'hide_maintuser_pwd' to 'on'...
                Waiting 10 seconds: Before checking if Replication Connection 'I50_WDF2.I50' is suspended with dump marker...
                Waiting 10 seconds: Before checking if Replication Connection 'I50_WDF2.I50' is suspended........
Materialize Databases...Success
ase-db2 ASE-16_0/bin%

Setup is now completed for both SAP Adaptive Server Enterprise instances.


文章来源: https://blogs.sap.com/2023/11/08/sap-ase-always-on-setup-for-idm/
如有侵权请联系:admin#unsafe.sh