Basic Oracle Concepts and Programming Question:
Download Job Interview Questions and Answers PDF
What Happens If the Imported Table Already Exists?
Answer:
If the import process tries to import a table that already exists, the Data Pump Import utility will return an error and skip this table. The following exercise shows you a good example:
>cd oraclexeapporacleproduct10.2.0serverBIN
>impdp hr/globalguideline TABLES=employees
DIRECTORY=hr_dump DUMPFILE=tables.dmp LOGFILE=tables.log
Master table "HR"."SYS_IMPORT_TABLE_01" loaded/unloaded
Starting "HR"."SYS_IMPORT_TABLE_01": hr/** TABLES=employees
DIRECTORY=hr_dump DUMPFILE=tables.dmp LOGFILE=tables.log
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39151: Table "HR"."EMPLOYEES" exists. All dependent
metadata and data will be skipped due to table_exists_action
of skip
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
......
>cd oraclexeapporacleproduct10.2.0serverBIN
>impdp hr/globalguideline TABLES=employees
DIRECTORY=hr_dump DUMPFILE=tables.dmp LOGFILE=tables.log
Master table "HR"."SYS_IMPORT_TABLE_01" loaded/unloaded
Starting "HR"."SYS_IMPORT_TABLE_01": hr/** TABLES=employees
DIRECTORY=hr_dump DUMPFILE=tables.dmp LOGFILE=tables.log
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39151: Table "HR"."EMPLOYEES" exists. All dependent
metadata and data will be skipped due to table_exists_action
of skip
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
......
Download Oracle Database Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Export Several Tables Together? | How To Import One Table Back from a Dump File? |