Does SQL Server issue when we shut down windows/SQL Server ?

  • hi

    Does SQL Server issue CHECKPOINT when we shut down windows/SQL Server ?

    Thanks in advance.

  • It'll try to shut down cleanly, depends what's running/outstanding. There's only so much time allowed during a restart.

    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
  • It'll try to shut down cleanly, depends what's running/outstanding.

    Thanks Gila.

    Can you explain a bit more pls.

    When SQL will decide NOT to shut down cleanly.?

    There's only so much time allowed during a restart.

    This point too I din't get..

    Thanks again.

  • Say there's been an update running for 5 hours and someone initiates a shutdown. Since that hasn't committed, SQL would have to roll it back. A rollback typically takes longer than the original operation.

    The windows shutdown is not going to wait 5 or more hours for SQL to finish up that rollback. If the service doesn't stop by itself in the allowed time, windows kills it. In that case, SQL would not shut down cleanly (that 5 hour rollback still needs to happen) and so SQL would finish the rollback after restart.

    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
  • Note that the SQL files should still be consistent after a restart, but it might take some time for them to come online, for the reasons Gail outlined.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply