Import on one table from dump file
Suppose I have one schema dump (created by EXP) which has more than 500 objects in it, and the size of this dump is more than 4GB. Now I want to import only one table from this dump. Is it possible to do an import for only one table from such kind of dump file? Please let me know the IMP command for the same.
This is possible. And it is something I have been known to do from time to time. When you create a dump, you have the option of exporting the entire database (FULL=Y), an entire schema (OWNER=schema_name), or a list of tables (TABLES=t1,t2,t3). Similarly, when you import from a dump file, you can specify a FULL import, import a specific schema (FROMUSER) or just a list of TABLES. The import "mode" does not depend on the export "mode." In your case, your dump file contains one schema. To import just one table from that dump file, do something similar to the following:
imp file=mydump.dmp tables=table_x
The import process will import only the table noted in the TABLES parameter. All other objects in the dump will be skipped. But keep in mind that the import will also import any triggers, indexes, or constraints on this table unless you turn those off with the appropriate parameter.
Another example of mixing modes is to assume you have a full export of the entire database. You can import just the SCOTT schema similar to:
imp file=mydump.dmp fromuser=scott
Or assume that the dump file contains only two schemas (export was created with OWNER=schema1,schema2). You can import both schemas by specifying FULL=Y for the import.
This was first published in April 2008