Hello,
I would like to make a regular impdp of static tables in my database (+Oracle 11.2 on Linux red-hat 5 64bit+).
Below is the code that I use.
+[~oracle]$ impdp SYSTEM/****@SID DIRECTORY=EXPIMP_TOOL_DIR PARFILE=/home/oracle/imp_static_tables.par TABLE_EXISTS_ACTION=REPLACE DUMPFILE=Export_Static_Tables.dmp LOGFILE=Import_Export_Static_Tables.log+
In the PARFILE, I wrote the names of the static tables to be replaced in the database, and I use the TABLE_EXISTS_ACTION=REPLACE attribute in order to replace the existing tables.
I have a question regarding data integrity and referential constraints.
What happens if some of the static tables contain active FK to other tables, and vice versa - some other tables in the database have active FK to the static tables -
Do I have to perform 'DISABLE FK' prior replacing the tables with impdp ?
The documentation states the following:
When you use TRUNCATE or REPLACE, ensure that rows in the affected tables are not targets of any referential constraints.
But in the same paragraph, it also says:
If the existing table has active constraints and triggers, then it is loaded using the external tables access method. If any row violates an active constraint, then the load fails and no data is loaded. You can override this behavior by specifying DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS on the Import command line.
The originated link:
Documentation
I've done some tests and I was
ABLE to perform the import with TABLE_EXISTS_ACTION=REPLACE to the static tables with ACTIVE FKs, but I'm a bit confused, if it is a correct behavior.
Would appreciate any response regarding the issue,
Thanks in advance,
Roni.