menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Databases

>

T-SQL scri...
source image

Sqldbanow

2w

read

155

img
dot

T-SQL script that retrieves the last full backup, differential backup, and log backup along with their backup locations and status for all databases:

  • The given T-SQL script retrieves the last full backup, differential backup, and log backup along with their backup locations and status for all databases.
  • The script uses the tables msdb.dbo.backupset and msdb.dbo.backupmediafamily to retrieve backup information.
  • By joining these tables with the sys.databases table, it collects backup details for each database.
  • The script includes information like database name, last backup time for full, differential, and log backups, backup locations, and backup status.

Read Full Article

like

9 Likes

For uninterrupted reading, download the app