Checking last backup date

In this recipe, we will check when databases have been last backed up.

Getting ready

One way to check when a database was last backed up is through SQL Server Management Studio. Open SSMS and connect to your instance. For example, if you want to see when AdventureWorks2014 was last backed up, you can right-click on this database and select Properties. In the General page, you should see a section for Backup, which should show you when a database and log were last backed up.

Getting ready

How to do it...

The steps to check the last backup dates are as follows:

  1. Open PowerShell ISE as administrator.
  2. Import the SQLPS module as follows:
    #import ...

Get SQL Server 2014 with PowerShell v5 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.