Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server 2008 rebuild all indexes

Posted on 2013-06-13
5
Medium Priority
?
408 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 49

Assisted Solution

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

Accepted Solution

by:
rlog earned 375 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 375 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 375 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

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 …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview

886 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