Here are the some of Queries for taking the SQL Server Databases backups & Restore by using the Lite Speed
Full & Diffencial backup
================
EXEC master.dbo.xp_backup_database @database='DBname'
,@filename='C:\DR_DIFF.BAK'
, @init= 1
, @with = 'DIFFERENTIAL'
T-log backup
========
EXEC master.dbo.xp_backup_log @database = 'DBname'
,@filename='C:\DR_LOG.BAK'
,@init = 1
Restore the database
----------
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
Restore the database
----------
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
Thanks®ards
As Reddy