Home > Backup database, Functions and DMVs, SQL Queries, SQL Server, T-SQL > Get the last database backup time for any database.

Get the last database backup time for any database.

As a DBA it is very important to know, when the database was last backed up. It is also important to know the number of backups and the time of backup. But how do we get it by quering the database?  The database “MSDB” contains the information about the backups taken for a database , the time of backup, the user initiated, type of backup and other valuable information. All these information is stored in BACKUPSET” .  Use the query

select * from MSDB.DBO.BACKUPSET

All you need to do is to filter out the information that you require.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: