Several methods of SQL Server startup

Source: Internet
Author: User

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

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/7D/A8/wKioL1bs2RuBr4RbAAP7OH_zj9s202.jpg "title=" 01.jpg "alt=" Wkiol1bs2rubr4rbaap7oh_zj9s202.jpg "/>

Figure-1: booting in OS services



(2) Start in SQL Server Configuration Manager.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/7D/A8/wKioL1bs2Z6SGwXEAAId2fRnz4s127.jpg "title=" 02.jpg "alt=" Wkiol1bs2z6sgwxeaaid2frnz4s127.jpg "/>

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.

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/7D/AA/wKioL1bs9CvhqnVtAAEoBkssexE400.jpg "title=" 17.jpg "alt=" Wkiol1bs9cvhqnvtaaeobkssexe400.jpg "/>

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.

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/7D/AC/wKiom1bs4SeSj_2SAAGO0jefH1g966.jpg "title=" 03.jpg "alt=" Wkiom1bs4sesj_2saago0jefh1g966.jpg "/>

Figure-4: View service Name



650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7D/A9/wKioL1bs4pzSzS_hAAFOJEsoUkQ381.jpg "title=" 05.jpg "alt=" Wkiol1bs4pzszs_haafojesoukq381.jpg "/>

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:

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7D/AA/wKioL1bs9iSDrA7uAADPtOq3KQA058.jpg "title=" 06.jpg "alt=" Wkiol1bs9isdra7uaadptoq3kqa058.jpg "/>

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.

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7D/AE/wKiom1bs_DuDOUO_AAIe2hx1EFk693.jpg "title=" 07.jpg "alt=" Wkiom1bs_dudouo_aaie2hx1efk693.jpg "/>

Figure-7: Start/Stop SQL Server service using PowerShell



The workaround is to operate under PowerShell into CMD.

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/7D/AA/wKioL1btAAbhPhHDAAL-VjKQvlE125.jpg "title=" 08.jpg "alt=" Wkiol1btaabhphhdaal-vjkqvle125.jpg "/>

Figure-8: Operation succeeded under CMD



(5) Under CMD, run "sqlserver.exe" directly

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/7D/A9/wKioL1bs6mDigDPxAAGegjiissw298.jpg "style=" float: none; "title=" 09.jpg "alt=" Wkiol1bs6mdigdpxaagegjiissw298.jpg "/>

Figure-9: Find the path and startup parameters for Sqlserver.exe



650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/7D/A9/wKioL1bs6mCBy_b_AADY1Y-B1Tg655.jpg "style=" float: none; "title=" 10.jpg "alt=" Wkiol1bs6mcby_b_aady1y-b1tg655.jpg "/>

FIGURE-10: Executes the sqlserver.exe directly under CMD



650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7D/A9/wKioL1bs667CC_avAAM8BNdUftg164.jpg "title=" 11.jpg "alt=" Wkiol1bs667cc_avaam8bnduftg164.jpg "/>

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.

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/7D/AD/wKiom1bs7nuCuvN8AAMkyqfx86c862.jpg "title=" 12.jpg "alt=" Wkiom1bs7nucuvn8aamkyqfx86c862.jpg "/>

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.

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7D/AD/wKiom1bs7rSRaOjkAAOpoMvNMeo007.jpg "style=" float: none; "title=" 13.jpg "alt=" Wkiom1bs7rsraojkaaopomvnmeo007.jpg "/>

SQL Server does not start in Figure-13:service



650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/7D/AE/wKiom1bs_WLQq7JqAAIFcJH8v7Q732.jpg "title=" 14.jpg "alt=" Wkiom1bs_wlqq7jqaaifcjh8v7q732.jpg "/>

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:

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/7D/AD/wKiom1bs8N7AZUBJAADbF2xoMgI461.jpg "style=" float: none; "title=" 15.jpg "alt=" Wkiom1bs8n7azubjaadbf2xomgi461.jpg "/>

Figure-15: Start the Times wrong in SSMs



650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7D/AA/wKioL1bs8XDQD6alAADaAgZhIQs832.jpg "style=" float: none; "title=" 16.jpg "alt=" Wkiol1bs8xdqd6alaadaagzhiqs832.jpg "/>

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:

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7D/AE/wKiom1btCjLwptxzAAORSjIRttQ011.jpg "title=" 17.jpg "alt=" Wkiom1btcjlwptxzaaorsjirttq011.jpg "/>

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



This article is from the "fishparadise" blog, make sure to keep this source http://fishparadise.blog.51cto.com/11284420/1752880

Several methods of SQL Server startup

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.