How to setup Table level replication in SAP Sybase ASE Step by Step |Table Level Replication Sybase ASE 15.7 and common troubleshoot issues

Primary Server Name  :- PROD_ASE01

Primary Database Name:-Prod_DB

Table Name           :-Prod_Table

Replication Server Name:- REP_REP157_01

Replicated (Target)Server Name  :-DEV_ASE01

Database Name:-DEV_DB

Table Name   :-DEV_Table

 

 

I)Create connection for Prod_DB database in (PROD_ASE01) using rs_init

 

cd /opt/sybase/rep

. SYBASE.sh

cd REP-*

cd install

./rs_init —>utility

 

Configure a Server product

1.Replication Server

Configure Replication Server

1.Install a new replication Server

2.Add a database to replication system

3.Upgrade an existing replication server

4.Downgrade RSSD for an existing replication server

5.Upgrade an existing database in the replication server

6.Enable password encryption for replication server

7.Alter a Replication Server Configuration file password

 

choose2

1.Replication Server Information

2.Database Information

 

choose 1-Replication Server Information

Replication Server :-REP_REP157_01

Password :- Sybase123

 

Choose 2 Database Information

then we have

1.SQL Server name:PROD_ASE01

2.SA User :sa

3.SA password :Sybase123

4.Database name: PROD_DB

5.will database be replicate Yes

6.Maintenance User:proddb_maint

7.Maintenance Password:Sybase123

8.Is this a Physical Connection for existing Logical Connection :No

 

Replication agent information

RS User: REP157_01_ra

RS Password: Sybase123

 

Execute  Replication Server task to activate the Replication

 

 

II)Create connection for DEV_DB database in (DEV_ASE02) using rs_init

 

cd $SYABSE/REP-15_5/install

./rs_init

 

will get below options

=>RS_INIT

1.Release directory: /opt/sybaserep/157

2.Configure a Server product

 

pick option2

 

=>Configure a Server product

1.Replication Server

Configure Replication Server

  1. Install a new replication Server
  2. Add a database to replication system
  3. Upgrade an existing replication server
  4. Downgrade RSSD for an existing replication server
  5. Upgrade an existing database in the replication server
  6. Enable password encryption for replication server
  7. Alter a Replication Server Configuration file password

 

choose2

  1. Replication Server Information
  2. Database Information

Choose 1-Replication Server Information

Replication Server :-REP_REP157_01

Password :- Sybase123

 

choose 2 Database Information

then we have

  1. SQL Sever name :DEV_ASE01
  2. SA User :sa
  3. SA passord:Sybase123

4.Database name:pubs2

  1. Will database be replicate
  2. Maintenance User:devdb_maint

7.Maintenance Password:devdb_maint_ps

8.Is this a Physical Connection for existing Logical Connection :No

 

Execute the Replication Server task

 

III)Need to create the replication definition for PROD_ASE01 Replication subscription for DEV_ASE01 i.e replicated server. Check below command.

Login to the Replication server :-PROD_REP157_01

//Replication Definition for primary server  PROD_ASE01

create replication definition PROD_ASE01_PROD_Table_R

with primary at PROD_ASE01.PROD_TABLE

with replication table named ‘DEV_table’

(id int,fullname varchar(20)) primary key(id)

go

 

//Replication Subscription for DEV_ASE01

 

Subscription create subscription DEV_ASE01_DEV_Table_S

for PROD_ASE01_PROD_Table_R

with replication at DEV_ASE01_DEV_Table

without materialization

 

/* without materialization means either table are sync or they are freshly created */

 

//To validate the replication definition and replication subscription are correct please check

 

check subscription DEV_ASE01_DEV_Table_S

for PROD_ASE01_PROD_Table_R

with replication at DEV_ASE01.DEV_Table

go

 

  1. IV) Marking primary table for Replication using sp_setrepetable.

Login to REP_REP157_01

sp_setrepetable PROD_Table,true

go

 

 

  1. V) Login to DEV_ASE01 add grant permission to maintenance user devdb_maint_user

 

Use DEV_Db

Go

Sp_helpuser

Go

grant all on DEV_Table to devdb_maint_user

go

 

VI)How to Validate table level replication .?

 

Login to PROD_ASE01

 

use PROD_DB

go

insert into PROD_Table(101,sam)

go

insert into PROD_Table(102,mac)

go

select * from PROD_Table

go

 

 

Now login to DEV_ASE01 replicated data server and check if the data is replicated

Use DEV_DB

Go

Select * from DEV_Table

Go

 

**Result should be same as PROD_ASE01 have

 

VII) Table level replication and Troubleshoot

  • Replication Agent:- sp_help_rep_agent at Adaptive Server to display status information for RepAgent thread
  • Invalid Login
  • Missing Replication Server Name in Interfaces
  • Permission Issue
  • Misconfigured Replication Agent
  • Invalid Truncation Page
  • Syslogs Corruption
  • Primary Database Transaction Log Full
  • Standby Database Transaction Log Full
  • Replication Server Errors:-WARNING #32020
  • Stable Queues
  • The Origin Queue ID
  • Data Not Being Replicated
  • Duplicates Being Ignored
  • Corruption in the Queue
  • Data Latency

How to Configure MSA type Database Level Sybase ASE Replication Server Step by Step

How to Create a SAP Sybase ASE Warm Standby Environment Using rs_init step by step|How to use rs_init utility to create a SAP Sybase ASE Warm Standby Environment