When you install SQL Server, the setup program writes a set of default startup options in the Windows NT Registry under the key:
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\MSSQLServer
\MSSQLServer
If you want to create and store alternate sets of startup options in the Registry ¾ for example, to start SQL Server in single-user mode ¾ copy the MSSQLServer key (under MSSQLServer) to a new key, and then edit the options in the new key to suit your needs. Each startup option is stored as a separate parameter in the Parameters entry of the MSSQLServer key, starting with SQLArg0, then SQLArg1, and so on. The order of the parameters is not important.
Only experienced users should use REGEDT32 to edit the Windows NT registry. Editing of the Registry is not generally recommended, and inappropriate or incorrect changes can cause serious configuration problems for your system.
For example, you could create a new key called SingleUser and then edit this Registry entry to include the additional -m startup option.
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\MSSQLServer
\SingleUser
\Parameters
Using this procedure, you could create a new key called SingleUser, and then edit this entry
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\MSSQLServer
\SingleUser
\Parameters
to include the additional -m startup option.
The entire Parameters entry for the SingleUser key would look like this:
HKEY_LOCAL_MACHINE \Software \Microsoft \MSSQLServer \SingleUser \Parameters SQLArg0 : REG_SZ : -dC:\SQL\DAT\MASTER.DAT SQLArg1 : REG_SZ : -eC:\SQL\LOG\ERRORLOG SQLArg2 : REG_SZ : -m
To start SQL Server using this alternate key, you would start SQL Server from the command line using the -s startup option, as shown in the following example:
sqlservr -c -sSingleUser