How would I disable and later enable all indexes in a given schema/database in Oracle?
Note: This is to make sqlldr run faster.
How would I disable and later enable all indexes in a given schema/database in Oracle?
Note: This is to make sqlldr run faster.
You can disable constraints in Oracle but not indexes. There's a command to make an index ununsable but you have to rebuild the index anyway, so I'd probably just write a script to drop and rebuild the indexes. You can use the user_indexes and user_ind_columns to get all the indexes for a schema or use dbms_metadata:
Here's making the indexes unusable without the file:
The rebuild would be similiar.