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:
- Open the command prompt or terminal program.
- 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:
- Open the command prompt or terminal program.
- 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.