1. In the PL/SQL interface, locate the Directories folder and locate the path to the directory file.
2. Access the server via SSH
Locate the appropriate path Cd/u01/oracle/dpdir
Input instructions
Df-h View Resource Usage
Su–oracle Oracle users entering the system
3. Export the database file
EXPDP userid=hbcxjm/oracle directory=dpdir dumpfile=hbcxjm.dmp JOB_NAME=HBCXJM logfile=hbcxjmlog parallel=2 SCHEMAS=HBCXJM
Ps:
Where UserID is the user name password of the target library to be exported, directory is the path name established, DumpFile is the target file name
4. Create a new database user
PS: Pay attention to the table space problem, make sure the table space is sufficient, otherwise the import will error
5. Import data
IMPDP hbcxjm/oracle directory=dpdir dumpfile=hbcxjm.dmp remap_schema=hbcxjm:hbcxjm REMAP_TABLESPACE=TP_HBCXJM:TP_ Hbcxjm
Table_exists_action = truncate Logfile=hbcxjmimp.log SCHEMAS=HBCXJM
Ps:
Remap_schema: The name of the exported data user and the name of the import data user
Remap_tablespace: Export data user's tablespace and table space for imported data users
Table_exists_action: If there is data processing in the table, truncate processing is used here
LogFile: Log file name
Example:
File export:
EXPDP userid=hbcxjm/oracle directory=dpdir dumpfile=hbcxjm.dmp job_name=hbcxjm logfile=hbcxjmlog parallel=2 schemas= Hbcxjm
EXPDP userid=drm_hbcxjm/oracle directory=dpdir dumpfile=drm_hbcxjm.dmp job_name=drm_hbcxjm logfile=drm_hbcxjmlog parallel=2 SCHEMAS=DRM_HBCXJM
EXPDP userid=hbcxjm_report/oracle directory=dpdir dumpfile=hbcxjm_report.dmp job_name=hbcxjm_report logfile=hbcxjm_ Reportlog parallel=2 Schemas=hbcxjm_report
EXPDP userid=hbcxjm_siif/oracle directory=dpdir dumpfile=hbcxjm_siif.dmp job_name=hbcxjm_siif logfile=hbcxjm_ Siiflog parallel=2 Schemas=hbcxjm_siif
EXPDP userid=hxpt3dd/oracle directory=dpdir dumpfile=hxpt3dd.dmp job_name=hxpt3dd logfile=hxpt3ddlog parallel=2 Schemas=hxpt3dd
EXPDP userid=drm_hxpt3dd/oracle directory=dpdir dumpfile=drm_hxpt3dd.dmp job_name=drm_hxpt3dd logfile=drm_ Hxpt3ddlog parallel=2 SCHEMAS=DRM_HXPT3DD
File import:
IMPDP hbcxjm/oracle directory=dpdir dumpfile=hbcxjm.dmp remap_schema=hbcxjm:hbcxjm REMAP_TABLESPACE=TP_HBCXJM:TP_ HBCXJM table_exists_action = truncate logfile=hbcxjmimp.log SCHEMAS=HBCXJM
IMPDP drm_hbcxjm/oracle directory=dpdir dumpfile=drm_hbcxjm.dmp remap_schema=drm_hbcxjm:drm_hbcxjm REMAP_TABLESPACE =TP_HBCXJM_DRM:TP_HBCXJM_DRM table_exists_action = truncate logfile=drm_hbcxjmimp.log SCHEMAS=DRM_HBCXJM
IMPDP hbcxjm_report/oracle Directory=dpdir dumpfile=hbcxjm_report.dmp remap_schema=hbcxjm_report:hbcxjm_report REMAP_TABLESPACE=TP_HBCXJM_DRM:TP_HBCXJM_DRM table_exists_action = truncate logfile=hbcxjm_reportimp.log SCHEMAS= Hbcxjm_report
IMPDP hbcxjm_siif/oracle directory=dpdir dumpfile=hbcxjm_siif.dmp remap_schema=hbcxjm_siif:hbcxjm_siif REMAP_ TABLESPACE=TP_HBCXJM:TP_HBCXJM table_exists_action = truncate logfile=hbcxjm_siifimp.log SCHEMAS=hbcxjm_siif
IMPDP hxpt3dd/oracle directory=dpdir dumpfile=hxpt3dd.dmp remap_schema=hxpt3dd:hxpt3dd REMAP_TABLESPACE=TP_HBCXJM_ YBDD:TP_HBCXJM_YBDD table_exists_action = truncate logfile=hxpt3ddimp.log schemas=hxpt3dd
IMPDP drm_hxpt3dd/oracle directory=dpdir dumpfile=drm_hxpt3dd.dmp remap_schema=drm_hxpt3dd:drm_hxpt3dd REMAP_ TABLESPACE=TP_HBCXJM_YBDD:TP_HBCXJM_YBDD table_exists_action = truncate logfile=drm_hxpt3ddimp.log SCHEMAS=drm_ Hxpt3dd
Oracle Data Pump Import Export command