• Ed Wagner (1/21/2014)


    Grant Fritchey (1/21/2014)


    Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

    Interesting...thank you, Grant. I read the MSDN descriptions of them and INIT replaces any backup sets, but preserves an existing media header on the device. FORMAT specifies that the media header should be rewritten.

    I'm interpreting this to mean that when I take a full backup of each database to its own unique file on disk and never share backup files, then there's never a media header to rewrite. Am I reading this correctly? Or did I miss something?

    No, you didn't miss anything, but I'm a belts & suspenders kind of guy. Just because you're not rewriting the header doesn't mean you'll never rewrite the header and having it built right in doesn't hurt anything on a one-off backup... You're fine your way, but it's a good thing to know.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning