开发者

Snapshot replication publisher schema changes

At present in my project I have two database, lets call them 'Live' and 'Reporting'.

I need my 'Live' database to be used as you would expect, all changes stored etc as they happen. I need my 'Reporting' database to remain static (non-volatile) all day, except when replication takes place.

At present, I have replication setup to work at 3am each day, and to copy over all tables, which requires either:

  • Lots of manual work each time the 'Live' schema changes (extra table for example?) to recreate my snapshot replication, which must be deleted prior to many of the schema changes (perhaps a table is removed, or even that the db is backed up/restored).
  • Or, that I have to write a sript to explicitly recreate the publisher and subscriber after each update/change to the database.

Due to my time constraints when releasing to the new server (and the likelihood that errors can be introduced with manual steps..) I feel like there must be a neater way to recreate or otherwise maintain the replication. Ideally,开发者_运维问答 I want the entire database (minus a few explicitly highlighted tables...). At present, it just feels quite 'messy'.

Has anyone had a similar problem, or does anyone have any suggestions?


I solved this using T4 templates.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜