|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:06 AM
Points: 37,692,
Visits: 29,949
|
|
Comments posted to this topic are about the item Recovery Models
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 3:43 AM
Points: 1,257,
Visits: 4,255
|
|
| Nice article, but it just reinforces a query I've had for a while: why does bulk-logged recovery mode even exist? It has some hefty downsides compared to full recovery, and the only advantage I can see is that your log file might not get quite so big when using it, which seems a fairly minimal sort of advantage to my mind. Does someone with more SQL experience than me (i.e. practically everybody) have an example of a situation where it's really better to use bulk-logged recovery mode?
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:34 PM
Points: 2,170,
Visits: 3,582
|
|
Excellent article Gail. I liked all the myths and misconceptions you mentioned escpecially this one.
Myth 4: You have to switch from simple recovery to bulk-logged recovery model to get minimally logged operations.
Mohammed Moinudheen
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 9:35 AM
Points: 2,749,
Visits: 1,407
|
|
Gail,
I believe that it isn't simply a case of truncating on checkpoint for simple mode. I could be wrong but I thought it was a case of the truncation occuring for checkpointed transactions when the transaction log reaches a certain percentage of fullness i.e. 70%
LinkedIn Profile
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:06 AM
Points: 37,692,
Visits: 29,949
|
|
David.Poole (9/1/2011) I believe that it isn't simply a case of truncating on checkpoint for simple mode. I could be wrong but I thought it was a case of the truncation occuring for checkpointed transactions when the transaction log reaches a certain percentage of fullness i.e. 70%
Checkpoint truncates the log every time it runs. You can prove that by running various data-modification queries, running checkpoint and then checking fn_dblog (I do that any time I want to examine what an operation logs)
That 70% (iirc) is specifically for TempDB. It has some very different rules
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:06 AM
Points: 37,692,
Visits: 29,949
|
|
paul.knibbs (9/1/2011) Nice article, but it just reinforces a query I've had for a while: why does bulk-logged recovery mode even exist? It has some hefty downsides compared to full recovery, and the only advantage I can see is that your log file might not get quite so big when using it, which seems a fairly minimal sort of advantage to my mind. Does someone with more SQL experience than me (i.e. practically everybody) have an example of a situation where it's really better to use bulk-logged recovery mode?
When you want to do major data loads, you don't want the overhead of full logging (nor the log growth) but you don't want to switch to simple recovery.
Let's say someone's bulk-inserting 50GB of data (maybe a bit extreme). In full recovery, that's at least 50GB of log space used. In bulk-logged, it's a lot less.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 3:43 AM
Points: 1,257,
Visits: 4,255
|
|
| True, but since you need to switch it back to full recovery and then take a log backup--which, as the article said, will easily be the full 50Gb and change thanks to having to include all the altered pages--I'm still not sure this offers a major advantage! You're just moving the 50Gb of disk space usage from one place to another.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:06 AM
Points: 37,692,
Visits: 29,949
|
|
paul.knibbs (9/1/2011) I'm still not sure this offers a major advantage! You're just moving the 50Gb of disk space usage from one place to another.
The log backup if you'd done the load in full recovery would also be around 50GB or more (the entire used log space would get backed up).
It's also a time advantage not just a space one. Less logging = less overhead = faster load.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:22 PM
Points: 10,571,
Visits: 11,871
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 2:02 PM
Points: 143,
Visits: 998
|
|
Gail,
I always enjoy reading your posts and blogs. It is awesome that you are so willing to share your knowledge and experience.
One of the items you noted is Truncate table, for example, only logs the page de-allocations (as does drop table), but since that is enough information to fully redo the truncate table, that is classified as ‘fully logged’ Now I know that Truncate Table, like Create Table or Alter Table, are Data Definition Language (DDL) and I always thought that they were stand-alone operations and could not be redone or undone.
Now I know at the very least they are logged for "Redo" operations, but am I correct in thinking that there is still no "undo" short of completing a point-in-time recovery before the DDL operation was run?
Regards,
Irish
|
|
|
|