• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 414
  • Last Modified:

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?
0
grwallace
Asked:
grwallace
4 Solutions
 
PortletPaulfreelancerCommented:
rebuild all - or rebuild some based on (a level of) fragmentation?
0
 
rlogCommented:
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.
0
 
sachitjainCommented:
Create a SQL job calling this procedure and schedule it running to run 01:30 hrs

Following youtube link could help you
http://www.youtube.com/watch?v=De_GOwnTDjo
0
 
nemws1Database 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.
0
 
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.
0
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now