Avamar SQL Plugin Useful TSQL scripts and when to use them during troubleshooting
Resumen: Commonly used TSQL scripts to troubleshoot SQL backup and restore issues.
Este artículo se aplica a
Este artículo no se aplica a
Este artículo no está vinculado a ningún producto específico.
No se identifican todas las versiones del producto en este artículo.
Instrucciones
1) This TSQL script generates a complete backup history over a time period.
This is useful to determine if and when specific Database was last backed up.
This is useful to determine if and when specific Database was last backed up.
- Get Entire Database Backup History including its size backed up over a certain date range.
SELECT msdb.dbo.backupset.database_name,
msdb.dbo.backupset.backup_start_date,
msdb.dbo.backupset.backup_size,
msdb.dbo.backupset.backup_finish_date,
msdb.dbo.backupset.type,
msdb.dbo.backupset.database_backup_lsn,
msdb.dbo.backupset.first_lsn,
msdb.dbo.backupset.last_lsn
FROM msdb.dbo.backupmediafamily
INNER JOIN msdb.dbo.backupset
ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id
WHERE database_name IN ('sql_database_name_here')
--and msdb.dbo.backupset.backup_finish_date between '1/20/2000' and '10/14/2022'
ORDER BY
2 DESC,
3 DESC
This TSQL script is used to check the SQL LSN number sequence and whether the "log chain" is broken when avsql logs show "Log gap" errors.
- The Backup LSN Information can be validated by running the following two queries.
SELECT last_lsn, type, user_name FROM msdb..backupset WHERE database_name=N'sql_database_name_here' AND type LIKE 'L' ORDER by last_lsn DESC SELECT last_log_backup_lsn FROM sys.database_recovery_status "WHERE database_id = DB_ID(N’sql_database_name_here')"
Note: Customize the "sql_database_name_here" entries to your need.
Compare the Database LSN information returned from the above queries to what Avamar SQL Plugin stored in sqlmeta.xml file.Propiedades del artículo
Número del artículo: 000207317
Tipo de artículo: How To
Última modificación: 05 sept 2025
Versión: 3
Encuentre respuestas a sus preguntas de otros usuarios de Dell
Servicios de soporte
Compruebe si el dispositivo está cubierto por los servicios de soporte.