SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Create a policy to avoid backups withou copy_only option


Create a policy to avoid backups withou copy_only option

Author
Message
hillock666
hillock666
SSC-Enthusiastic
SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)

Group: General Forum Members
Points: 103 Visits: 92
Hi.
We have several databases in full recovery model. Daily we make full backups, but sometimes we need take a full backup for development purposes. I would like guarantee that everyone "remember" check copy_only option. Can I create a policy, or a DDL trigger that avoid this mistake?
Thanks in advance,
Fran
GilaMonster
GilaMonster
SSC Guru
SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)

Group: General Forum Members
Points: 547301 Visits: 47737
Are you doing diff backups? If not, it's not so critical to use the copy_only option

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


hillock666
hillock666
SSC-Enthusiastic
SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)

Group: General Forum Members
Points: 103 Visits: 92
Since I 'm not doing differentials backups, hasn't this option any effect?
Thank you!
GilaMonster
GilaMonster
SSC Guru
SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)

Group: General Forum Members
Points: 547301 Visits: 47737
Correct. No full backup (with or without copy_only) breaks the log chain.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Wildcat
Wildcat
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2790 Visits: 1445
GilaMonster (10/22/2010)
Correct. No full backup (with or without copy_only) breaks the log chain.


Gail, I am confused here.

For example, from FULL BAKCUP A to FULL BACKUP B, we have a log chain. If you issue a FULL backup C without COPY_ONLY between A and B, then, you break the previous log chain A to B.

Right?

According to Microsoft, you should backup log after the Full backup C to establish a new log chain.
Ray Mond
Ray Mond
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3799 Visits: 1544
For example, from FULL BAKCUP A to FULL BACKUP B, we have a log chain. If you issue a FULL backup C without COPY_ONLY between A and B, then, you break the previous log chain A to B.

Right?

No. You can make as many full backups as you want between full backup A and B, and you will not break the log chain.

According to Microsoft, you should backup log after the Full backup C to establish a new log chain.

Could you please provide the URL to the article? I would like to see the context the recommendation was made in.

Thanks.

SQL BAK Explorer - read SQL Server backup file details without SQL Server.
Supports backup files created with SQL Server 2005 up to SQL Server 2017.
ps.
ps.
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15400 Visits: 3674
Full Backups do not break transaction log chain.
However they do reset differential backups. If you take full backup wth copy_only option, the differential backup will contain pages that were modified after the last full backup without copy_only option.



Pradeep Singh
ps.
ps.
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15400 Visits: 3674
If you have truncated the log, you will need to take a full OR diff backup to start a new log chain.
another case, if ur db has never been backed up(full recovery) then until you take full backup a new log chain wont start. db behaves as if it were in simple recovery mode.



Pradeep Singh
GilaMonster
GilaMonster
SSC Guru
SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)SSC Guru (547K reputation)

Group: General Forum Members
Points: 547301 Visits: 47737
Wildcat (10/22/2010)
If you issue a FULL backup C without COPY_ONLY between A and B, then, you break the previous log chain A to B.

Right?


Wrong.
Full backups do not and never have broken the log chain.

It's trivial to test and, if you want, I can find a blog post from the former program manager of the Storage Engine stating and proving this.

The only things that break the log chain are:
* Switch to simple recovery
* Backup log with nolog/truncate only
* Deleting a log backup (won't stop you taking log backups, will stop you recovering with them)

According to Microsoft, you should backup log after the Full backup C to establish a new log chain.

Link please.
I need to write a scathing email to either the author or the MS documentation people if such an official recommendation exists

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Wildcat
Wildcat
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2790 Visits: 1445
[quote
The only things that break the log chain are:
* Switch to simple recovery
* Backup log with nolog/truncate only
* Deleting a log backup (won't stop you taking log backups, will stop you recovering with them)

[/quote]

Sorry, after reading Microsoft document 3 times, I misunderstood the concept. Ermm

Thanks, Gail.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search