Solved

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

Posted on 2004-03-23
5
314 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

707 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

17 Experts available now in Live!

Get 1:1 Help Now