1

I have been trying to do OracleBulkCopy on .NET, however, Oracle throws me errors. What specifically does OracleBulkCopy do, and how can I optimize its performance? (This was the post helped me alot) However, I do not know how to disable all unique index and constraints in the entire database.

Thanks in advance.

asked Nov 4, 2016 at 20:26
1
  • What errors does Oracle throw? if your data is good, you shouldn't expect (m)any. Commented Nov 5, 2016 at 2:38

1 Answer 1

1

Community Wiki answer generated from question comments by Justin Cave

You can use user_indexes and user_constraints (or all_indexes and all_constraints or dba_indexes and dba_constraints) to iterate through all the indexes and constraints that you own/ have access to/ exist in the database.

I can't imagine that you'd really want to try to disable every constraint in the database. Maybe all those in your schema. More likely, you want to disable those that are on a particular set of tables. As you iterate through them, you could construct the appropriate DDL statement to do whatever you want.

You can't disable an index (well, other than a function-based index). You could make the index unusable but that's unlikely to be what you want. You can drop the index but that presumably implies that you're going to save off the definition of the index so you can re-create it.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.