on 2014 May 16 11:25 AM
Windoze SQL Anywhere 9.something.3951
So I have a large distributed database system...
It's kinda legacy at this point and every few years or so I have a large purge script that will delete multiple years worth of transactions.
We apply the script to the consolidated database and then the delete statements replicate out via dbremote running on a scheduled task.
A month later in production I find that although replication seems to be in synch it's as if the deletes never occurred on the remote database. So then I go back to the log and all I see is a roll back the end of a bajillion deletes.
Any ideas? I realize I'm out of luck being that the Syabse is EOL, and we are trying to move to 16 here shortly... But just kind of curious if anyone has seen this before?
Translating the log with a -g shows me:
CONNECT-1013-017394470350-"10"-2014-04-17 22:48
----BEGIN TRANSACTION-1013-017394470360
--BEGIN TRANSACTION
--UPDATE-1013-017394470406
--UPDATE DBA.Customer
-- SET Changed='2014-04-17 16:09:22.5'
-- WHERE SiteCode='0010'
-- AND CustomerCode='023428'
--UPDATE-1013-017394470593
--UPDATE DBA.Customer
-- SET Active=0,
-- ChangedBy='10',
-- Changed='2014-04-17 16:09:22.6'
-- WHERE SiteCode='0010'
-- AND CustomerCode='027762'
Line 973149
SNIP
Lines upon lines of deletes and marking records inactive...
SNIP
Line 23206783
----CONNECT-1024-017709568341-"10"-2014-04-17 23:33
----BEGIN TRANSACTION-1024-017709568351
--BEGIN TRANSACTION
--COMMIT-1024-017709568358
--COMMIT WORK
--ROLLBACK-1024-017709568359
--ROLLBACK WORK
--ROLLBACK-1013-017709568366
--ROLLBACK WORK
I have seen this happen before due to foreign keys. For whatever reason, a remote had a record that didn't exist in the consolidated, so when replication tried to commit the deletions, a foreign key error occurred on the remote. Might be something to look for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
..though IIRC, that should not rollback the whole huge DELETE but only the operations for those rows that would cause RI violations... - just because it's not the "statement text" itself that is replicated but the resulting operations (i.e. on a row-level), usually applied in grouped transactions (DBREMOTE -g n).
User | Count |
---|---|
67 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.