Friday, March 30, 2012

How to auto start mssql service in command line?

Hi,
Could anyone tell, the way to automatically startup SQL
Server service and SQL Agent at mid-night in command line
in SQL Server 2000?
I tried to startup with command servr.exe in Binn
directory and seems like it stop the Launched startup
procedure 'sp_MScleanupmergepublisher'. How can I startup
SQL Server service without single user mode?
Thanks a lot.
-JennyMaybe:
net start mssqlserver
net start sqlserveragent
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Jenny" <jyu@.iseoptions.com> wrote in message
news:428001c47325$f6b44510$a601280a@.phx.gbl...
> Hi,
> Could anyone tell, the way to automatically startup SQL
> Server service and SQL Agent at mid-night in command line
> in SQL Server 2000?
> I tried to startup with command servr.exe in Binn
> directory and seems like it stop the Launched startup
> procedure 'sp_MScleanupmergepublisher'. How can I startup
> SQL Server service without single user mode?
> Thanks a lot.
> -Jenny
>|||Hi,
NET START MSSQLSERVER
NETSTART SQLSERVERAGENT
Put the above commands inside a batch file and schedule to fire at midnight
using OS scheduler. If the service is already running then it will
give an error and exits.
Thanks
Hari
MCDBA
"Jenny" <jyu@.iseoptions.com> wrote in message
news:428001c47325$f6b44510$a601280a@.phx.gbl...
> Hi,
> Could anyone tell, the way to automatically startup SQL
> Server service and SQL Agent at mid-night in command line
> in SQL Server 2000?
> I tried to startup with command servr.exe in Binn
> directory and seems like it stop the Launched startup
> procedure 'sp_MScleanupmergepublisher'. How can I startup
> SQL Server service without single user mode?
> Thanks a lot.
> -Jenny
>|||"Jenny" <jyu@.iseoptions.com> wrote in message
news:428001c47325$f6b44510$a601280a@.phx.gbl...
> Hi,
> Could anyone tell, the way to automatically startup SQL
> Server service and SQL Agent at mid-night in command line
> in SQL Server 2000?
> I tried to startup with command servr.exe in Binn
> directory and seems like it stop the Launched startup
> procedure 'sp_MScleanupmergepublisher'. How can I startup
> SQL Server service without single user mode?
> Thanks a lot.
> -Jenny
>
In SQL 7.0 it was: net stop mssqlserver and net stop mssqlagent
I'll assume it's the same in SQL 2000, and it should be in Books On Line.
hth.
steve.sql

No comments:

Post a Comment