How to create alternate sets of startup options in the Registry (Windows NT)

To create alternate sets of startup options in the Registry

  1. Start the Registry Editor (Regedt32.exe is usually found in the SYSTEM32 directory under the Microsoft® Windows NT® root directory).
  2. Locate the following registry key:

    HKEY_LOCAL_MACHINE
            \SOFTWARE
                    \Microsoft
                            \MSSQLServer
                                    \MSSQLServer
                                            \Parameters

      

  3. Create a new key called SingleUser:

    HKEY_LOCAL_MACHINE
            \SOFTWARE
                    \Microsoft
                            \MSSQLServer
                                    \MSSQLServer
                                            \Parameters
                                    \SingleUser
                                            \Parameters

      

  4. Edit the registry entry to include the -m startup option.

    The entire Parameters entry for the SingleUser key looks like this:

    HKEY_LOCAL_MACHINE

    \Software

    \Microsoft

    \MSSQLServer

    \SingleUser

    \Parameters

      

    SQLArg0 : REG_SZ : -dC:\MSSQL7\DATA\MASTER.DAT

    SQLArg1 : REG_SZ : -eC:\MSSQL7\LOG\ERRORLOG

    SQLArg2 : REG_SZ : -lC:\MSSQL7\DATA\MASTLOG.DAT

    SQLArg3 : REG_SZ : -m

      


    Note 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.


  5. For the new options to take effect, restart Microsoft SQL Server™ from the command prompt using the -s startup option, as shown:

    sqlservr -c -sSingleUser

See Also

How to copy the MSSQLServer Registry server key to a new key

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.