Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Start and stop SQL Server + agent programatically?

Author  Topic 

peet1909
Starting Member

2 Posts

Posted - 2008-10-22 : 06:59:14
I need to start and stop SQL server and the SQL Server Agent programatically.

Currently I am using this command line:
 net stop SQLAgent$PEET-B62D776BDB\EMC 

This works, but I dont want the message to appear.

I've also tried the SQLDMO control but I cant get it to stop the SQL Server Agent.

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-10-22 : 10:28:46
net stop SQLAgent$PEET-B62D776BDB\EMC > nul

to send both stdout and stderr to eternity:

net stop SQLAgent$PEET-B62D776BDB\EMC > nul 2>&1


elsasoft.org
Go to Top of Page
   

- Advertisement -