Search
Home
Articles
Backup
Books
Certification
FAQ
Products
Replication
Scripts
Seminars
Training
TSQL

MSDN Fourms
Philippine SSUG
Fort Worth SSUG
Oklahoma City SSDG

Resume

MHS Enterprises
BlowFrog Software
FilAm Software
AcrylicAcetate.com
Bargain Humidors
Western Humidor

Replication Primer 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Generating Scripts

In previous versions of SQL Server if you wanted to generate scripts for replication, it had to be done by hand using a large set of system stored procedures with many parameters. The thought of having to code hundreds of stored procedures by hand that had dozens of parameters was a daunting task. This was necessary however in order to be able to quickly drop and recreate replication in the case of a system failure. The last thing you wanted to do after spending hours recovering a server was to be faced with hours setting up replication through the GUI interface and hoping that you didn’t miss or change any settings.

Fortunately in SQL Server 7.0, this process was significantly streamlined. You now have the ability to generate scripts for replication after you visually define them. Select Tools | Replication | Generate Replication Scripts as shown in Figure 14-58 to display Figure 14-59.

replication58.gif (19160 bytes)

Generating replication scripts

replication59.gif (21006 bytes)

Defining script options

Microsoft could have done a slightly better job with this dialog to make things even easier. There are separate options to create and drop publications and subscriptions. You will normally want to do both, so you will need to utlize this dialog twice. The first time to generate the drop commands and the second to generate the create commands. You also have the ability to preview the script that will be created and modify it. The File Options tab simply allows you to specify the format of the text output and whether to create a new file or append to it. Clicking the OK button will allow you to specify a file.

We have covered a lot of ground in this chapter in a few short pages. This should get you going with replication. Don’t be fooled by the small number of pages devoted to this topic. Replication is a complex topic to cover that has far reaching effects on your systems. There are a whole group of replication topics and topologies that I have chosen not to cover here.

Besides frequenting this site, you can find me out on the Microsoft replication newsgroup frequently answering questions.  I will be posting a lot of additional replication information in the coming months that will compliment and round out this topic. This will compliment the material that will be going into my replication book that should see the shelves late next year. (Sooner if I can get the material together before then.)

Replication Primer 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Michael R. Hotek

All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.