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


Need Minimally Logged Operation to Cause Checkpoint!


Need Minimally Logged Operation to Cause Checkpoint!

Author
Message
dkschill
dkschill
Mr or Mrs. 500
Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)

Group: General Forum Members
Points: 587 Visits: 430
I am preparing for a presentation next week and am digging for an example....

I need a minimally logged operation that will show the behavior that a checkpoint is ran when a minimally logged operation occurs while in SIMPLE or BULK_LOGGED recovery model.

I have tried rebuilding, creating and dropping indexes...I have created heaps using SELECT..INTO, but nothing seems to consistently generate a CHECKPOINT.

What am I doing wrong?

Here is where I read that they should cause checkpoints:
us/library/ms189573(v=sql.105).aspx

Here is the list I am using for minimally logged operations:
http://msdn.microsoft.com/en-us/library/ms191244(v=sql.105).aspx

I am using the following to look for checkpoints:
select * from fn_dblog(null,null) WHERE Operation IN ('LOP_BEGIN_CKPT','LOP_END_CKPT')



Any help would be greatly appreciated!
Lowell
Lowell
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27980 Visits: 39922
you can explicitly call CHECKPOINT yourself, would that help?


--UPDATE MyTABLE ....
--INSERT INTO SomeTable
CHECKPOINT
--UPDATE MyTABLE2 ....
--INSERT INTO SomeTable2
CHECKPOINT



Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86420 Visits: 45233
I would have some doubts about that BoL page, never seen a minimally logged operation trigger a checkpoint before and besides, it doesn't need to trigger a checkpoint. Any data modification that is minimally logged has to be written to the data file before the transaction completes, that's done by the thread that executes the minimally logged operation (called an eager write), so there would be no reason for a checkpoint afterwards.

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


dkschill
dkschill
Mr or Mrs. 500
Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)

Group: General Forum Members
Points: 587 Visits: 430
Just got back from a little walk and that is what I was thinking Gail (not the smart stuff, but that BoL is probably under stating the conditions)...

Oh well...

I will remove it from my presentation Smile

Thanks for all the help!
-Dane
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86420 Visits: 45233
If you're doing a presentation on bulk-logged, maybe there's something in here for you?
http://www.sqlservercentral.com/articles/Recovery+Model/89664/

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


dkschill
dkschill
Mr or Mrs. 500
Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)

Group: General Forum Members
Points: 587 Visits: 430
Thanks Gail Smile

I had found that on my hunt for more information...I am actually doing a presentation on the T-LOG...

Per Sean McCown, I purposefully selected a rough topic that would require a ton of research...typically when I present I would always pick something that I could naturally talk about for hours.

I am trying to learn enough so that I can pass the cert tests (w/o boot camps).

Thanks again!
-Dane
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86420 Visits: 45233
dkschill (4/5/2013)
Thanks Gail Smile

I had found that on my hunt for more information...I am actually doing a presentation on the T-LOG...


You've seen the stairway article series on that topic?

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


dkschill
dkschill
Mr or Mrs. 500
Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)

Group: General Forum Members
Points: 587 Visits: 430
Found those as well Smile

Using those to validate and flush out my points.

This presentation is going to be brutal for the listeners if I don't clean it up some this weekend...lots of content...

Any other references you could throw out would be much appreciated!

Thanks again for the help!
-Dane
ScottPletcher
ScottPletcher
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7782 Visits: 7140
GilaMonster (4/5/2013)
Any data modification that is minimally logged has to be written to the data file before the transaction completes



I don't think that's true. If it is, it violates the write-ahead-logging model, which SQL Server uses; only log records should have to be hardened for a transaction to complete, not data blocks.

SQL DBA,SQL Server MVP(07, 08, 09)[size=2]Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them.[/size]
Lynn Pettis
Lynn Pettis
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38987 Visits: 38508
ScottPletcher (4/5/2013)
GilaMonster (4/5/2013)
Any data modification that is minimally logged has to be written to the data file before the transaction completes



I don't think that's true. If it is, it violates the write-ahead-logging model, which SQL Server uses; only log records should have to be hardened for a transaction to complete, not data blocks.


I'll go with Gail on this one having reread this article: http://www.sqlservercentral.com/articles/Recovery+Model/89664/.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
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