重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

标题: 12.2 Multitenant: ORA-31655 and ORA-39166 When Exporting Objects from Applica... [打印本页]

作者: 刘泽宇    时间: 2025-11-9 18:15
标题: 12.2 Multitenant: ORA-31655 and ORA-39166 When Exporting Objects from Applica...
现象:
NOTE: The document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
Metadata linked tables (i.e tables created with sharing=metadata) are not exported from Application PDB. The objects are exported with success only with SYSTEM user, as shown below:

- a table can be unloaded by DataPump from an APP PDB with SYSTEM user, but it cannot be unloaded when expdp job is launched by the user who owns the table:

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Starting "SYSTEM"."SYS_EXPORT_TABLE_01":  system/********@<application_pdb> DIRECTORY=dpump_dir dumpfile=dump_table.dmp tables=TC.TEST_TABLE logfile=table_log.log
Processing object type TABLE_EXPORT/TABLE/APPLICATION_DATA/TABLE_DATA
. . exported "TC"."TEST_TABLE"                0 KB       0 rows
Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
- starting the export job with the user who owns the table, it reports:

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Starting "TC"."SYS_EXPORT_TABLE_01":  tc/********@<application_pdb> directory=dpump_dir dumpfile=dump_table.dmp tables=TC.TEST_TABLE logfile=2_table_log.log
ORA-39166: Object TC.TEST_TABLE was not found or could not be exported or imported.
ORA-31655: no data or metadata objects selected for job


原因:
The issue was investigated and solved in unpublished Bug 28009607 - 19.1CDB:ORA-39166 WHEN EXPDP WITH SHARING=METADATA TABLES, fixed starting with 19.1.

处理方法:
To avoid the issue, use any of below alternatives:

  1/ Upgrade to 19.1.

  - or -

  2/ Apply Patch 28009607 if available for your version and platform.
     To check for conflicting patches, please use the My Oracle Support (MOS) Patch Planner Tool. Reference Document 1317012.1 - How to Use MOS Patch Planner to Check and Request the Conflict Patches?
     If no patch exists for your platform and version, please contact Oracle Support to request a fix.

  - or -

  3/ Use system user to export metadata-linked tables from an application PDB.






欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2