Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS package recreate indexes

Status
Not open for further replies.

dbomrrsm

Programmer
Feb 20, 2004
1,709
GB
I have quite a complex DTS package that truncates a load of tables then reloads them (whilst carrying out other tasks).

I have had the package working now for around six months but all of a sudden it seems as though it is deleting and not recreating all the indexes on the various tables.

I dont think that its a problem that has existed before now as I only noticed there was a problem because users started giving me a hard time about performance and when I checked it was because of the lack of indexes.

Is there a setting that has been changed that tells the DTS not to recreate the indexes or am I really naive and the DTS has never recreated the indexes.

Any help would be gratefully appreciated.
 
Hmmm ... could be a couple of things.

First off you mention truncating the table. The truncate does not have any effect on indexes at all.

So ... first off, maybe the indexes were never created.

My second guess, which is the one I'll bet on, is that in your DTS package you are importing into the table. 10 to 1 you are dropping and recreating the tables on each import and thus the indexes are not created.

Thanks

J. Kusch
 
I have a scenario where I fully drop the indexes and tables and only recreate the tables before the import using a SQL step. After the import, I sweep the data for invalid dates, and then change a couple of column types. After that, I recreate the indexes via another SQL step.

Works like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top