|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 9:32 AM
Points: 3,046,
Visits: 1,306
|
|
Koen Verbeeck (3/9/2011)
Duncan Pryde (3/9/2011)
Thanks for the feedback. You read the question as I meant it to be read, so I hope you got it right!
I did 
Good for you!
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:12 AM
Points: 557,
Visits: 1,356
|
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 9:32 AM
Points: 3,046,
Visits: 1,306
|
|
mohammed moinudheen (3/9/2011) Thanks for the question Duncan. I had a feeling that this question was more at testing our understanding of the truncate statement than the recovery models.
It was sort of a bit of both. A misconception appears to be that TRUNCATE TABLE is non-logged or minimally logged. Minimally logged operations occur in BULK_LOGGED (and SIMPLE) recovery and prevent point-in-time restores for affected log backups. TRUNCATE TABLE, even though it behaves similarly to minimally logged operations, is not one and doesn't prevent point-in-time restore - even in BULK_LOGGED recovery.
A good article by Kalen Delaney that explains the difference is here
Duncan
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 9:30 AM
Points: 1,257,
Visits: 4,257
|
|
| This is odd. I'm sure I've read stuff that implies TRUNCATE TABLE *does* invalidate log backups until the next full backup is run, which means none of the suggested answers was right--yet everyone is saying this is incorrect and that point-in-time restore is still perfectly possible after doing one of these. I'm confused!
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:34 PM
Points: 2,170,
Visits: 3,582
|
|
Duncan Pryde (3/9/2011)
mohammed moinudheen (3/9/2011) Thanks for the question Duncan. I had a feeling that this question was more at testing our understanding of the truncate statement than the recovery models.It was sort of a bit of both. A misconception appears to be that TRUNCATE TABLE is non-logged or minimally logged. Minimally logged operations occur in BULK_LOGGED (and SIMPLE) recovery and prevent point-in-time restores for affected log backups. TRUNCATE TABLE, even though it behaves similarly to minimally logged operations, is not one and doesn't prevent point-in-time restore - even in BULK_LOGGED recovery. A good article by Kalen Delaney that explains the difference is hereDuncan
Thanks Duncan for sharing the link.
Mohammed Moinudheen
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:34 PM
Points: 2,170,
Visits: 3,582
|
|
paul.knibbs (3/9/2011) This is odd. I'm sure I've read stuff that implies TRUNCATE TABLE *does* invalidate log backups until the next full backup is run, which means none of the suggested answers was right--yet everyone is saying this is incorrect and that point-in-time restore is still perfectly possible after doing one of these. I'm confused!
Were you referring to this statement 'backup log with truncate_only'. Running this would invalidate the log backups and we would need to take a full backup again to overcome this. As per my knowledge, a truncate statement wouldn't invalidate log backups.
Mohammed Moinudheen
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 9:32 AM
Points: 3,046,
Visits: 1,306
|
|
mohammed moinudheen (3/9/2011)
paul.knibbs (3/9/2011) This is odd. I'm sure I've read stuff that implies TRUNCATE TABLE *does* invalidate log backups until the next full backup is run, which means none of the suggested answers was right--yet everyone is saying this is incorrect and that point-in-time restore is still perfectly possible after doing one of these. I'm confused!Were you referring to this statement 'backup log with truncate_only'. Running this would invalidate the log backups and we would need to take a full backup again to overcome this. As per my knowledge, a truncate statement wouldn't invalidate log backups.
Apparently there did use to be non-logged operations in SQL Server 7, but TRUNCATE TABLE wasn't one of them. These days there are no non-logged operations as far as I'm aware.
Link: http://support.microsoft.com/kb/272093
Also, see Steve's editorial from yesterday: http://www.sqlservercentral.com/articles/Editorial/72676/
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, April 01, 2013 12:08 PM
Points: 109,
Visits: 67
|
|
| Well, I got this wrong but I think I would have worded it differently. If you don't take a tail of the log backup after the TRUNCATE TABLE (or wait for the next log backup at 9:30), then you really can only restore up to 9:15. I think with just a little more description the question could have been more clear.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, November 20, 2012 6:00 AM
Points: 100,
Visits: 176
|
|
| Trick Question and answer
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 12:10 AM
Points: 1,197,
Visits: 3,226
|
|
Good question i would like to ask, we can restore at 9:15 right? But not after that?
Regards, Sushant
|
|
|
|