Solved

T-sql backup database statement

Posted on 2007-12-04
2
2,019 Views
Last Modified: 2011-10-03
Below is my backup statement:

BACKUP DATABASE [Master] TO  [MasterDevice] WITH  
RETAINDAYS = 5, NOFORMAT, INIT,  NAME = N'Master-FullBackup', SKIP, NOREWIND,
NOUNLOAD,  STATS = 10
GO

I need to know if after5 days will the file get initialized and contains only backup set <2 days? Can I know what is mean with an option SKIP,NOREWIND,NOUNLOAD
0
Comment
Question by:motioneye
  • 2
2 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 500 total points
ID: 20409631
Check SQL Books Online for "BACKUP DATABASE"

SKIP is only used if INIT is also used.
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.

NOREWIND (forces NOUNLOAD) and NOUNLOAD are used for tape systems, and prevent the tape from rewinding and unloading. They bear no relevance unless you are backing to tapes.
0
 
LVL 25

Assisted Solution

by:imitchie
imitchie earned 500 total points
ID: 20409637
If it's the same backup set name, INIT + SKIP will cause it to go to the very front of your file, so this will be the only backup in it. (no others will remain)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error message when scheduling a job using a linked Server 12 67
How to use TOP 1 in a T-SQL sub-query? 14 48
Caste datetime 2 64
Unable to save view in SSMS 21 73
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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