MCITP

MCITP

Friday, March 8, 2013

How to extract Litespeed file and convert it into native backup file

Please find the extractor.exe file on the system and then go to the path using CMD, once you have reached to the location, use the below command.


Extractor.exe -F Sourcepath\filename.BAK -E Destinationpath\filename_native.bak

If you don't have extractor.exe then copy the same from any server to the destination server and then try to extract it.

How to restore database using Litespeed backup file and TSQL command

Below is TSQL script to restore database in MSSQL using Litespeed backup file.

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



Followers