Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JananiK
Starting Member
2 Posts |
Posted - 2008-05-01 : 08:08:28
|
| I would like to know if there is a way to drop/ disenable all the indexes in a maintenance plan?Or is it better to write scripts for dropping indexes and recreatig the same?Purpose: Need to drop indexes(not the Primary key) before loading data and recreate the same after loadingLooking forward for suggestions/Solutions!Thanks,Janani |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-05-01 : 08:23:09
|
| well that depends on the structure of your data and the primary key.will there be a lot of page splits after the insert?why do you need to drop indexes before loading?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2008-05-02 : 04:06:21
|
| If you're using 2005 you can disable indexes by issuing an ALTER INDEX ix_name ON table_name DISABLE but we aware that disabeling a clustered index will prevent user access from the table until the index is rebuilt again. Enabeling can be done by issuing an ALTER INDEX ix_name ON table_name REBUILD--Lumbago |
 |
|
|
|
|
|