SQL Script to find database restoring history
2) Which backup file (with location information) is used for database restoration?
3) Name of the source database whose backup file is used database restoration?
4) When database backup file is created ?
5) Which user perform the database restoration activity?Below query can be used for finding the database restoration history
SELECT [r].[destination_database_name] as [Database Name],
[r].[restore_date] [Restore Date],
[r].user_name as [User],
(cast([b].software_major_version as varchar(10))+’.’ +
cast([b].software_minor_version as varchar(10)) +’.’+
cast([b].software_build_version as varchar(10))) as [Server version],
[b].compressed_backup_size as [Backup file Size],
[b].[backup_start_date] [Backup Start Time],
[b].[backup_finish_date][Backup End Time],
[b].[database_name] as [Source Database Name],
[bkpmf].[physical_device_name] as [Backup File Used For Database Restore]
FROM msdb..restorehistory r
INNER JOIN msdb..backupset b
ON [r].[backup_set_id] = [b].[backup_set_id]
INNER JOIN msdb..backupmediafamily bkpmf
ON [b].[media_set_id] = [bkpmf].[media_set_id]
ORDER BY [r].[restore_date] DESC
For example, suppose we created a database name as “Sampledatabase” which is never restored. Then if we execute the above query we got no restoration history of this database:-
Now we take backup of this database
and restore the “Sampledatabase” with the backup taken in the above step.
If we again execute the SQL Script to get database restoration history, we got the following result
Pingback: seo plans and pricing
Pingback: ket qua bongda truc tuyen
Pingback: diario Abc Argentina
Pingback: cbd
Pingback: social impact marketing
Pingback: The Business Of Getting Business
Pingback: cornhole board decals
Pingback: should cbd have a taste?
Pingback: Empire Market
Pingback: Global Sanitary Ware Market 2019: Anglo American Platinum, Impala Platinum Holdings, SC MMC Norilsk Nickel, Lonmin, Stillwater Mining
Pingback: Southwood Tallahassee FL
Pingback: sahabat qq
Pingback: Sea Games 2019
Pingback: cdr qq
Pingback: pokermas99
Pingback: www.1qiuqiu99.club
Pingback: jbovn
Pingback: www.1lapakqq.site
Pingback: login sbobet888
Pingback: www.1mainqq.site
Pingback: Tallahassee zipcode
Pingback: www.2015louisvuittonoutlet.net
Pingback: cannabidiol
Pingback: paito sgp
Pingback: Lauren
Pingback: newly built houses for sale
Pingback: partenariat instagram
Pingback: navigate here