我已经在 2 个数据库之间设置了 SQL Server 2008 事务复制。复制会话完成后,我想执行一个 T-SQL 脚本。是否有设置复制后脚本的配置或识别复制完成的机制,我可以在复制完成后挂钩任何脚本?如果我们没有这个配置,我们是否可以使用触发器来识别表在复制期间是否已完全更新,从而使用触发器来调用复制后脚本?
问问题
907 次
2 回答
1
Yes, check the @post_snapshot_script parameter of sp_addpublication, or the Properties page of the publication, under Snapshot, you'll find a section for "Run Additional Scripts" with an option for pre- and post scripts.
于 2011-10-12T11:05:39.083 回答
0
是的,我建议查看系统表中的数据以验证已发布表的详细信息
发布了数据库中的哪些对象?
发布数据库
- 从系统文章中选择 *
- 选择 * 从 syspublications
分布数据库
- 使用分布
- 去
- SELECT * FROM distribution..mspublications
订阅者数据库
- 使用订阅数据库
- SELECT * FROM MS订阅
- 选择 * 从 MSsubscriber_info
希望能帮助到你。
于 2011-10-12T11:56:36.607 回答