Archive

Archive for the ‘SQL Query’ Category

BI SQL # 279 : Get all last back up date and time with physical bak file path

November 20, 2016 Leave a comment

Hi Friends,

Lets see how to Check all last database back up date and time with physical bak file path

image

In this post we are going to discuss following “how to Check all last database back up date and time with physical bak file path”following points:

  • Problem Statement of SQL Script:
  • Description of SQL Script:
  • SQL Script Output Column
  • SQL Script Code

Problem Statement of SQL Script:

how to Check all last database back up date and time with physical bak file path.

Description of SQL Script:

Simple self-explanatory script.

SQL Script Output Column

backup

SQL Script Code

SELECT @@Servername AS ServerName,
	d.NAME AS NAME,
	b.Backup_finish_date,
	bmf.Physical_Device_name
FROM sys.databases d
INNER JOIN msdb..backupset b
	ON b.database_name = d.NAME
		AND b.[type] = 'D'
INNER JOIN msdb.dbo.backupmediafamily bmf
	ON b.media_set_id = bmf.media_set_id
ORDER BY d.NAME,
	b.Backup_finish_date DESC;

User Level to execute

500

    Hope you will like “how to Check all last database back up date and time with physical bak file path”.

    If you really like reading my blog and understood at least few thing then please don’t forget to subscribe my blog.

    Connect With me on

    | FaceBook |Twitter | linkedIn| Google+ | WordPress | RSS |

Advertisement
%d bloggers like this: