This article is half-done without your Comment! *** Please share your thoughts via Comment ***
If you are preparing for SQL Server DBA interview, you should also read this article.
In this interview question, I am sharing different options to manage SQL Server services or instances using Command Prompt or Command line.
NET Commands:
- NET START MSSQLSERVER: Starts SQL Server
- NET STOP MSSQLSERVER: Stops SQL Server
- NET PAUSE MSSQLSERVER: Pauses SQL Server
- NET CONTINUE MSSQLSERVER: Resumes SQL Server
- NET START MSSQL$instancename: Starts SQL Server as a service with specific instancename
- NET STOP MSSQL$instancename: Stops SQL Server as a service with specific instancename
- NET PAUSE MSSQL$instancename: Pauses SQL Server as a service with specific instancename
- NET CONTINUE MSSQL$instancename: Resumes SQL Server as a service with specific instancename
To start the default instance of SQL Server from a command prompt:
1 |
sqlservr.exe |
To start a named instance of SQL Server from a command prompt:
1 |
sqlservr.exe -s |
To start the default instance of SQL Server in single-user mode from a command prompt:
1 |
sqlservr.exe -m |
To start a named instance of SQL Server in single-user mode from a command prompt:
1 |
sqlservr.exe -m -s |
To start the default instance of SQL Server with minimal configuration:
1 |
sqlservr.exe -f |
To start a named instance of SQL Server with minimal configuration:
1 |
sqlservr.exe -f -s |
These are the list of important commands that you can prepare, but I would suggest preparing two main options for these kind questions like “how to start SQL Server in single user mode”, “how to start SQL Server with minimal configuration.”
Leave a Reply