November 22, 2013 at 9:44 am
Is there a way to script out the ONLINE option for an index? I want to list out the indexes and whether they were created with ON or OFF.
I can find pretty much everything else about the index except that.
Thank you,
Josh
November 22, 2013 at 10:12 am
whether the command was run with ONLINE or not is not saved anywhere, I'm pretty sure.
peek at this scripting example, it essentially the same way i do it:
http://www.sqlservercentral.com/scripts/Indexing/63620/
generate the script with ONLINE if the server version is Enterprise or Developer, and the table does not contain any columns of datetype ('image','text','ntext','xml')
Lowell
November 22, 2013 at 10:50 am
Thanks Lowell!
November 22, 2013 at 1:06 pm
You have an option "Keep index online while reindexing" in the Rebuild Index Task element in SSIS. Pressing button "View T-SQL" will script the indexes with the ONLINE=ON.
You can also play with the FillFactor and Sort in Tempdb settings.
Regards,
IgorMi
Igor Micev,My blog: www.igormicev.com
November 23, 2013 at 2:22 am
Lowell (11/22/2013)
whether the command was run with ONLINE or not is not saved anywhere, I'm pretty sure.
It's not, because the option only affects the process of rebuilding and has no effect whatsoever on the index once created/rebuilt.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply