Replication frustration: Adding article does not create the table on subscriber

Working with the SQL Server replication is not a great pleasure.
Working with the SQL Server replication replication is not a great pleasure, when all is working as you expect.
Working with the SQL Server replication replication is not a great pleasure at all, when something is not working and there is no documentation.
Working with the SQL Server replication replication is not a great pleasure at all, when something is documented but simply is not working.
We have been fighting with some really weird behavior during the last few month. This is a basic transaction replication feature: adding article on the table supposed to create table on subscriber. It's working on some servers. And it doesn't work on some servers. Regardless the SQL Server version, whether it is SQL Server 2005 sp4 or SQL 2008 R2 sp1. The most amazing thing is that it's reproducible and not working on production environment ONLY. We could never reproduce it on the QA servers.
The scenario is pretty easy.

• Add a new article for a table
• Create subscriptions to it
• Start snapshot agent

On most subscribers at this moment the table gets created. Except some subscribers where it's not getting created. Subscribers don't get the snapshot. At all.
Getting into lower level, the new article and subscription exist in the distribution database. In the MSSubscriptions table we can see the subscriptions with status 1 before the snapshot is started. After the snapshot is completed the status is changed to 3 for a few seconds and then to 2. The snapshot scripts don't run on the subscriber and therefore the table not created.
When an inserts starting to flow into the published table, they get replicated to all subscribers and fail with the following error - "Invalid object name tablename".
According to the statuses of MSSubscriptions table:
0 - Inactive
1 - Subscribed
2 - Active
3 - Snapshot interrupted (undocumented)

We have created a support call to MS but, because we don't have premier support, the issue have got VERY LOW priority.

If you have experienced any similar behavior and have any solution to it, drop some comments here.

Comments

Popular posts from this blog

Unlocking Microsoft Fabric: A Simple Guide when you only have a personal account.

ETL to ELT journey: Break free your Transformations and discover Happiness and Data Zen

Coding is a rollercoaster of efficiency and eyebrow-raising discoveries.