TSQL command help needed

  • I inherited the DB admin job from a recently departed employee. As an application support person, my SQL knowledge is very limited. So I am left to deciphering what our DB plan is. Can someone help explain to me what these two backup commands are doing differently and why they are important?

    BACKUP DATABASE [son_db] TO DISK = N'\\backup2\SQL\son_db.bak' WITH NOINIT , UNLOAD , NAME = N'son_db backup', SKIP , STATS = 10

    and

    BACKUP DATABASE [son_db] TO DISK = N'\\backup2\SQL\SonDB-MWF' WITH NOINIT , NOUNLOAD , NAME = N'FULL-SQL- MWF', NOSKIP , STATS = 10, DESCRIPTION = N'FULL-ELITESQL- MWF', NOFORMAT

    They both run MWF (Monday, Wednesday and Friday). I understand one skips looking for expired backups and the other doesn't overwrite. They seem to reference tape backups even though we backup to disk. Why are they like this? Do I really need both?

    Thanks!

  • The first command runs a backup to a UNC device, appending backups to the same file (listed there). This is not recommended for a couple reasons

    - The backup across the network can be flaky.

    - If this file has issues, you lose all backups.

    Really this should be WITH INIT and use a new file name every day. A maintenance plans will automate this.

    The second one seems to do the same thing, but wouldn't unload the tape. Is this to tape somehow?

Viewing 2 posts - 1 through 2 (of 2 total)

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