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 Ashish Gilhotra,
As a SQL Server DBA, many time we takes backup's of our database and restore these backup's as a part of our dail maintanance plan or recovery plan. Sometimes we used to take backup's everyday and some times we forgot to take backup's of databses, so i just get into that thing as write a script for that which tells you about all the databases backup's and relatively there restore information, this script provides you useful information like backup date,how long it takes to run,who takes backup, backup type, size, is ever restored or not, restoration dat and some other very useful information for backup's and restoration process... so here we go with the script
This script takes Databse Name as a paramter by default it is NULL and script throws results for all of the databses but if you want to see the details for any specific database the provide Databse Name with this script.
Here are the little description of columns which we get from this script...
BS_Name = Name of BackUpBS_UserName = Name of User from which BackUp had taken.backup_start_date = Start Date Time of BackUpbackup_end_date = End Date Time of BackUpBackUp Type = Type of BackUpBackUp Size = Size of BackUp FileDbname = Name of databaseServerName = Name of ServerPhysical_Device_Name = name of Drive or Device where backup storedIs Ever Restored = is BackUp Ever Restore(Yes/No)Destination Db = Name of Database Restored By BackUpRestore Path = Path from database restoredRestore type = Type of restorationrestore_date = Date when Database Restoredrestore by = User by which database in restoredTime Taken = Total time taken to take Database BackUp
Hope this script will be useful for mant peoples who like to see the backup's and restoration details for their Databases.
DDL trigger for RESTORE DATABSE
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 ...
restoring a databse with change logs
Create a restore script based on backup files in a directory