October 10, 2012 at 3:40 pm
Need Help!
We have whole lot of replication.
Can we have a automatic process to generate script for all Publication on the local server and save it on local drive as txt or sql file as backup everyday.
October 11, 2012 at 3:31 pm
Any Help ...!
October 13, 2012 at 5:46 am
I use a combination of PowerShell and SQL PSX
$Instance = 'ServerName'
$scriptargs = [Microsoft.SqlServer.Replication.scriptoptions]::Creation `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludeArticles `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludeGO`
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludeCreateSnapshotAgent`
Get-ReplPublication $Instance | ForEach-Object {
$script = Get-ReplScript $_ -scriptOpts $scriptargs
$script | out-file -filepath $FilePath -force; }
October 15, 2012 at 9:47 am
How to use the script to run. Can we schedule with an agent job.
Thanks for your replay,
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply