Stopping a Service via commandline

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
googled, but still have a question or two...

To stop the service it says:
net stopservice
and it defines service as "Specifies the Name of the service"

so if the name of the service is: MSSQL$ACT, I simply use the following:
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
You can also use 'sc'

sc stop MSSQL$ACT

The nice thing about sc is that you can also control services on remote machines (assuming you have privileges):
sc \\computer stop MSSQL$ACT
 

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
Originally posted by: nicolas9510
yup, thats it.
course you need a space after stop :)

actually that was one of my questions as per that link it shows NO space, which I assumed was simply not right.

Cool this will help circumvent the need to upgrade backup software to something that accommodates SQL back up :)

$500 saved!
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
Originally posted by: Homerboy
Cool this will help circumvent the need to upgrade backup software to something that accommodates SQL back up :)

$500 saved!
Or you could just use OSQL to backup the database while it's live and have your backup application grab the output:
http://support.microsoft.com/kb/241397

I'm assuming MSDE, I don't like to stop SQL to back it up.