0% found this document useful (0 votes)
49 views1 page

SQL Lite Speed

The document provides instructions for backing up a database, verifying and listing the contents of a backup file, and restoring a database from a backup by replacing the data and log files at new locations.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

SQL Lite Speed

The document provides instructions for backing up a database, verifying and listing the contents of a backup file, and restoring a database from a backup by replacing the data and log files at new locations.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

(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]"'

You might also like