Thursday, June 23, 2016

Disable Column Store Indexes for One Database

Disabling column store indexes needs to be done time to time. Following query will generate the script. 

SELECT 'ALTER INDEX [' + Name + +'] ON ' + OBJECT_NAME(object_id) + ' DISABLE'
FROM sys.indexes WHERE TYPE_DESC
LIKE '%COLUMNSTORE%'

Output of the query is shown below.

ALTER INDEX [IndFactResellerSalesXL_CCI] ON FactResellerSalesXL_CCI DISABLE
ALTER INDEX [NonClusteredColumnStoreIndex-20160622-204327] ON DimEmployee DISABLE
ALTER INDEX [NonClusteredColumnStoreIndex-20160622-210321] ON FactInternetSales DISABLE

1 comment:

  1. this is really a very great blog. the information present in this blog will be very useful for us. thank you for sharing with us.
    SEO Company In Chennai

    ReplyDelete