Solved

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

Posted on 2004-03-23
5
315 Views
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...

Cheers,

Rajesh
0
Comment
Question by:raje10410
5 Comments
 
LVL 14

Expert Comment

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

Accepted Solution

by:
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:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=rsabgv4tga341pq9a4m8d63p743niobn5v%404ax.com&rnum=4&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3D%2522net%2Bstart%2522%2Bremote%2Bservices%26sa%3DN%26tab%3Dwg


Brett
0
 
LVL 4

Expert Comment

by:squatex
ID: 10658143


net start mssqlserver
net start sqlserveragent

to shut it down

net stop sqlserveragent /y
net stop mssqlserver /y

0
 
LVL 34

Expert Comment

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

If myserver.Status<>1 Then
    myserver.Start(True)
End If
0
 
LVL 13

Expert Comment

by:danblake
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......
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now