May 26, 2010 at 7:33 pm
Is there any way to ignore the indexes when attempting to update the design of a VARCHAR value?
I'm attemping to increase the length of a character value located in multiple tables. Those tables have many indexes associated with them. By utilizing the below commands I'm able to ignore the constraints and triggers:
EXEC sp_msforeachtable "ALTER TABLE ... NOCHECK CONSTRAINT all"
EXEC sp_msforeachtable "ALTER TABLE ... DISABLE TRIGGER all"
Is there anything similar for indexes?
May 26, 2010 at 8:23 pm
I don't believe so. The indexes would need, potentially, to have the updated information in them. I'd hope that an increase in the varchar size, without new data, wouldn't touch data.
May 27, 2010 at 2:29 am
You can drop or disable the index. Disabling it deletes the entire index tree structure, just leaves the metadata behind. You'll have to rebuild the index to re-enable it.
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 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply