Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DBCC REINDEX - Offline?


DBCC REINDEX - Offline?

Author
Message
Matt-566349
Matt-566349
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 186
I've read that DBCC REINDEX is an offline operation, because while the REINDEX is in progress, the underlying table is locked.

I would like to set up a DBCC REINDEX script to run at off-peak times. I would like to have the application still available to users while this is running. (I know that performance will be hampered, but that's acceptable as a very small number of users (if any) will be using the system during this period). I would like to make this an automated job, and don't want to have to log in to manually kill the application services before running the script.

Do I risk corrupting the database if I run this while the database is online? Or is it just recommended to be run offline because the table of the index being updated is locked?
matt stockham
matt stockham
Right there with Babe
Right there with Babe (766 reputation)Right there with Babe (766 reputation)Right there with Babe (766 reputation)Right there with Babe (766 reputation)Right there with Babe (766 reputation)Right there with Babe (766 reputation)Right there with Babe (766 reputation)Right there with Babe (766 reputation)

Group: General Forum Members
Points: 766 Visits: 3178
If you are using the Enterprise edition of SQL2005, you can do online rebuilds with

ALTER INDEX [index] ON [table] REBUILD WITH (ONLINE = ON)



There is no danger of corruption using this process.
Ola Hallengren
Ola Hallengren
SSC-Enthusiastic
SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)

Group: General Forum Members
Points: 172 Visits: 1938
Not all indexes can be rebuilt online. Clustered indexes on tables with LOB columns cannot be rebuilt online. Non clustered indexes with LOB columns in the index definition cannot be rebuilt online either.
http://msdn.microsoft.com/en-us/library/ms188388.aspx

Ola Hallengren
http://ola.hallengren.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search