ORA-31655: no data or metadata objects selected for job SOLUTION.

Exporting and importing command usually use database admins. I was doing this operations recently saw a problem.

I run expdp command in database operating system some database tables not exporting. When I searching expdp log the problem not writing in expdp log so expdp run success.

Afterly, source database tables compare target database tables and find difference tables. I applied expdp command for one difference table and check expdp alert log.

Error output.

ORA-39166: Object XXXXXX was not found or could not be exported or imported.
ORA-31655: no data or metadata objects selected for job
Job "SYS"."SYS_EXPORT_TABLE_01" completed with 2 error(s) at Tue Nov 15 23:43:25 2022 elapsed 0 00:00:22

Searching this problem to oracle support and find this solution.

This issue was investigated in Bug 34346835 - DATAPUMP EXPORT FAILS WITH ORA-39166 WITH FIX FOR BUG 32627280 APPLIED closed as not a bug and also Bug 34565447 - EXPDP FAILING WITH ORA-39165 ORA-31655 FOR CUSTOM SCHEMA, closed as not a bug.

As per the first bug following these steps resolved the issue:

1) take a backup of your database

2) as SYS

spool update

create table backup_fed$apps as select * from fed$apps where APP_NAME ='_CURRENT_STATE';
create table backup_obj as select * from obj$ where flags=134217728;

update fed$apps set APP_STATUS = 0 where APP_NAME = '_CURRENT_STATE';
commit;

update obj$ set flags = 0 where flags = 134217728;
commit;

spool off

3. shutdown abort;

4. startup

5. try an export

6. create a new table: create table test_patch( a number);

select flags from obj$ where name='TEST_PATCH';


_CURRENT_STATE is a pseudo app that acts as shorthand for the state of any app in the database. Its STATUS should only be active. For _CURRENT_STATE ,APP_STATUS != 0, when another real app is also active.

Here there is none, that suggests something crashed in the past. This issue is caused by logical dictionary corruption in which Data Pump is the victim.

It may be the result of a failed, restarted upgrade process causing an internal flag to be set for newly created objects in a non-CDB (Container Database) which is causing this problem.

This query helps to determine the extent of the data dictionary corruption:

if apply Bug 34565447 patch or uptade this tables likely document.I used this steps and restarting database the problem resolved. (Doc ID 2894503.1)

My oracle release update version 19.13.0.0.211019 but this document 19.16.0.0.0 and later version.

Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir