Today we will learn how to do Table Export/Import In Oracle Container Database.
We export and import a table in Oracle Container database as follows.
1. We start by learning the size of the table to be exported.
1 2 3 | SQL> select segment_name, segment_type, round(bytes/1024/1024,2)as "Table Size(GB)" from dba_segments where and owner='TEST' and segment_name='TEST_TABLE'; |
2. If we do not know where to export, we can learn the directory defined in the database as follows.
1 | SQL> SELECT * FROM dba_directories; |
3. And we start the export process.
1 2 | $ expdp melek/<password>@TESTDB directory=DUMP_DIR tables=TEST.TEST_TABLE dumpfile=TEST_TABLE.dmp logfile=TEST_TABLE.log |
4. We import from a different database.
1 2 | $ impdp melek/<password>@ORCL directory=DUMP_DIR dumpfile=TEST_TABLE.dmp logfile=imp_TEST_TABLE.log |