search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Table of Contents
Create Directory Object
Export Data with expdp
Import Data with impdp
Monitor and Control Jobs
Home Database Oracle How to use Oracle Data Pump (expdp/impdp) for data migration

How to use Oracle Data Pump (expdp/impdp) for data migration

Dec 25, 2025 am 05:44 AM

Oracle Data Pump (expdp/impdp) enables efficient data migration via server-side export and import. First, create a directory object: CREATE DIRECTORY dpump_dir AS '/u01/oracle/dpump'; then grant privileges: GRANT READ, WRITE ON DIRECTORY dpump_dir TO system. Use expdp to export schemas, tables, or full databases: expdp system/password@db10g DIRECTORY=dpump_dir DUMPFILE=export.dmp LOGFILE=export.log SCHEMA=scott. For imports, use impdp with remap options: impdp system/password@db20g DIRECTORY=dpump_dir DUMPFILE=export.dmp LOGFILE=import.log REMAP_SCHEMA=scott:scott_new. Control jobs interactively using ATTACH, STATUS, STOP_JOB, or query DBA_DATAPUMP_JOBS for monitoring.

How to use Oracle Data Pump (expdp/impdp) for data migration

Oracle Data Pump (expdp and impdp) is a powerful utility for high-speed data and metadata movement between Oracle databases. It's commonly used for data migration, backups, and database upgrades. Unlike the older exp/imp tools, Data Pump runs server-side and offers better performance, filtering options, and parallel processing.

Create Directory Object

Before using expdp or impdp, you must define a directory object in the database that points to a physical server path. This is where dump files will be read from or written to.

SQL> CREATE DIRECTORY dpump_dir AS '/u01/oracle/dpump';
SQL> GRANT READ, WRITE ON DIRECTORY dpump_dir TO system;
  • The directory must exist on the database server.
  • The Oracle user (e.g., SYSTEM) needs read/write privileges on it.

Export Data with expdp

Use expdp to export schema, table, or full database content into dump files.

expdp system/password@db10g DIRECTORY=dpump_dir DUMPFILE=export.dmp LOGFILE=export.log SCHEMAS=scott
  • DIRECTORY: References the Oracle directory object.
  • DUMPFILE: Name of the output file.
  • LOGFILE: Log of the export operation.
  • SCHEMAS: Exports specific schema(s).
  • You can also use TABLES, FULL=Y, or QUERY for filtered exports.

Import Data with impdp

Use impdp to import data from dump files into a target database.

impdp system/password@db20g DIRECTORY=dpump_dir DUMPFILE=export.dmp LOGFILE=import.log REMAP_SCHEMA=scott:scott_new
  • REMAP_SCHEMA: Changes schema owner during import.
  • REMAP_TABLESPACE: Redirects objects to a different tablespace.
  • TABLE_EXISTS_ACTION=REPLACE or APPEND handles existing tables.
  • Add PARALLEL=4 to speed up large imports.

Monitor and Control Jobs

Data Pump jobs can be monitored and interactively controlled.

  • Run expdp or impdp without starting immediately by adding ATTACH=job_name.
  • Type STATUS to see progress.
  • Type STOP_JOB to pause, then resume later.
  • Query DBA_DATAPUMP_JOBS to list active jobs.

Data migration with Oracle Data Pump is efficient and flexible. Ensure directory access, test with small datasets first, and use remap options when moving between environments. Basically, expdp creates the backup, impdp restores it—customize as needed.

The above is the detailed content of How to use Oracle Data Pump (expdp/impdp) for data migration. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

ArtGPT

ArtGPT

AI image generator for creative art from text prompts.

Stock Market GPT

Stock Market GPT

AI powered investment research for smarter decisions

Popular tool

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to troubleshoot the Oracle Listener startup? (Network Services) How to troubleshoot the Oracle Listener startup? (Network Services) Mar 10, 2026 am 12:58 AM

Oraclelistenerstartupfailuresstemfromsilentlistener.oraparsingerrors,hostnameresolutionissues,orpermissionproblems—notbinariesorports;validatesyntaxwithreload,checkownership,verifyactualconfigpath,testDNS,useexplicitIPs,confirmADR_BASE,enabletracingp

How to use Sequences in Oracle to generate IDs? (Auto-increment) How to use Sequences in Oracle to generate IDs? (Auto-increment) Mar 06, 2026 am 01:16 AM

ID auto-increment in Oracle requires the cooperation of SEQUENCE and BEFOREINSERT triggers, and the trigger must check: NEW.IDISNULL; 12c supports IDENTITY but is not compatible with older versions and disables explicit insertion.

How to patch Oracle Grid Infrastructure? (System Maintenance) How to patch Oracle Grid Infrastructure? (System Maintenance) Mar 10, 2026 am 01:00 AM

Three things must be confirmed before applying the GI patch: 1. The opatchlsinventory-detail output of each node is consistent; 2. OCR and VoteDisk are online and crsctlcheckcluster-all and ocrcheck both return SUCCESS; 3. $GRID_HOME/crs/install/rootcrs.sh-prepatch has been successfully executed.

How to use Oracle APEX to build a low-code app? (Rapid Development) How to use Oracle APEX to build a low-code app? (Rapid Development) Mar 13, 2026 am 12:48 AM

OracleAPEXislow-glue,notno-code:itskipsinfrastructurebutrequiresSQL,PL/SQL,anddeclarativelogic;ApplicationProcesseshandleserver-sidevalidationandsideeffects,DynamicActionsmanageclient-sideinteractivity;InteractiveGridneedskey-preservedsourcesforediti

How to implement Transparent Data Encryption (TDE) in Oracle? (Data Security) How to implement Transparent Data Encryption (TDE) in Oracle? (Data Security) Mar 13, 2026 am 12:14 AM

OracleTDE must first enable and open the encrypted wallet (Wallet), otherwise ORA-28365 will be reported when executing ALTERTABLESPACE...ENCRYPTION; Wallet needs to be created, opened and managed through the ADMINISTERKEYMANAGEMENT command, and the path must be explicitly configured in sqlnet.ora and permissions must be ensured.

How to manage Flashback Data Archive_Flashback Data Archive table space allocation How to manage Flashback Data Archive_Flashback Data Archive table space allocation Mar 28, 2026 pm 04:06 PM

The reason why the FlashbackDataArchive table space is full is that the hidden history table (SYS_FBA_HIST_XXXXXX) occupies the table space where the main table is located and does not go through ASSM cleaning; you need to use ALTERFLASHBACKARCHIVE...MODIFYTABLESPACE to migrate to the local management automatic segment space table space, and manually clean up the orphan history table.

How to use JSON data types in Oracle Database? (NoSQL Features) How to use JSON data types in Oracle Database? (NoSQL Features) Mar 08, 2026 am 01:03 AM

In Oracle's JSON scenario, you should select VARCHAR2 (4000CHAR) plus ISJSON constraints (small documents) or BLOB plus ISJSON constraints (large documents), and disable CLOB; ISJSON is a column-level constraint syntax, not a function call; the JSON_VALUE path must be a string literal; JSON_EXISTS needs to be speeded up with the JSON_VALUE function index.

How to grant flashback permission_GRANT FLASHBACK ON and FLASHBACK ANY TABLE How to grant flashback permission_GRANT FLASHBACK ON and FLASHBACK ANY TABLE Apr 03, 2026 pm 11:54 PM

FLASHBACK permissions must be explicitly granted: GRANTFLASHBACKONschema.tableTOuser for a single table, and GRANTFLASHBACKANYTABLETOuser for all tables; basic permissions such as SELECT and ALTER and row movement enablement are also required.

Related articles