Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-03-23
5
Medium Priority
?
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 750 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

618 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