Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6227643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:15:32+00:00 2026-05-24T09:15:32+00:00

I read the following statement: SQL Server doesn’t write data immediately to disk. It

  • 0

I read the following statement:

SQL Server doesn’t write data immediately to disk. It is kept in a
buffer cache until this cache is full or until SQL Server issues a
checkpoint, and then the data is written out. If a power failure
occurs while the cache is still filling up, then that data is lost.
Once the power comes back, though, SQL Server would start from its
last checkpoint state, and any updates after the last checkpoint that
were logged as successful transactions will be performed from the
transaction log.

And a couple of questions arise:

  1. What if the power failure happens after SQL Server issues a
    checkpoint and before the buffer cache is actuall written to
    disk? Isn’t the content in buffer cache permanently missing?

  2. The transaction log is also stored as disk file, which is no
    different from the actual database file. So how could we guarantee
    the integrity of log file?

So, is it true that no real transaction ever exists? It’s only a matter of probability.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:15:33+00:00Added an answer on May 24, 2026 at 9:15 am

    The statement is correct in that data can be written to cache, but misses the vital point that SQL Server uses a technique called Write Ahead Logging (WAL). The writes to the log are not cached, and a transaction is only considered complete once the transaction records have been written to the log.

    http://msdn.microsoft.com/en-us/library/ms186259.aspx

    In the event of a failure, the log is replayed as you mention, but the situation regarding the data pages still being in memory and not written to disk does not matter, since the log of their modification is stored and can be retrieved.

    It is not true that there is no real transaction, but if you are operating in simple logging mode then the ability to replay is not there.

    For the integrity of the log file / same as the data file – a proper backup schedule and a proper restore testing schedule – do not just backup data / logs and assume they work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assuming a Read Committed Snapshot transaction isolation setting, is the following statement atomic in
Looking for C# class which wraps calls to do the following: read and write
In emacs, I've read the following code snippet in simple.el : (frame-parameter frame 'buried-buffer-list)
OLEDB can be used to read and write Excel sheets. Consider the following code
I'm trying to save in SQL Server DB a file. (It doesn't mutter which
How do I convert the following SQL statement into Lambda Expression or Linq Query?
Following on from a previous question about sub-selects, I have an SQL statement with
Is there a valid way in SQL Server 2005 to read a row of
Hello I have read following php statement from a blog but I am unable
Given following Ruby statements: (Read input and store each word in array removing spaces

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.