April 19, 2017 at 9:13 am
Hi,
I created a new snapshot and applied it. It ran the scripts to truncate all the tables and drop the keys. Then it loaded all of the tables and ran the post scripts. I got the "snapshot has been applied" message. At this point it should have gone into transactional mode.
Instead, it immediately started over and truncated all of the tables again and started loading.
I'm afraid it's just going to do it again when this load finishes. (It takes about 7 hours)
Has anyone ever seen anything like this happen?
Thanks
April 19, 2017 at 10:34 am
EXEC sp_helppublication;
Sue
April 19, 2017 at 10:43 am
It is standard transactional replication. It's been running fine for about 9 months. I added a table yesterday and created a new snapshot. It reinitialized the publication with the snapshot and then immediately did it again.
April 19, 2017 at 11:24 am
Tom Schuettke - Wednesday, April 19, 2017 10:43 AMIt is standard transactional replication. It's been running fine for about 9 months. I added a table yesterday and created a new snapshot. It reinitialized the publication with the snapshot and then immediately did it again.
And what is in the Subscription Watch List? Check both Transactional and Snapshot in the left dropdown.
And did you run sp_helppublication? Did you check the replication frequency value?
You can also execute sp_helpsubscription. You can verify, check statuses all of the values of those two procedures here:
sp_helppublication (Transact-SQL)
sp_helpsubscription (Transact-SQL)
Did you check the properties for the Snapshot Agent and the Log Reader Agent? Those could be out of sync somehow - most likely with however the changes were make.
Not sure how you added the table and reinitialized the snapshot but it seems that something in that process caused issues.
Sue
April 19, 2017 at 11:52 am
Subscription watch list shows nothing for snapshot, and my subscription shows under transactional.
sp_helppublication shows 0 for replication frequency.
I see nothing out of the ordinary from sp_helpsubscription.
We've tried to recreate the same steps on our dev server and it works as expected. Added the table, created the snapshot, only the new table was initialized, and transactional replication resumed.
Last night in production it reinitialized the entire database and then did it again. Really strange behavior.
April 19, 2017 at 12:01 pm
Sue
April 19, 2017 at 12:16 pm
It's currently reinitializing from the snapshot. Log reader is enabled and running. Everything looks correct and we've matched all the settings to dev.
I'm going to let this run through (it's about half way done). If it does it again I'll open a ticket with Microsoft.
Thanks for your help, I really appreciate you taking some time to look at my problem.
Tom
April 19, 2017 at 12:20 pm
You are very welcome. Please post back after the reinit if you can - I'm curious to see if that corrects things or not. Weird issue.
Sue
April 20, 2017 at 12:26 pm
As soon as the re-init finished it started over again.
So I opened a ticket with Microsoft. The engineer had never seen replication behave like this before.
We removed the table that I had added, and then added it back in.
We created a new snapshot and it did exactly what it was supposed to do, it created a snapshot for just the new table, not the entire database. Then we marked for re-init and created a new snapshot for the subscription and let it load (7 hours). When it finished it started moving transactions like it should.
We never found a cause.
April 20, 2017 at 1:53 pm
Thanks for the follow up - much appreciated. I totally hate those where a cause is never found. It's always there somewhere. And I'm foolish enough to pick at it for hours trying to find it. Glad it's all good now.
Sue
January 8, 2018 at 11:12 am
I tried everything you pointed out still repeats. I tried creating a replication with no indexs and that seemed to work. I had to move onto something else so for now data is being replicated fine and if somebody needs the indexs I will replicate them on a table by table bases.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply