SQL Server 2008 rebuild all indexes

I can find several articles with scripts to rebuild all indexes, but I want to run the procedure daily at 01:30Hrs.

Any ideas how to do this?
Who is Participating?
rlogConnect With a Mentor Commented:
Hi! Check Ola Hallengren solution. He has a ready made solution (which works great) on how to rebuild or defragment indexes. Very customizable as well and easy to install.

This solution installs 2 or 3 stored procedures in master and amongst other things an sql job called Indexoptimize. Check it out.
PortletPaulConnect With a Mentor Commented:
rebuild all - or rebuild some based on (a level of) fragmentation?
sachitjainConnect With a Mentor Commented:
Create a SQL job calling this procedure and schedule it running to run 01:30 hrs

Following youtube link could help you
nemws1Connect With a Mentor Database AdministratorCommented:
Read rlog's comment and stop reading everybody else's.

Everybody in the MSSQL DBA profession that I know of (and that I also think highly of) uses Ola Hallengren's scripts for DB maintenance.
grwallaceAuthor Commented:
I have been asked to close this off without further investigation.  Key point missed out in original question was the we want the solutuion to cover "sqlserver express" editions which lack Sql Agent and the ability to create scheduled maintenance tasks.  We already used "EXPRESSMAINT" to overcome this.  But the "Ola Halengren" page looks great.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.