Link to home
Start Free TrialLog in
Avatar of raje10410
raje10410

asked on

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

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

Cheers,

Rajesh
Avatar of adwiseman
adwiseman

Terminal service into the server and start the service.
ASKER CERTIFIED SOLUTION
Avatar of arbert
arbert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial


net start mssqlserver
net start sqlserveragent

to shut it down

net stop sqlserveragent /y
net stop mssqlserver /y

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.Password="sa"
myserver.LoginTimeout = 5
myserver.LoginSecure = False

If myserver.Status<>1 Then
    myserver.Start(True)
End If
If you are using SQL-2000 , and have W2000 installed and pre-authenticated on the network,  you could look at using the MMC Console......