Solved

SQL Server 2008 rebuild all indexes

Posted on 2013-06-13
5
390 Views
Last Modified: 2013-06-17
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
Comment
Question by:grwallace
5 Comments
 
LVL 48

Assisted Solution

by:PortletPaul
PortletPaul earned 125 total points
ID: 39243925
rebuild all - or rebuild some based on (a level of) fragmentation?
0
 
LVL 4

Accepted Solution

by:
rlog earned 125 total points
ID: 39243952
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
 
LVL 12

Assisted Solution

by:sachitjain
sachitjain earned 125 total points
ID: 39244473
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
 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 125 total points
ID: 39245915
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
 

Author Closing Comment

by:grwallace
ID: 39252754
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

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question