Replication
First Test: Adding an article to a publication
- I created a new table in the publisher database
- I added the table as an article in the publication
- I checked replication status on the Subscriber and it says "The initial snapshot for article 'JohnReplTest' is not yet available."
- Ran the Replication Snapshot Agent for the publication on the publisher
- Check the subscriber and the table was there and synced.
Second Test: Adding a view to an existing publication
- Created a view in the published database
- Added the view as an article in the publication
- Checked the subscriber but the view was not there and the status said: The initial snapshot for article 'vw_JohnsReplView' is not yet available. (I did not realize you needed a snapshot for a view)
- Ran the Replication snapshot agent job for the publication
- Checked the Subscriber and the view is now there.
Third Test: Adding a Column to a Table and to a View
- Altered the table to add a column
- Altered the view to add the same column
- Checked the subscriber and the information was there.
Fourth Test: Adding a column with a default value
- Altered the table to add a column with a default value
- Altered the view to add the same column
- Checked the subscriber and the column was there with the data.
Sum Up
I find Replication a difficult technology to work with, there are so many facets that change based on what you are doing. It's easy to go the route of a full re-initialization when something goes wrong but if you have an oversees subscriber you have to consider the time it will take to push all the data out.
Out of my tests I was most surprised that adding a view required running the snapshot agent. I did not think that creating an object that had no data would require a snapshot. The saving grace is the fact that if you have not re-initialized any of the subscribers, the snapshot agent will only publish the new articles not the whole publication. Try these tests for yourself. The best way to learn about something is not just to read but to actually experiment.
Hasta Luego,
RutherfordTX
No comments:
Post a Comment