Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

From this article, I know to that slash (/) is used instead of a hyphen (-) when a net start is used with startup option,

net start mssqlserver /m

But if I want to have to use with startup option limit to an application, for example sqlcmd (-m"SQLCMD"), how do I do that with NET START?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

For the article you linked it references the specific start up options used by the Database Engine ("sqlservr.exe"). So the "-" dash is used as stated in the article. This article points to the method used in a DOS prompt to start SQL Server in single user mode. I believe using /m"SQLCMD" would work the same way, but I normally use the commands noted below.

So from a DOS prompt, the command to start SQL Server default instance in single user mode and only allow SQLCMD to connect would be:
sqlservr.exe -m"SQLCMD"

If you have a named instance it would be:
sqlservr.exe -m"SQLCMD" -s MyServer\MyInstance

share|improve this answer
    
The article I linked actually shows how to use net start with start option using (/). I must have used backslash (it was late night) and didn't work. /m"SQLCMD" works fine. Thanks for the article, learn something new. –  Travis Gan Oct 19 '13 at 16:48
    
I don't see that in the link from your question, unless I am reading over it. May need to double check what article you are referencing, just for those that find this question. –  Shawn Melton Oct 19 '13 at 19:42
    
At 'Using Startup Options for Troubleshooting' toward the bottom of the page. –  Travis Gan Oct 19 '13 at 22:06
add comment

NET START will start a service. You can't limit the connection to SQLCMD. What you can do is limit connection using another way. You can use the SQL Server Configuration Manager to block all network connections by disabling TCP-IP and Named-Pipes protocol. This way only someone connected to the local machine (Shared Memory) would be able to connect.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.