July 28, 2016 at 2:14 pm
I have to run the below command in production environment.
Alter table table_name Rebuild
but my applications are continuously hitting that table so will my table is accessible for applications if i run above command
July 29, 2016 at 7:15 am
dastagiri16 (7/28/2016)
I have to run the below command in production environment.Alter table table_name Rebuild
but my applications are continuously hitting that table so will my table is accessible for applications if i run above command
During the rename it will take out a schema lock so the table will be inaccessible.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 29, 2016 at 7:43 am
Sean, I think dastagiri is asking about rebuilding indexes.
Unless you give online option, the table will be locked until the clustered index is rebuilt.
With online option there will locks towards the end of the operation.
July 29, 2016 at 9:02 am
joeroshan (7/29/2016)
Sean, I think dastagiri is asking about rebuilding indexes.Unless you give online option, the table will be locked until the clustered index is rebuilt.
With online option there will locks towards the end of the operation.
Doh. Right you are!!! I saw "rebuild" and read "rename". LOL. That's what I get for posting before I finished my first cup of coffee. 😛
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 29, 2016 at 9:19 am
Its a rebuild table
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply