Friday , December 6 2024

SAP Sybase ASE Warm Standby Database using Replication Server

 

We are going to create warm standby backup of SAP Sybase ASE Prod1 server to Standby1 server using Sybase Replication Server REP15_7 for a database named : testdb. It comprises to the following 15 steps.

Pre-Requisites :

a) 2 Sybase ASE instances

b)1 replication server instance

c)1 database named testdb

 

Step 1: Enable Replication Agent on both Sybase ASE Servers

 

Step 2: Create a login that on both Sybase ASE Servers and assign replication_role

These logins will be used in Replication Process

Create logins  on both server

 

Step 3: Add the user to the dbo profile of the database that is invlovled in this process.

 

Step 4: Synchronize the logins on both the servers if required

execute this to export logins for primary server:

 

Step 5: Install the replication script for both Primary & Standby Servers

Login to rep server and browse the script from location $SYBASE/REP15-5_5/scripts and execute this:

 

Step 6: Create logical connection on replication server

Connect to the replication server and execute this

 

Step 7: Create a connection from replication serer to active database

 

Step 8: Create a login in the replication server

This user will be used to connection replication agent from Sybase ASE Servers

 

Step 9: Create a connection from the replication server to the standby server

 

Step 10: Check the logical connections

execute the following command on replication server

 

Step 11: Mark the database for replication and grant permissions

Execute the following command on primary server to grant permissions and activate the database to capture all activities for production database by executing the commands:

 

Step 12: Configure Replication Agent on primary server

Execute the following command on primary server to configure replication agent on primary server

 

Check the error log to verify the status of replication agent.

Step 13: Dump the database on primary server

 

Step 14: Restore the database on standby server

 

Step 15: Resume the connection on Primary & Standby Servers and verify the replication status

Connect the replication server and execute the following commands to resume the connections of primary & secondary servers to replication server respectively.

 

Step 16: Validate the replication between primary & standby servers

Primary:

DONE!!!

Loading

About Engr. Mohammad Rizwan Yasin

6 comments

  1. Great article, replication explained in easy steps.

  2. Dear Engr. Mohammad Rizwan Yasin,
    Good article. A major step needs to be added. You will have to disable rep agent on standby and to disable the secondary truncation point in to avoid the transaction log on DR to fill up.

    This can be done via connecting to Standby and run:

    use db_name
    go
    sp_config_rep_agent db_name, ‘enable’
    go
    dbcc settrunc (‘ltm’,ignore)
    go

  3. Dear Engr. Mohammad Rizwan Yasin,

    I tried as mentioned in the article but it is not working. data is not getting replicated from primary to standby. I can see there are no issues from ‘admin who’ command. Please help me how can I achieve the replicaiton of data.

  4. Hi Rizwan,

    I need your help if possible for you. My setup detail is shared below;

    SAPASESRV1: This is SAP ASE Database VM which i am considering as Primary
    SAPASESRV2: This is SAP ASE Database VM which i am considering as Standby
    SAPASEREP1: This is Replication Server VM where i am creating Replication Server Instance.

    While creating replication server instance i am errors shared below;

    2021/03/29 12:42:15 END ENVIRONMENT INFORMATION
    2021/03/29 12:42:15 Directory service provider: ‘InterfacesDriver’.
    2021/03/29 12:42:15 Using resource file ‘/sybase/SybaseRepServer/REP-16_0/init/rs/PRS.rs’ for product attributes.
    2021/03/29 12:42:15 CONNECTIVITY ERROR: CT-Library error: ‘ct_connect():
    directory service layer: internal directory control layer
    error: Requested server name not found.’.
    2021/03/29 12:42:15 CONNECTIVITY ERROR: Login attempt failed: server = ‘sunakl505i’.
    2021/03/29 12:42:15 The attribute ‘do_add_id_server’ is set to no, but there is
    no entry in the interfaces file for ID Server ‘PRS’.
    2021/03/29 12:42:15 Attribute ‘do_add_id_server’ could not be set because ‘no’ is an invalid value.
    2021/03/29 12:42:15 The attribute ‘do_add_replication_server’ is set to no, but
    there is no entry in the interfaces file for Replication Server ‘PRS’.
    2021/03/29 12:42:15 Attribute ‘do_add_replication_server’ could not be set because ‘no’ is an invalid value.
    2021/03/29 12:42:15 There is no entry for server ‘sunakl505i’ in the interfaces
    file. The server must have an existing entry in the interfaces file.
    2021/03/29 12:42:15 Attribute ‘rs_rssd_sqlsrvr’ could not be set because ‘sunakl505i’ is an invalid value.
    2021/03/29 12:42:15 Exiting.
    2021/03/29 12:42:15 The log file for this session is
    ‘/sybase/SybaseRepServer/REP-16_0/init/logs/log0329.002’.
    2021/03/29 12:42:15 Log close.

Leave a Reply

Your email address will not be published. Required fields are marked *