Oracle 10g – How to Export All Tables with User Using Data Pump

datapumporacleoracle-10g

I want to take backup of all my tables and the user too in Oracle 10g Enterprise edition and then I want to import it to some other computer. The user is not system I have created another user and all my tables are in that user.

Best Answer

You can use Oracle Datapump to perform export-import in schema(user) level.

Here are some examples.

expdp scott/tiger schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

The above command exports SCOTT schema in a dump file called SCOTT.dmp in a directory specified using DIRECTORY parameter, and writes it's log in expdpSCOTT.log file.

You can copy this dump file to another host and use Datapump Import to import it as shown below.

impdp scott/tigerschemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=impdpSCOTT.log

References:

  • Data Pump Export
  • Data Pump Import
  • CREATE DIRECTORY