Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 commit Vs checkpoint

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2009-06-17 : 14:08:44
hi
what is the difference between commit and checkpoint?

if commit is for saving the transaction and sending it to the datafile then what about the ccheckpoint?

can you please explain me the difference? this is an interview question today

Arnav
Even you learn 1%, Learn it with 100% confidence.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-17 : 14:20:54
http://msdn.microsoft.com/en-us/library/ms188748.aspx
http://doc.ddart.net/mssql/sql70/ca-co_12.htm
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-06-17 : 18:34:08
Why don't use use BOL for questions like these? Why spend the time writing a thread here when it's faster to just look it up?

And if this is for an interview, then it doesn't sound like you are qualified for that job. This is not at all an advanced topic.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2009-06-18 : 10:56:00
Hi Tara,
i've qualified for the job, (already i'm in secured position) for knowledge purpose only I used to attend the interviews.

i've answered like this.
Checkpoint will write all the dirty pages which are there in buffer cache to datafile when ever it occurs. check piont will occur in these cases. (1)when the log file is 70% full (2)whe we are taking a backup (3) when we are altering the database.
Commit is a statement whenever we are completing a transaction, if we know that everything is correct, then we ca issue commit, so that all the committed transactions will be moved to datafile.

then i got the question ....
sql server is autocommit. then what is the need to give commit statement. (i've a blank face now)
then i had the question that what is the difference between commit and checkpoint...

can you please answer me tara



Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-06-18 : 11:59:34
Commit does not write changes to the data files.
Checkpoint does not always run when the log is 70% full. That's under a specific condition. It runs other times too.

As for commit and auto commit, may I suggest a google search for transaction handling in SQL. As Tara says, this is not an advanced topic, fa

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2009-06-18 : 12:10:14
THank you Master

Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2009-06-18 : 12:12:12
can some one point me to agood document or article for this.....

Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-06-18 : 12:40:09
Maybe start with the two that visakh16 posted?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2009-06-19 : 10:58:14
yes...
those are very helpful
thanks visakh

Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page
   

- Advertisement -