Basic Oracle Concepts and Programming Question:
Download Job Interview Questions and Answers PDF
How To Import One Table Back from a Dump File?
Answer:
If you only want to import one table back to the database, you can use a dump file that was created by full export, schema export or a table export. The following tutorial exercise shows you how to import the "ggl_links" table from a dump file created by a schema export:
>cd oraclexeapporacleproduct10.2.0serverBIN
>sqlplus /nolog
SQL> connect HR/globalguideline
SQL> DROP TABLE ggl_links;
Table dropped.
SQL> exit;
>impdp hr/globalguideline TABLES=ggl_links DIRECTORY=hr_dump
DUMPFILE=schema.dmp LOGFILE=tables.log
Master table "HR"."SYS_IMPORT_TABLE_01" loaded/unloaded
Starting "HR"."SYS_IMPORT_TABLE_01": hr/** TABLES=ggl_links
DIRECTORY=hr_dump DUMPFILE=schema.dmp LOGFILE=tables.log
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."ggl_LINKS" 6.375 KB 4 rows
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CON...
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTI...
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TAB...
Job "HR"."SYS_IMPORT_TABLE_01" successfully completed.
>cd oraclexeapporacleproduct10.2.0serverBIN
>sqlplus /nolog
SQL> connect HR/globalguideline
SQL> DROP TABLE ggl_links;
Table dropped.
SQL> exit;
>impdp hr/globalguideline TABLES=ggl_links DIRECTORY=hr_dump
DUMPFILE=schema.dmp LOGFILE=tables.log
Master table "HR"."SYS_IMPORT_TABLE_01" loaded/unloaded
Starting "HR"."SYS_IMPORT_TABLE_01": hr/** TABLES=ggl_links
DIRECTORY=hr_dump DUMPFILE=schema.dmp LOGFILE=tables.log
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."ggl_LINKS" 6.375 KB 4 rows
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CON...
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTI...
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TAB...
Job "HR"."SYS_IMPORT_TABLE_01" successfully completed.
Download Oracle Database Interview Questions And Answers
PDF
Previous Question | Next Question |
What Happens If the Imported Table Already Exists? | What Are the Original Export and Import Utilities? |