0% found this document useful (0 votes)
6 views2 pages

SQL Server Starting Sequence

The SQL Server service start-up process involves reading configuration values from the master database, initializing SQL Server Operating System (SQLOS), and starting various background threads. It includes recovering in-doubt transactions, opening and recovering the master and user databases, and preparing for user connections. Finally, it announces the server's readiness for client connections and launches any startup stored procedures.

Uploaded by

Kaushik Majumder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

SQL Server Starting Sequence

The SQL Server service start-up process involves reading configuration values from the master database, initializing SQL Server Operating System (SQLOS), and starting various background threads. It includes recovering in-doubt transactions, opening and recovering the master and user databases, and preparing for user connections. Finally, it announces the server's readiness for client connections and launches any startup stored procedures.

Uploaded by

Kaushik Majumder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

SQL Server Service Start-Up tasks sequence

 Read configuration values from [Link] [Link]

 Stores the configured values in memory


Memory
 Write to ErrorLog

Intiate SQLOS
 Schedulers and multiple threads created
 Enables DAC
 Initial memory allocation based on
o Configuration values
o –g startup parameter
o Platform
o Physical Memory
 No entry in ErrorLog (unless lightweight
pooling / Fibre Mode enabled)

Error Log
B DTC Transaction Initiation
 Attempt to recover any In-doubt
transaction
 Write to ErrorLog

 SNI (SQL Network Interface) initiated


 No entry in ErrorLog

Main Background Threads are started


o Lazywriter
o Log Writer
o Checkpoint
o Database Mirroring
Error log written for
Database Mirroring if it
is enabled

A
.
A

Main Thread Thread 1


Processing & Farming all Opens, Recovers & Starts
running tasks Master database
Thread 2
B Opens, Recovers & Starts
Main Thread waits till it
Starts up default trace and
Resource Database
N Model database
is notified about Tempdb
recovery
Main Thread is notified Opens, Recovers & Starts
about tempdb creation Tempdb database

Now ready for user Reads master database,


connection runs recovery of one user
database at a time
Allowing connections into server
Thread 2 ends
before this could have prevented This step is skipped if trace flag 3607
tempdb from recovered as all the or 3608 are enabled or –f is specified
worker threads would have been as startup parameter
consumed by user connections

 Starts Protocols for


o Service Broker
o Database B
Mirroring N
 Starts Service Broker
Manager

Announces Server is Launches any startup


ready for client Stored Prcedures
connection

Continues as Signal
Handler

This checks if the engine has been


notified to shut down by SCM

You might also like