There are several ways to start SQL Server:
(1) In control panel--administrative tools--services, locate SQL Server (XXX) to start.
where xxx is the instance name and the default instance name is "MSSQLSERVER".
Figure-1: booting in OS services
(2) Start in SQL Server Configuration Manager.
FIGURE-2: Starting in SQL Server Configuration Manager
(3) started in the Object Explorer in SSMs.
However, this method is used only if the Object Explorer has been opened and is not disconnected from database engine. A quick way to restart an instance of SQL Server for use with SSMs.
Figure-3: Stop instance service in SSMs
(4) Start under CMD.
The syntax is: NET START "service name", and the corresponding stop services are: net stop, "service name". Where service name is in control panel--administrative tools--services, right-click to select the appropriate service--properties view.
Figure-4: View service Name
Figure-5: cmd starts and stops the default instance of SQL Server
Note that you need to use sufficient permissions to start/Stop the service, or the following error will be reported:
Figure-6: Insufficient permissions to cause the operation to fail
With PowerShell, the default instance can be started/stopped successfully at the prompt at the beginning of the default PS. However, if you manipulate a named instance, you will be prompted to "invalid service name", even if the operation user has sufficient permissions.
Figure-7: Start/Stop SQL Server service using PowerShell
The workaround is to operate under PowerShell into CMD.
Figure-8: Operation succeeded under CMD
(5) Under CMD, run "sqlserver.exe" directly
Figure-9: Find the path and startup parameters for Sqlserver.exe
FIGURE-10: Executes the sqlserver.exe directly under CMD
FIGURE-11: The information displayed after executing the sqlserver.exe directly under CMD
As described in the previous 4 methods, SQL Server is started as a background service, and SQL Server log information is recorded in the log file. The 5th approach is to run as a generic application, where the log information for SQL Server appears directly in the current CMD window. If you press CTRL + C and end with Y, or close the cmd window, the SQL Server process is closed.
Figure-12:ctrl + C and end sqlserver.exe process with Y
After this startup of SQL Server, the startup is not seen in the services and is also shown as not started in SSMs. However, SQL Server can be used normally.
SQL Server does not start in Figure-13:service
Database engine in figure-14:ssms shows a stop state, but can execute SQL query
If you start SQL Server as a service in SSMS or in services at this time, the following error is reported:
Figure-15: Start the Times wrong in SSMs
FIGURE-16: Start the Times wrong in the service
Similarly, if SQL Server has been started as a service and then started in the 5th way, the following error is reported:
FIGURE-17: Once again directly executed sqlserver.exe times wrong
Here are a few methods of SQL Server. In fact, the main use of the previous two methods can be, recommend the 2nd method. Why is it? You will then be given the opportunity to introduce the SQL Server startup process and explain it later.
NET Start command, refer to the following documentation:
Https://technet.microsoft.com/en-us/library/bb490713.aspx
Several methods of SQL Server startup