Sybase replication thread down due to duplicate key
Sybase Replication Replication, SybaseError Description:
Message from server: Message: 2601, State 1, Severity 14 — 'Attempt to insert duplicate key row in object 'table1' with unique index 'ind1'
Steps to be followed for fixing this issue.
- login to replication server and log the transaction details using below command
1> sysadmin log_first_tran,ASE2,DB2
2> go - login to RSSD server and capture the transaction details using below command.
1> use RSSD_ASE1
2> go
1> rs_helpexception
2> go - To show the entire text of the transaction, execute rs_helpexception with the v option and the transaction ID from step#2
1> use RSSD_ASE1
2> go
1> rs_helpexception <transaction id>,v
2> go - Share these transaction details to application team for review and take the action accordingly. if app team ask to skip the transaction, then only run below command to bring up thread.
1>resume connection to ASE2,DB2 skip tran
2>go
- Below is the step if DBA has to identify duplicate transaction details
- first get the table and its index name which we can get from error message.
- then prepare select statement by adding all the column of that index in the where clause and supply all the where clause column values from the transaction from step#3
- run this command on source database as well of on target database
- Now delete the trnsaction from target database
- Resume the thread (do not use skip tran)
6. when replication thread goes down for warm standby DR connection, check if dsi_keep_triggers is set to on for this connection using below command.
admin config,'connection', WS_ASE2.db2,dsi_keep_triggers.
usually triggers are disabled by default for warm standby databases. so, if it is ON, disable it and resume thread. Login to replication server and run below command.
1> alter connection to WS_ASE2.db2 set 'dsi_keep_triggers' to 'off'
2> go
1> resume connection to WS_ASE2.db2
2> go
How useful was this post?
Click on a star to rate it!
Average rating 0 / 5. Vote count: 0
No votes so far! Be the first to rate this post.