I am running a DTS to preform tasks in my database, in which at first I need to disable all indexes in the database and re-enable them when the DTS finish his work.
Is there a way that I can disable all the indexes in the whole database and afterwards to re-enable them all?
I know how to disable/enable one by one, can someone help me with the way to disable/enable all at once as a step in the DTS.
To enable a disabled indexClick the plus sign to expand the Indexes folder. Right-click the index you want to enable and select Rebuild. In the Rebuild Indexes dialog box, verify that the correct index is in the Indexes to rebuild grid and click OK.
Which of the following query is used to enable a disabled index using CREATE INDEX? Explanation: Enabling a disabled index can be done using SSMS.
We can use below scrip to disable indexes
ALTER INDEX ALL ON [TableName] DISABLE;
Do your bulk insert to table and than run below script.
ALTER INDEX ALL ON [TableName] REBUILD;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With