How to start the SQL Server service of a remote server from any workstation's command prompt?

Posted on 2004-03-23
Last Modified: 2008-01-09
Searched in Google... No use...

Back to pavilion...

Does anyone know how to start the SQL Server service of a remote server from any workstation's command prompt?

Any other alternatives...

Thanks in advance...


Question by:raje10410
LVL 14

Expert Comment

ID: 10657481
Terminal service into the server and start the service.
LVL 34

Accepted Solution

arbert earned 250 total points
ID: 10658112
You can't do it directly, but if you have the rights to start services on the remote machine, you can use this command line utility to remotely start the MSSQLServer service:


Expert Comment

ID: 10658143

net start mssqlserver
net start sqlserveragent

to shut it down

net stop sqlserveragent /y
net stop mssqlserver /y

LVL 34

Expert Comment

ID: 10658451
That only works on the local machine.....

You could also build a proc using sp_OA to use the SQLDMO to autostart the remote server just like Enterprise Manger does--(or create a vbscript file like this):

Set myserver=CreateObject("SQLDMO.SQLServer")
myserver.Name = "JAS1"
myserver.Login = "sa"
myserver.LoginTimeout = 5
myserver.LoginSecure = False

If myserver.Status<>1 Then
End If
LVL 13

Expert Comment

ID: 10658806
If you are using SQL-2000 , and have W2000 installed and pre-authenticated on the network,  you could look at using the MMC Console......

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql server computed columns 11 31
What is the proper way to use for criteria in left join? 7 26
TSQL query to generate xml 4 34
Can > be used for a Text field 6 44
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question