Chapter 28 · Upgrades, Patching, Data Pump, Migration, and Zero/Low-Downtime Change

Data Pump Export/Import, Transportable Tablespaces, Network Import, and Migration Workflows

Perform a reproducible logical ServiceHub migration with Data Pump directory objects, export/import and REMAP_SCHEMA, then compare network import and transportable/RMAN movement across platform/endianness while validating rows, grants, objects and sequences.

Expert140–160 minutesData Pump schema migration + verification labFree local expdp/impdp pathPARALLEL=1 · METADATA_ONLY baselineLast reviewed: August 2026

Learning outcomes

ServiceHub must move one application schema into a fresh PDB while keeping the source intact for rollback. Copying datafiles would also move database-level physical state the team does not want; hand-written CREATE/INSERT scripts would miss grants, constraints, sequences and metadata. Oracle Data Pump is a server-side logical metadata/data movement engine exposed by expdp/impdp.

01

Use Data Pump directory objects and explain the difference between a database DIRECTORY object and an operating-system path.

02

Export/import a dedicated ServiceHub schema and REMAP_SCHEMA into a target schema without embedding passwords.

03

Verify table rows, metadata, grants, invalid objects and sequence state after import.

04

Explain NETWORK_LINK import and full/transportable tablespace workflows, including platform endianness and RMAN conversion.

05

Gate PARALLEL, data compression and dump encryption by the current utility/edition/option rules rather than copying production examples into Free.

Generation-time baseline, licensing, patchability, and topology boundary

Mandatory examples target Oracle AI Database Free 26ai and were reviewed against the current July 2026 RU 23.26.3 documentation, the August 2026 Upgrade Guide, SQL Developer 26.2 (26.2.0.186.2220), and SQLcl 26.2.1.222.1617. Free remains limited to 2 foreground CPU cores, 2 GB combined database RAM, 12 GB user data, and one installation per logical environment, and it is explicitly unsupported for applying Release Updates/security patches or opening Oracle Support SRs. The course baseline remains CDB/instance FREE, application PDB/service FREEPDB1, owner SERVICEHUB_OWNER, runtime SERVICEHUB_APP, and persistent /opt/oracle/oradata for the container learning path. Production patching/upgrading must use the exact platform RU README, Oracle Home inventory, PDB state, client certification, backup/restore evidence, and current Licensing Information. No mandatory lab applies a binary RU to Free, raises COMPATIBLE, enables GoldenGate, RAC, Data Guard, Fleet Patching and Provisioning, or a management pack. Data Pump, DBMS_REDEFINITION, and cross-platform backup/recovery have Free learning paths; extra compression/parallel/encryption/HA/CDC behavior is gated separately where relevant.

1. Data Pump client and server roles

expdp/impdp are command-line clients. The actual Data Pump job runs in the database server and reads/writes server-accessible files through a database DIRECTORY object. The DIRECTORY object maps a database name to an OS path and has database privileges such as READ/WRITE.

sql · inspect default directory
SELECT directory_name,directory_pathFROM dba_directoriesWHERE directory_name='DATA_PUMP_DIR';

The path proves where the server writes logs/dump files. The client working directory is irrelevant.

2. Build an isolated ServiceHub migration schema

sql · admin in FREEPDB1
BEGIN EXECUTE IMMEDIATE 'DROP USER sh28_src CASCADE';EXCEPTION WHEN OTHERS THEN IF SQLCODE != -1918 THEN RAISE; END IF; END;/BEGIN EXECUTE IMMEDIATE 'DROP USER sh28_dst CASCADE';EXCEPTION WHEN OTHERS THEN IF SQLCODE != -1918 THEN RAISE; END IF; END;/CREATE USER sh28_src NO AUTHENTICATION  DEFAULT TABLESPACE users  QUOTA 50M ON users;CREATE USER sh28_dst NO AUTHENTICATION  DEFAULT TABLESPACE users  QUOTA 50M ON users;GRANT CREATE TABLE,CREATE SEQUENCE,CREATE VIEW TO sh28_src;GRANT CREATE TABLE,CREATE SEQUENCE,CREATE VIEW TO sh28_dst;CREATE TABLE sh28_src.work_orders (  work_order_id NUMBER PRIMARY KEY,  status_code VARCHAR2(12) NOT NULL,  amount NUMBER(12,2) NOT NULL);CREATE SEQUENCE sh28_src.work_order_seq  START WITH 1001 CACHE 20;INSERT INTO sh28_src.work_orders VALUES(1001,'OPEN',125.50);INSERT INTO sh28_src.work_orders VALUES(1002,'CLOSED',80.00);CREATE VIEW sh28_src.open_orders_v ASSELECT work_order_id,amountFROM sh28_src.work_ordersWHERE status_code='OPEN';GRANT SELECT ON sh28_src.open_orders_v TO servicehub_app;COMMIT;

3. Baseline the source before export

sql · source verification
SELECT COUNT(*) row_count,       SUM(amount) total_amount,       MIN(work_order_id) min_id,       MAX(work_order_id) max_idFROM sh28_src.work_orders;SELECT sequence_name,last_number,cache_sizeFROM dba_sequencesWHERE sequence_owner='SH28_SRC'  AND sequence_name='WORK_ORDER_SEQ';SELECT object_type,COUNT(*) object_countFROM dba_objectsWHERE owner='SH28_SRC'GROUP BY object_typeORDER BY object_type;SELECT grantee,privilegeFROM dba_tab_privsWHERE owner='SH28_SRC'  AND table_name='OPEN_ORDERS_V';

These are migration acceptance baselines, not merely inventory trivia. Sequence/grant state can break an application even when every table row copied correctly.

4. Deliberate failure: use an OS path where Data Pump expects a DIRECTORY object

bash · wrong Data Pump invocation
expdp system@//localhost:1521/FREEPDB1   schemas=SH28_SRC   directory=NO_SUCH_DIR   dumpfile=sh28_src.dmp   logfile=sh28_src_export.log# Expected:# ORA-39087: directory name NO_SUCH_DIR is invalid

The repair is to use a real database DIRECTORY object and grant the Data Pump principal access to it—not to chmod a random client directory.

5. Free-compatible schema export

bash · expdp — password is prompted/interactively supplied
expdp system@//localhost:1521/FREEPDB1   schemas=SH28_SRC   directory=DATA_PUMP_DIR   dumpfile=sh28_src.dmp   logfile=sh28_src_export.log   compression=METADATA_ONLY   parallel=1   reuse_dumpfiles=NO

Mandatory lab deliberately uses PARALLEL=1 and metadata-only compression. Current Data Pump documentation restricts data compression (ALL/DATA_ONLY) to Enterprise Edition with Advanced Compression, while the current licensing matrix separately describes option inclusion by offering. Production must satisfy both utility restrictions and licensing entitlement. Do not infer that a parameter is legal merely because it parses.

6. Import into a different schema

bash · impdp remap
impdp system@//localhost:1521/FREEPDB1   schemas=SH28_SRC   directory=DATA_PUMP_DIR   dumpfile=sh28_src.dmp   logfile=sh28_dst_import.log   remap_schema=SH28_SRC:SH28_DST

Because SH28_DST exists with quota, objects can be remapped predictably. Review the import log for skipped object types, errors and transformed metadata; “Job successfully completed” is not enough business validation.

7. Prove the target beyond connectivity

sql · target validation
SELECT COUNT(*) row_count,       SUM(amount) total_amount,       MIN(work_order_id) min_id,       MAX(work_order_id) max_idFROM sh28_dst.work_orders;SELECT object_type,COUNT(*) object_countFROM dba_objectsWHERE owner='SH28_DST'GROUP BY object_typeORDER BY object_type;SELECT owner,object_name,object_typeFROM dba_objectsWHERE owner='SH28_DST'  AND status='INVALID';SELECT sequence_name,last_number,cache_sizeFROM dba_sequencesWHERE sequence_owner='SH28_DST'  AND sequence_name='WORK_ORDER_SEQ';SELECT grantee,owner,table_name,privilegeFROM dba_tab_privsWHERE owner='SH28_DST'ORDER BY table_name,grantee,privilege;

Compare these with the captured source baseline. Sequence LAST_NUMBER is cache/high-water metadata, not a promise that every preceding number was used; the migration test is whether the next generated key is safe and application semantics remain correct.

8. NETWORK_LINK import eliminates the intermediate dump file

With a database link from the target to the source, impdp NETWORK_LINK=... pulls metadata/data directly over the database connection. This can simplify storage logistics but couples migration speed/consistency to a live source/network/database link and its privileges.

bash · two-database design example
-- On target, create a least-privilege DB link according to policy.-- Then from the target host:impdp system@//target-host:1521/TARGETPDB   network_link=SH28_SOURCE_LINK   schemas=SH28_SRC   remap_schema=SH28_SRC:SH28_DST   logfile=sh28_network_import.log

No dump file is specified for a pure network import. Version restrictions and source/target feature compatibility still apply.

9. Transportable tablespaces move datafiles; Data Pump moves metadata

For very large user tablespaces, transportable tablespace/full transportable workflows avoid unloading/reloading every row. First prove the set is self-contained, place the source tablespaces into the required transport state, export metadata, copy/convert datafiles, then import metadata at the target.

sql · self-containment check
BEGIN  DBMS_TTS.TRANSPORT_SET_CHECK(    ts_list          => 'SH28_TTS',    incl_constraints => TRUE  );END;/SELECT *FROM transport_set_violations;

The lab does not create/copy a real datafile because paths/platforms differ. A non-empty violation list means the proposed transport set is not self-contained.

10. Endianness determines physical conversion choices

sql · platform evidence
SELECT platform_nameFROM v$database;SELECT platform_id,platform_name,endian_formatFROM v$transportable_platformORDER BY platform_name;

RMAN CONVERT DATABASE requires source and target platforms with the same endian format. For different endianness, use logical Data Pump or transport individual tablespaces/datafiles with RMAN conversion as supported. Even same-endian full database transport has its own conversion requirements; never reduce cross-platform migration to file copy.

11. 26ai dump-file format is itself a migration consideration

26ai Data Pump defaults to a trailer-block dump format that supports object-store workflows. A default 26ai dump can be readable only by 26ai or later Data Pump servers. If the target is an older release, choose a supported VERSION/workflow and test that every required object/data type can be represented. A logical downgrade is not guaranteed just because Data Pump has a VERSION parameter.

12. Logical versus physical migration

Method Moves Typical strength
Data Pump conventional Logical rows + metadata Remap/filter/upgrade/platform flexibility
Network import Logical rows + metadata over DB link No intermediate dump set
Transportable User datafiles + Data Pump metadata Large data volume with less unload/reload
RMAN physical Database/datafile physical structures Physical clone/restore/migration where platform/version rules fit

Pick from RTO/downtime, source/target versions, platform/endian, data volume, remapping requirements and rollback—not tool familiarity.

13. Cleanup and production judgment

sql · cleanup database objects
DROP USER sh28_dst CASCADE;DROP USER sh28_src CASCADE;-- Remove sh28_src.dmp/logs from DATA_PUMP_DIR only after-- validation/retention policy allows it.

Data Pump is logical migration, not backup/DR. Validate data, objects, grants, jobs, sequences, invalids and application behavior. Use transportable/RMAN methods for large physical datasets only when self-containment, platform/endian and encryption rules are satisfied.

No mandatory lab uses Data Pump data compression, parallel workers greater than one, or dump encryption. Production compression/encryption requires the current utility restrictions plus Advanced Compression/Advanced Security entitlement as applicable. Lesson 4 reduces application downtime for schema/table changes without moving the whole database.

Check your understanding

  1. What does a Data Pump DIRECTORY parameter name?
  2. What does REMAP_SCHEMA change?
  3. Why is a Data Pump job log insufficient migration validation?
  4. When does NETWORK_LINK avoid a dump file?
  5. What physical fact must be checked for cross-platform RMAN/transportable movement?
Review the answers

A database DIRECTORY object that maps to a server-side OS path.

It maps exported object ownership from the source schema to a target schema during import.

Rows, grants, invalid objects, sequences, jobs and application semantics can still be wrong or incomplete.

When impdp reads the live source through a database link instead of a dump file set.

Source/target platform and endian compatibility, plus the method-specific conversion rules.

Authoritative references

Keep knowledge open

Help the academy stay free and grow.

If these tutorials save you time, a small donation supports new lessons, technical review, diagrams, examples, and long-term maintenance.

ETHEthereum / ERC-20 only
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0

Send only Ethereum or ERC-20 compatible assets to this address.