Professional Documents
Culture Documents
SQL Lite Speed
SQL Lite Speed
SQL Lite Speed
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"'