When you install Microsoft® SQL Server™, SQL Server Setup writes a set of default startup options for SQL Server in the Microsoft Windows® Registry. You can use these startup options to specify an alternate master database file, master database log file, or error log file.
Default startup options | Description |
---|---|
-dmaster_file_ path | The fully qualified path for the master database file (typically, C:\Mssql7\Data\Master.mdf). If you do not provide this option, the existing Registry parameters are used. |
-eerror_log_ path | The fully qualified path for the error log file (typically, C:\Mssql7\Log\Errorlog). If you do not provide this option, the existing Registry parameters are used. |
-lmaster_log_path | The fully qualified path for the master database log file (typically C:\Mssql7\Data\Mastlog.ldf). |
If you need to override the default startup options temporarily, you can start SQL Server using other startup options. For example, you may want to start SQL Server in single-user mode by using the -m startup option, or start SQL Server with minimal configuration by using the -f startup option.
Other startup options | Description |
---|---|
-c | Shortens startup time by starting SQL Server independently of the Microsoft Windows NT® Service Control Manager, so that SQL Server does not run as a Windows NT service. |
-f | Starts SQL Server with minimal configuration. Useful if setting of a configuration value (for example, over-committing memory) has prevented the server from starting. Enables the sp_configure allow updates option. By default, allow updates is disabled. |
-m | Starts SQL Server in single-user mode. When you start SQL Server in single-user mode, only a single user can connect, and the CHECKPOINT process is not started. CHECKPOINT guarantees that completed transactions are regularly written from the disk cache to the database device. (Typically, this option is used if you experience problems with system databases that should be repaired.) Enables the sp_configure allow updates option. By default, allow updates is disabled. |
-n | Does not use the Windows NT application log to log SQL Server events. If you start SQL Server with -n , it is advisable to use the -e startup option too; otherwise, SQL Server events are not logged. |
-pprecision_level | Specifies the maximum level of precision to be supported by decimal and numeric data types. By default, SQL Server has a maximum precision of 28. The acceptable values for precision_level are from 1 to 38; however, if no precision_level is supplied, a maximum precision of 38 is assumed. |
-sregistry_key | Starts SQL Server using an alternate set of startup parameters stored in the Registry under the key registry_key. This option, which can be run only from the command prompt, lets you select from multiple previously defined startup configurations. You could, for example, create an alternate Registry key to start SQL Server in single-user mode. (This applies only to the Server subkey.) |
/Ttrace# | Indicates that SQL Server should be started with a specified trace flag (trace#) in effect. Trace flags are used to start the server with nonstandard behavior. |
-x | Disables the keeping of CPU time and cache-hit ratio statistics. Allows maximum performance. |
Important When specifying a trace flag with the /T option, use an uppercase “T” to pass the trace flag number. A lowercase “t” is accepted by SQL Server, but this sets other internal trace flags that are required only by SQL Server support engineers. (Parameters specified in the Control Panel startup window are not read by SQL Server.)