SQL Lite Speed

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

(1) Backup a Database : master.dbo.xp_backup_database @database='Northwind', @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.BKP' (2) Verifying the Backup file : exec master.dbo.xp_restore_verifyonly @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.

BKP', @filenumber = 2 (3) Taking File-list from a Backup file : exec master.dbo.xp_restore_filelistonly @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.BKP' (4) Refreshing Database : (1) Get Logical Name and Physical Filenames : Select name , filename from sysaltfiles where dbid = db_id ('Northwind') Note : You have to take Physical FileName from filename column of output. (2) Get the Logical Name and Physical Filename on Dump File : exec master.dbo.xp_restore_filelistonly @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.BKP' Note : You have to take Logical name from output.

(3) Restore the Database : exec master.dbo.xp_restore_database @database='Northwind', @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.BKP', @with='replace', @with='move "Northwind" to "d:\mssql8\MSSQL$SOM01\data\northwnd.mdf"' , @with='move "Northwind_log" to "d:\mssql8\MSSQL$SOM01\data\northwnd.ndf" ', @with='move "Northwind" to "d:\mssql8\MSSQL$SOM01\data\northwnd.ldf"'

You might also like