(1) Backup a Database : [Link].xp_backup_database @database='Northwind', @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.BKP' (2) Verifying the Backup file : exec [Link].xp_restore_verifyonly @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.
BKP', @filenumber = 2 (3) Taking File-list from a Backup file : exec [Link].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 [Link].xp_restore_filelistonly @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.BKP' Note : You have to take Logical name from output.
(3) Restore the Database : exec [Link].xp_restore_database @database='Northwind', @filename='F:\Backup\Northwind200703081742LiteSpeed_Full.BKP', @with='replace', @with='move "Northwind" to "d:\mssql8\MSSQL$SOM01\data\[Link]"' , @with='move "Northwind_log" to "d:\mssql8\MSSQL$SOM01\data\[Link]" ', @with='move "Northwind" to "d:\mssql8\MSSQL$SOM01\data\[Link]"'