Tuesday, December 8, 2009

Copying SQL Server 2005 push replication using Generate Scripts

On the server where the existing replication is:
  1. Right-click the publication (in SSMS, Replication: Local Publications) and select Generate Scripts...
  2. Select To Create or Enable the Components
  3. Choose file location and Save
  4. OK and Close
On the server you want to copy it to:
  1. If the server has never had replication before, manually create and delete a test publication (right-click Local Publications & select New Publication, choose some random stuff, then right-click the test publication and Delete). This will ensure the distribution database is created along with other stuff needed for replication
  2. Open the script, replace the servers and logins as appropriate
  3. Run on the target server

No comments: