Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule one restart of sql service

Status
Not open for further replies.

mebenz

IS-IT--Management
Jun 7, 2007
88
CA
Due to a major flaw in Microsoft's Dynamics 9.0 installation, if Project accounting is enabled, it totally bogs down all the server's resources when creating companies (I'm talking 1 hour vs 5 minutes without project accounting). I need to install another company, but the only way to fix the mess that project did, I need to restart sql service (this fixed it in the past).

Can I schedule the restart of just sql server service? We are running sql 2000 enterprise cluster on windows 2003.
 
Yes, you can use the task scheduler on one of the nodes to stop and restart the services using the sc command.
Code:
sc \\VirtualSQLServer stop SQLServerAgent
sc \\VirtualSQLServer stop MSSQLSERVER
sc \\VirtualSQLServer start MSSQLServer
sc \\VirtualSQLServer start SQLServerAgent

Yes I know that the NET STOP command can to used to do this, but that requires knowing which host the service is on. This way it doesn't matter and the script can be reused later.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top