Second, the steps are as follows
1. Create a Directory
Data pump requires the creation of a directory for the files and log files to be created and read, this parameter is used to define a directory, the previous mentioned data pump mainly work on the server side, export files need to write out to the server side local directory, This directory is the corresponding server-side directory. The user who will access the data pump file must have read/write access to the directory.
Note: Verify that the external directory exists before you begin the operation, and that the user who released the Create Directory command needs the system permissions of Create Anydirectory.
A directory named Test is created and the system user is granted read/write access to this directory.
Create a directory and give permissions:
Sql> Create directory TEST as ' d:\test '; Sql> Grant read,write on the directory TEST to system; |
View the two views of the directory that you have created in the database:
SELECT * from All_directories; SELECT * from Dba_directories; |
Then create the folder manually under the target disk D:\test
2. Data Pump Export
There are several ways to export a data pump, here we only introduce two kinds:
Ø Single User scenario export
EXPDP [user name]/[Password]@[host character channeling] schemas=[user name] directory=test dumpfile=x.dmp logfile=x.log
EXPDP system/orcl schemas=tmdata directory= dump_dir dumpfile=tmdata.dmp
IMPDP system/orcl schemas=tmdata directory=dump_dir dumpfile=tmdata.dmp ignore=y
Oracle Data Jumping