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
- Install a new replication Server
- Add a database to replication system
- Upgrade an existing replication server
- Downgrade RSSD for an existing replication server
- Upgrade an existing database in the replication server
- Enable password encryption for replication server
- Alter a Replication Server Configuration file password
choose2
- Replication Server Information
- Database Information
Choose 1-Replication Server Information
Replication Server :-REP_REP157_01
Password :- Sybase123
choose 2 Database Information
then we have
- SQL Sever name :DEV_ASE01
- SA User :sa
- SA passord:Sybase123
4.Database name:pubs2
- Will database be replicate
- 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
- IV) Marking primary table for Replication using sp_setrepetable.
Login to REP_REP157_01
sp_setrepetable PROD_Table,true
go
- 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
Its really easy to understand and follow step-by-step.Thanks Shreyas for posting.
LikeLike
Hey keep blogging. Good one
LikeLike
A good initiative and very good approach. It’s easy to understand the implementation steps following this guide.
Appreciate the work done by Shreyas. Keep posting such helpful info.
LikeLiked by 1 person
This was a very helpful post. The explanation and presentation was really impromptu.
Keep up the good work Shreyas
LikeLike
Keep up the good work Shreyas Keep posting such helpful info.
LikeLike
Nice blog & can say short & detailed one. Nice initiate brother.
LikeLike
Thanks Rajat Sir
LikeLike
Thanks for all of your labor on this blog. Kim take interest in setting aside time for research and it’s really easy to understand why. Almost all hear all relating to the powerful way you create helpful guides on the blog and as well boost participation from some others on this article and our favorite daughter is certainly studying a lot. Enjoy the remaining portion of the year. You have been doing a really good job.
LikeLike
Hmm it appears like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to everything. Do you have any helpful hints for rookie blog writers? I’d genuinely appreciate it.
LikeLike
Great post however , I was wanting to know if you could write a litte more on this subject? I’d be very grateful if you could elaborate a little bit more. Many thanks!
LikeLike
surecheck my details on yotube channels SimplyTech4u
LikeLike
I really like your wp template, wherever did you obtain it through?
LikeLike
Howdy! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!
LikeLike
Hey there! This is my first comment here so I just wanted to give a quick shout out and say I truly enjoy reading your posts. Can you suggest any other blogs/websites/forums that cover the same subjects? Many thanks!
LikeLike
Marya Sparaco Thanks for your boosting my confidence I am going to share series of L1 task details on my YouTube Channel SimplyTech4U
LikeLike
Hello. Thanks for making this post! Very clear. One question? Under step III, where you have…IV) Marking primary table for Replication using sp_setrepetable.
Login to REP_REP157_01
sp_setrepetable PROD_Table,true
go
I think you meant Login to the primary ASE (PROD_ASE01), correct? When you execute sp_setrepetable it has to be from within the PRIMARY ASE instance, not the Replication Server I believe? Thanks
LikeLike