November 12, 2002 at 12:06 pm
I am going to run a scheduled task job to stop and start the MSSQLServer weekly. I can run the job manually at the server console, but it does not run as a scheduled job? Here is the batch file:
C:
cd
Net Stop MSSQLSERVER
Net Start MSSQLSERVER
exit
November 12, 2002 at 12:18 pm
You can try using xp_cmdshell.
November 12, 2002 at 12:29 pm
Sorry,Ignore my posting,You can stop the services but cannot start using xp_cmdshell
November 12, 2002 at 12:32 pm
I am sorry i did answer to a wrong query.
What kind of Problem are you getting when you schedule it as a job??
just try this
Net stop mssqlserver /y
In you batch file
and then
net start mssqlserver as another batch file and schedule them using NT scheduler.
Hope this helps
November 12, 2002 at 3:03 pm
Or if you use the 'at' cmd line scheduler. If you do not have the Task Scheduler in yuor version of NT/2000/XP (NT 4 was the only one lacking from what I remember and was added via IE update later).
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply