SQL Server shutdown sequence
SQL Server mostly does two things when it shuts down, 1 stops the corresponding (kicks off) from the terminal, and 2 executes checkpoint (writes the dirty data in memory back to disk). So the question is, does SQL Server kick off the user first or checkpoint first?
Here are the experiments I did.
The first step:
Starts the 3502 tag and writes the checkpoint related operation to errorlog.
DBCC TRACEON (3502,-1)
Step Two:
Shutting down SQL Server on the cmd command line
net stop MSSQLServer
Step Three:
To view the SQL Server error log, if the MS process is not changed in the installation of the directory, then the MS Error will be
C:\Program Files\Microsoft SQL Server\mssql11. Mssqlserver\mssql\log
View the first errorlog file.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/9E/wKioL1RBLLWwMgLSAAQZp-MdZt4940.jpg "title="}x9jz$ EQ6]KF (yz@{gfitk4.jpg "alt=" Wkiol1rbllwwmglsaaqzp-mdzt4940.jpg "/>
From the error log file can be known, MS at the time of shutdown, the first is to checkpoint each db after the stop to the response from the terminal.
Related Tracking Tag Introduction!
Http://www.cnblogs.com/CareySon/archive/2013/04/23/3039284.html
This article is from the "SQL Server MySQL" blog, so be sure to keep this source http://dwchaoyue.blog.51cto.com/2826417/1565334
SQL Server shutdown order.