If you are doing a backup to disk then why do you need SKIP, FORMAT, REWIND, NOUNLOAD?

  • I have read through the backup section of BOL and searched a good amount, looked at various exapmles, and such. But I have not found a good explanation to why SKIP, FORMAT, REWIND, etc are added.

    Everything I read about backups says I can get away with just a simple backup:

    BACKUP DATABASE [TEST] TO DISK = N’D:\BACKUP\TEST.BAK WITH INIT, NAME = N’TEST_BACKUP’ STATS = 10

    However, every time I use one of SQL’s built in solutions such as the Maintenance Wizard or Right click and Backup, then look at the Script involved it seems to add SKIP, NOREWIND, NOUNLOAD, or anyone of the tape options. So being paranoid, I wonder what I am missing.

    Could someone explain why they are added when you backup to disk?

    If you were going to do a Nightly backup of a database, what would put? What options would you run? In my example I am over writing each night.

    Thank you,

  • haha while i'm no expert on the issue, i thought I would post what I am using for my backups

    WITH INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT

    similar to what you said, these were the options that were added on for me, and i haven't changed them

    however, i am not overwriting the same file everyday, instead i create a timestamp'd backup each time (new file) -- so i don't even know if any of these options are necessary or relevant.

  • You can simply backup the databases without using all the options in your script. You need not to use all the options available for backup script.

    As long as your script servers your purpose properly, it is good to use. Just ignore the others options. Options are there to facilitate the different methods, scopes, limitations, etc of the activity. Your databse backup script is correct.

  • You can simply backup the databases without using all the options in your script. You need not to use all the options available for backup script.

    As long as your script servers your purpose properly, it is good to use. Just ignore the others options. Options are there to facilitate the different methods, scopes, limitations, etc of the activity. Your databse backup script is correct.

  • Ahh, but why are they added by the built in tools?

  • The tool is designed in the way that it should meet the requirement of all sort of requests. Let it be disk backup, tape backup, file backup, file group backup, log backup, tran backup, etc. While generating the code based on your selection on the wizard, they put the other options as diabled/non effective so that your action can be performed properly. This is the nature of tool by design.

  • Hi guys if you are taking a disk backup there is no need to use this options ,this are basically used in case of taking tape backup.

  • thanks for that information!

    i'll save a couple bytes on my script 😛

  • So all you would need is?

    BACKUP DATABASE [TEST] TO DISK = N’D:\BACKUP\TEST.BAK WITH INIT

    or

    BACKUP DATABASE [TEST] TO DISK = N’D:\BACKUP\TEST.BAK WITH NOINIT

  • You simply need

    BACKUP DATABASE [TEST] TO DISK = N’D:\BACKUP\TEST.BAK WITH INIT

    or

    BACKUP DATABASE [TEST] TO DISK = N’D:\BACKUP\TEST.BAK

    So simple. 🙂

  • You only need

    BACKUP DATABASE [TEST] TO DISK = N’D:\BACKUP\TEST.BAK WITH INIT

    or

    BACKUP DATABASE [TEST] TO DISK = N’D:\BACKUP\TEST.BAK

    So simple. 🙂

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply