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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to schedule SQL service agent to stop and start? 1

Status
Not open for further replies.
Joined
Sep 21, 2004
Messages
108
Location
US
My database is fragmented badly so I decide to defrage it daily. However, as long as the sql server is running, disk defrag will not defrag the portion of disk that used by SQL database.
Is there a way that I can schedule to stop and start the sql service?
Thanks for the help.
 
You can use the task scheduler to run a net stop then a net start to stop then restart the SQL Server.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (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