You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Improper use of startup options can affect server performance and can prevent [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] from starting.
36
43
>
37
-
> Start SQL Server on Linux with the "mssql" user to prevent future startup issues. Example "sudo -u mssql /opt/mssql/bin/sqlservr [STARTUP OPTIONS]"
44
+
> Start SQL Server on Linux with the "mssql" user to prevent future startup issues. Example: `sudo -u mssql /opt/mssql/bin/sqlservr [STARTUP OPTIONS]`
38
45
39
46
## About Startup Options
40
47
When you install [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], Setup writes a set of default startup options in the [!INCLUDE[msCoName](../../includes/msconame-md.md)] Windows registry. You can use these startup options to specify an alternate master database file, master database log file, or error log file. If the [!INCLUDE[ssDE](../../includes/ssde-md.md)] cannot locate the necessary files, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] will not start.
@@ -54,7 +61,7 @@ ms.workload: "On Demand"
54
61
|---------------------------|-----------------|
55
62
|**-c**|Shortens startup time when starting [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] from the command prompt. Typically, the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] starts as a service by calling the Service Control Manager. Because the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] does not start as a service when starting from the command prompt, use **-c** to skip this step.|
56
63
|**-f**|Starts an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] with minimal configuration. This is useful if the setting of a configuration value (for example, over-committing memory) has prevented the server from starting. Starting [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] in minimal configuration mode places [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] in single-user mode. For more information, see the description for **-m** that follows.|
57
-
|**-g** *memory_to_reserve*|Specifies an integer number of megabytes (MB) of memory that [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] will leave available for memory allocations within the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] process, but outside the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] memory pool. The memory outside of the memory pool is the area used by [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] for loading items, such as extended procedure .dll files, the OLE DB providers referenced by distributed queries, and automation objects referenced in [!INCLUDE[tsql](../../includes/tsql-md.md)] statements. The default is 256 MB.<br /><br /> Use of this option might help tune memory allocation, but only when physical memory exceeds the configured limit set by the operating system on virtual memory available to applications. Use of this option might be appropriate in large memory configurations in which the memory usage requirements of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] are atypical and the virtual address space of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] process is totally in use. Incorrect use of this option can lead to conditions under which an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] may not start or may encounter run-time errors.<br /><br /> Use the default for the **-g** parameter unless you see any of the following warnings in the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log:<br /> "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE \<size>"<br /> "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_COMMIT \<size>"<br /><br /> These messages might indicate that [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is trying to free parts of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] memory pool in order to find space for items, such as extended stored procedure .dll files or automation objects. In this case, consider increasing the amount of memory reserved by the **-g** switch.<br /><br /> Using a value lower than the default will increase the amount of memory available to the memory pool managed by the SQL Server Memory Manager and thread stacks; this may, in turn, provide some performance benefit to memory-intensive workloads in systems that do not use many extended stored procedures, distributed queries, or automation objects.|
64
+
|**-g** *memory_to_reserve*|Specifies an integer number of megabytes (MB) of memory that [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] will leave available for memory allocations within the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] process, but outside the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] memory pool set by [max_server_memory](../../database-engine/configure-windows/server-memory-server-configuration-options.md) server setting. The memory outside of the memory pool is the area used by [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] for loading items, such as extended procedure .dll files, the OLE DB providers referenced by distributed queries, and automation objects referenced in [!INCLUDE[tsql](../../includes/tsql-md.md)] statements. The default is 256 MB.<br /><br /> Use of this option might help tune memory allocation, but only when physical memory exceeds the configured limit set by the operating system on virtual memory available to applications. Use of this option might be appropriate in large memory configurations in which the memory usage requirements of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] are atypical and the virtual address space of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] process is totally in use. Incorrect use of this option can lead to conditions under which an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] may not start or may encounter run-time errors.<br /><br /> Use the default for the **-g** parameter unless you see any of the following warnings in the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log:<br /> "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE \<size>"<br /> "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_COMMIT \<size>"<br /><br /> These messages might indicate that [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is trying to free parts of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] memory pool in order to find space for items, such as extended stored procedure .dll files or automation objects. In this case, consider increasing the amount of memory reserved by the **-g** switch.<br /><br /> Using a value lower than the default will increase the amount of memory available to the memory pool managed by the SQL Server Memory Manager and thread stacks; this may, in turn, provide some performance benefit to memory-intensive workloads in systems that do not use many extended stored procedures, distributed queries, or automation objects.|
58
65
|**-m**|Starts an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] in single-user mode. When you start an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] 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. Starting [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] in single-user mode enables any member of the computer's local Administrators group to connect to the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] as a member of the sysadmin fixed server role. For more information, see [Connect to SQL Server When System Administrators Are Locked Out](../../database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out.md). For more information about single-user mode, see [Start SQL Server in Single-User Mode](../../database-engine/configure-windows/start-sql-server-in-single-user-mode.md).|
59
66
|**-mClient Application Name**|Limits the connections to a specified client application. For example, `-mSQLCMD` limits connections to a single connection and that connection must identify itself as the SQLCMD client program. Use this option when you are starting [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] in single-user mode and an unknown client application is taking the only available connection. Use `"Microsoft SQL Server Management Studio - Query" ` to connect with the SSMS Query Editor. The SSMS Query Editor option cannot be configured by using [!INCLUDE[ssNoVersion_md](../../includes/ssnoversion-md.md)] Configuration Manager because it includes the dash character which is rejected by the tool.<br /><br /> Client Application Name is case sensitive. Double quotes are required if the application name contains spaces or special characters.<br /><br />**Examples when starting from the command line:**<br /><br />`C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\sqlserver -s MSSQLSERVER -m"Microsoft SQL Server Management Studio - Query"` <br /><br />`C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\sqlserver -s MSSQLSERVER -mSQLCMD` <br /><br /> **Security Note:** Do not use this option as a security feature. The client application provides the client application name, and can provide a false name as part of the connection string.|
60
67
|**-n**|Does not use the Windows application log to record [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] events. If you start an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] with **-n**, we recommend that you also use the **-e** startup option. Otherwise, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] events are not logged.|
@@ -77,7 +84,8 @@ ms.workload: "On Demand"
77
84
78
85
## Related Tasks
79
86
[Configure the scan for startup procs Server Configuration Option](../../database-engine/configure-windows/configure-the-scan-for-startup-procs-server-configuration-option.md)
80
-
[Start, Stop, Pause, Resume, Restart the Database Engine, SQL Server Agent, or SQL Server Browser Service](../../database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services.md)
87
+
[Start, Stop, Pause, Resume, Restart the Database Engine, SQL Server Agent, or SQL Server Browser Service](../../database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services.md)
88
+
[Configure Server Startup Options (SQL Server Configuration Manager)](../../database-engine/configure-windows/scm-services-configure-server-startup-options.md)
0 commit comments