Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Smitha Reddy,
If you have multiple backup database backups on a single SQL Server 2008 R2 backup device, this script will help you restore a database from the LATEST full and differential backups residing on that backup device.
If this script is to be used for restoring a SQL Server 2005 database, please remove "CompressedBackupSize" from the CREATE temporary table statement.
The following page contains a stored proc script for restoring all databases from a number of backup files:
I used information on the above page in constructing my "CREATE TABLE #RestoreHeaderOnlyData" script.
This script provides very useful information about database backup and restoration.
Script to restore the entire databases from the backup directory just by passing the backup director...
Use this script to generate RESTORE DATABASE scripts for all .BAK backup files from backup location ...
Create a restore script based on backup files in a directory
SCRIPT TO RESTORE BACKUP FOR ALL DATABASES, PLACED IN FOLDER CALLED
ORIGIN_FOLDER, WITH THE INITIAL...