No Brainer SQL SERVER Log Shipping With Quest’s LiteSpeed
I am doing some dabblings on Quest Software’s LiteSpeed. It’s cool that LiteSpeed can give you familiar options in its GUI. If you’re new to Log Shipping, instead of reading pages after pages of tutorials, take a look at the script that LiteSpeed created and see how it is being done.
Note: I only tested this within a single server. I did the log shipping between “Subcriber” and “Publisher” databases. Do you want to guess which is which?
Here’s the sample script that LightSpeed’s Log Shipping Plan Wizard created for me:
/* this script executes on publisher */
declare @plan_id as uniqueidentifier
declare @backup_job_id as uniqueidentifier
exec LogShipping_Add_PrimaryDatabase
@PlanName=N'Test',
@PlanDescription=N'Test',
@Database = N'Publisher',
@PlanID = @plan_id output,
@BackupShare = N'\Devcomp',
@BackupJobID = @backup_job_id output,
@BackupPeriod = 15,
@BackupRetentionPeriod = 1440,
@BackupAcceptableLatency = 45,
@BackupDirectory = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup',
@PerformBackup = 1
select @plan_id
/* this script executes on publisher */
exec LogShipping_Add_PrimarySubscriber
@PrimaryDatabase = N'Publisher',
@SecondaryServer = N'DEVCOMPSQLSERVER2005DEV',
@SecondaryDatabase = N'Subscriber'
/* this script executes on subscriber DEVCOMPSQLSERVER2005DEV */
declare @restore_job as uniqueidentifier
declare @secondary as uniqueidentifier
exec LogShipping_Init_Subscriber
@PlanName=N'Test',
@PlanDescription=N'Test',
@PlanID = @plan_id,
@PrimaryServer = N'DEVCOMPSQLSERVER2005DEV',
@PrimaryDatabase = N'Publisher',
@BackupSourceDirectory = N'\Devcomp',
@BackupDestinationDirectory = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup',
@SecondaryDatabase = N'Subscriber',
@RestoreJobID = @restore_job output,
@SecondaryID = @secondary output,
@RestoreDelay = 0,
@FileRetentionPeriod = 1440,
@CopyPeriod = 15,
@RestorePeriod = 15,
@RestoreMode = 0,
@DisconnectUsers = 0,
@RestoreAcceptableLatency = 30,
@RestoreAffinity = 0,
@RestoreDataDestinationDirectory = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data',
@RestoreLogDestinationDirectory = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data',
@PerformRestore = 1



















