This describes how to export an HPD database schema from an Oracle database to a file using Oracle’s Export Data Pump (expdp) utility.
The utility is run from a Windows Command Prompt, not from a SQLplus session.
The following parameters are required by the export utility:
• Connection string: Connection information for the HPD database schema being exported, that is, in the format system/password@database.
• DUMPFILE: Name of the database export file to be created by the export utility.
• LOGFILE: Log file to be created to record messages generated during the export.
• DIRECTORY: Name of the folder on the server computer to store the export file.
To find the DATA_PUMP_DIR directory, as the Oracle System Administrator user display the contents of the SYS schema’s DBA_DIRECTORIES view to find which directories are available. The DATA_PUMP_DIR directory location required here may be set to something like:
D:\oracle\admin\database\dpdump |
An export operation will look something like this. It must be run from a Windows Command Prompt. Substitute the values of the HPD Schema Owner user, database name, and names of the dump and log files to be created:
> expdp system@database DUMPFILE=database_hpdowner_date.dmp LOGFILE=expdp-hpdowner-date.log DIRECTORY=DATA_PUMP_DIR SCHEMAS=hpdowner FLASHBACK_TIME=systimestamp EXCLUDE=statistics D:\> expdp system@CARISDB DUMPFILE=CARISDB_hpd400_01May2019.dmp LOGFILE=expdp-hpd400-01May2019.log DIRECTORY=DATA_PUMP_DIR SCHEMAS=HPD400 FLASHBACK_TIME=systimestamp EXCLUDE=STATISTICS Export: Release 12.2.0.1.0 - Production on Wed May 1 14:24:19 2019 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Password: <System Password here> Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options ...program output messages appear here... Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is: D:\ORACLE12\ADMIN\DOCEC\DPDUMP\CARISDB_HPD400_01MAY2019.DMP Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed May 1 17:12:17 2019 elapsed 0 00:08:04 |
When completed, the contents of the folder might look like this after executing the above Oracle export data pump (expdp) utility:
CARISDB_HPD400_01MAY2019.DMP
expdp-hpd400-01May2019.log
Where:
• Log file (.log): the export messages are saved in the specified log file; review the log file to make sure the export was successful.
• Export file (.dmp): the exported schema information is placed in an Oracle "dump (.dmp) file that is created in the directory specified in Oracle by the DATA_PUMP_DIR value; keep the log file together with the dump file.
Note that the contents of the current database are not affected: they are not changed nor deleted during the export process.