How to import and export dmp files in Oracle?

You can use the exp and imp commands in Oracle database to export and import dmp files.

Exporting dmp file:

  1. Open the command prompt or terminal program.
  2. Export a dmp file using the following command: exp username/password@database_instance_name file=export_file_path.dmp.

For example, to export user hr’s data to the file D:\backup\hr.dmp, use the following command:
exp hr/hr@orcl file=D:\backup\hr.dmp

Importing dmp file:

  1. Open the command prompt or terminal program.
  2. Enter the following command to import the dmp file: imp username/password@database_instance file=import_file_path.dmp

For example, to import the file hr.dmp from D:\backup\ into the user hr, the command is as follows:
imp hr/hr@orcl file=D:\backup\hr.dmp

Please note that importing and exporting dmp files require the appropriate database permissions.

bannerAds