Solved

Changing backup type from append to overwrite

Posted on 2006-07-02
2
407 Views
Last Modified: 2013-12-03
I have an SQL server with around 15 databases that have been setup with individual backup jobs for each day of the week - so there are around 75 backup jobs.

The backups are set to backup to disk, these files are then separately backed up to tape. Each database is backed up to a file for the day so that they can go back 5 days without having to go to tape.

The person who set the jobs up chose the append option rather than the overwrite option, and the server is now running out of disk space.

Is there any way to change an existing job to overwrite rather than append.

The code in enterprise manager doesn't seem any different either way:

BACKUP DATABASE [EXAMPLE] TO  DISK = N'D:\BACKUP\EXAMPLE\FRIDAY\EXAMPLE' WITH  INIT ,  NOUNLOAD ,  NAME = N'EXAMPLE FRIDAY backup',  NOSKIP ,  STATS = 10,  DESCRIPTION = N'EXAMPLE FRIDAY backup',  NOFORMAT

I would rather find a nice way to change it rather than having to reschedule 75 jobs for them.


A
0
Comment
Question by:arrowtech
2 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 17029233
Format implies SKIP, and u have NOSKIP - this may be it

NOSKIP
Instructs the BACKUP statement to check the expiration date of all backup sets on the media before allowing them to be overwritten. This is the default behavior. For information about the interactions between { INIT | NOINIT } and { NOSKIP | SKIP }, see the Remarks section.

SKIP
Disables the checking of backup set expiration and name that is usually performed by the BACKUP statement to prevent overwrites of backup sets. For information about the interactions between { INIT | NOINIT } and { NOSKIP | SKIP }, see the Remarks section.



More info found http://msdn2.microsoft.com/en-us/library/ms186865.aspx

0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17035086
From BOL, this is the cause (no points please as it confirms the previous comment):

INIT

Specifies that all backup sets should be overwritten, but preserves the media header. If INIT is specified, any existing backup set data on that device is overwritten.

The backup media is not overwritten if any one of the following conditions is met:

· All backup sets on the media have not yet expired. For more information, see the EXPIREDATE and RETAINDAYS options.

· The backup set name given in the BACKUP statement, if provided, does not match the name on the backup media. For more information, see the NAME clause.

Use the SKIP option to override these checks. For more information about interactions when using SKIP, NOSKIP, INIT, and NOINIT, see the Remarks section.

Note  If the backup media is password protected, SQL Server does not write to the media unless the media password is supplied. This check is not overridden by the SKIP option. Password-protected media may be overwritten only by reformatting it. For more information, see the FORMAT option.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question