SQL Server Science
Technical Articles for the DBA / Developer
Home » troubleshooting

Proving the Restore, Part 14: Getting the Script Out of the Procedure

2026-09-05 · by Hannah Vernon · in recovery

The generator from builds a restore script into a variable. Getting it back out so someone can read it before running it seems like the easy part. PRINT @script returns the beginning of it. How…

Proving the Restore, Part 13: Two Vocabularies for the Same Backup

2026-09-04 · by Hannah Vernon · in recovery

This series has used two sources for the same information. msdb records what the instance did. RESTORE HEADERONLY reads what’s in the files. They describe the same backups and disagree on almost every name. Code…

Proving the Restore, Part 12: The Files That Take No Extension

2026-09-03 · by Hannah Vernon · in recovery

The restore script generator from worked on most databases and failed on one. The full backup restored fine everywhere else; on this database the restore refused to start. The database had two FILESTREAM filegroups. The…

Proving the Restore, Part 9: Backups From a Different Database

2026-08-31 · by Hannah Vernon · in recovery

Two backup files, same database name, same server name, LSNs that line up. They can still be from different databases. Database names get reused. A database is restored under a new name, then renamed back….

Proving the Restore, Part 3: The Error That Blames the Wrong Statement

2026-08-25 · by Hannah Vernon · in recovery

A scheduled job that had run for months started failing after a server was upgraded. The message in the job history:

1
2
Msg 3013, Level 16, State 1, Line 1
RESTORE HEADERONLY is terminating abnormally.

Read that as a DBA and you go looking at the backup file:…

Mining the system_health Session You Already Have

2026-07-09 · by Hannah Vernon · in extended-events

The system_health session runs by default and writes .xel files. Read the event file, shred the XML, and mine the diagnostics on disk.

1 2 Next »

Search

Categories

  • AI for DBAs
  • announcements
    • events
  • basics
    • localization
  • configuration
  • Data Architecture
  • DMVs
  • documentation
  • extended-events
  • Git for DBAs
  • High Availability
  • Hot Takes
  • Internals
  • maintenance
    • patching
  • Opinion
  • performance
  • PostgreSQL
  • Professional Development
  • recovery
  • reporting
  • ROLLBACK;
  • security
    • data security
  • service broker
  • SQL Server Agent
  • statistics
  • sys
  • t-sql
    • xml
  • tools
    • data masking
    • wsus
  • troubleshooting
  • Uncategorized

Pages

  • About SQL Server Science
  • Get Better Help with a Minimal, Complete, and Verifiable Example, or MCVE
  • Privacy Policy

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy

Copyright © 2026 SQL Server Science