Dropping indexes using Before SQL Script

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dougcl
Premium Member
Premium Member
Posts: 137
Joined: Thu Jun 24, 2010 4:28 pm

Dropping indexes using Before SQL Script

Post by dougcl »

Hi folks,
I want to drop all the indexes, load the table, and then build all the indexes.

I want to use the oracle Connector before and after SQL scripts to do so.

Does anyone have an example of an oracle script to drop indexes?

Thanks,
Doug
dougcl
Premium Member
Premium Member
Posts: 137
Joined: Thu Jun 24, 2010 4:28 pm

Post by dougcl »

Hi folks, never mind. I figured it out:

Code: Select all

ALTER TABLE dw_encounters_fact_new 
  DROP CONSTRAINT dw_encounters_fact_new_pk
;
DROP INDEX dw_encounters_fact_new_n01 
;
DROP INDEX dw_encounters_fact_new_n02 
;
DROP INDEX dw_encounters_fact_new_n03
; 
DROP INDEX dw_encounters_fact_new_n04 
;
DROP INDEX dw_encounters_fact_new_n05 
;
DROP INDEX dw_encounters_fact_new_n06 
;
DROP INDEX dw_encounters_fact_new_n07 
;
DROP INDEX dw_encounters_fact_new_n08 
;
DROP INDEX dw_encounters_fact_new_n09
; 
DROP INDEX dw_encounters_fact_new_n10 
;
DROP INDEX dw_encounters_fact_new_n11 
;;
Post Reply