开发者

How to manually apply snapshot on subscriber of SQL Server 2000 database publication

I am trying to create replication between two SQL Server machines that are physically remote and have a slow connection between them.

So I want to manually move the snapshot folder to the subscriber instead of letting it copy over the slow connection. I wou开发者_运维百科ld like to know the steps to follow in order to successfully apply the snapshot on the subscriber.


I think that's going to be tricky. When you initiate a snapshot, you're placing a mark in the log that says when the snapshot was generated so that once the snapshot is applied at the subscriber, the distribution agent knows from which point to start delivering replicated commands. So you not only have to apply the snapshot, but somehow tell replication that it's already been delivered and to start delivering commands from the right time.

But to answer your question, the snapshot is just a series of flat files. There are .pre files which are just T-SQL and should be run first (I like using sqlcmd or osql for this since I can script it out from the command line). Next are the .sch files which are also T-SQL. Next are the data files (I don't remember the file extension for these off the top of my head). They are bcp "native" format. So you're going to apply them with something like "bcp db.schema.table in file -n -T -S server -b1000". Finally are the .idx files which are T-SQL again. All but the data files are human-readable so you can look at what they're doing (nothing fancy, but always good to know). Good luck.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜