Automatically scripting replication

  • I know that replication can be scripted via enterprise manager, but I would like to produce a script automatically (weekly/daily), so that if (heaven forbid) a developer might accidentally damage/drop replication I can quickly recover the situation by running the script.

    Can't figure out how to achieve this though, any thoughts?

     

     

  • You can use the Scripting Object in DMO (2000, 7.0) or SMO (2005). DMO can be use in a VB Script but SMO needs VB.Net.

    Create your script/program and schedule it in either SQL Agent or Scheduled tasks.

    You can find samples of SMO in C:\Program Files\Microsoft SQL Server\90\Samples\Engine\Programmability\SMO and there is forum for DMO/SMO on MSDN.

    MG

    "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
    Tony Hoare

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply