Lite Speed is an third party tool to
compress SQL backup and mainly used for SQL 2000 & SQL 2005. SQL
backup produced by using the Lite speed tool cannot be used as a normal
backup to perform the restore operation. SQL backup generated by Lite
speed tool can only be restored by using the Lite Speed utility . There
are two ways of restoring a Lite Speed backup. One is to follow the GUI
mode and it will guide you through the restore process and the other is
to use the below script which can perform the restoration in a much
quicker and easier way.
exec master.dbo.xp_restore_database @database = N’databasename’ ,
@filename = N’Full path of the backup file’,
@filenumber = 1,
@with = N’STATS = 10′,
@with = N’MOVE N”LogicalFileNameOf MDF file” TO N”Destinationpath\Logicalfilename.mdf”’,
@with = N’MOVE N”LogicalFileNameOf LDF file” TO N”Destinationpath\Logicalfilename.ldf”’,
@affinity = 0,
@logging = 0
GO
Example :-
exec master.dbo.xp_restore_database @database = N’Test’ ,
@filename = N’Q:\Backup\Test_20130308.bak’,
@filenumber = 1,
@with = N’STATS = 10′,
@with = N’MOVE N”Test” TO N”M:\data\Test.mdf”’,
@with = N’MOVE N”Test_log” TO N”H:\logs\Test_log.ldf”’,
@affinity = 0,
@logging = 0
GO
exec master.dbo.xp_restore_database @database = N’databasename’ ,
@filename = N’Full path of the backup file’,
@filenumber = 1,
@with = N’STATS = 10′,
@with = N’MOVE N”LogicalFileNameOf MDF file” TO N”Destinationpath\Logicalfilename.mdf”’,
@with = N’MOVE N”LogicalFileNameOf LDF file” TO N”Destinationpath\Logicalfilename.ldf”’,
@affinity = 0,
@logging = 0
GO
Example :-
exec master.dbo.xp_restore_database @database = N’Test’ ,
@filename = N’Q:\Backup\Test_20130308.bak’,
@filenumber = 1,
@with = N’STATS = 10′,
@with = N’MOVE N”Test” TO N”M:\data\Test.mdf”’,
@with = N’MOVE N”Test_log” TO N”H:\logs\Test_log.ldf”’,
@affinity = 0,
@logging = 0
GO