LRM-00121: ‘metadata’ is not an allowable value for ‘content’

LRM-00121: ‘metadata’ is not an allowable value for ‘content’

Cause:

During export of metadata, if we dont specify any object with metadata_only option, then we get the below error

[oracle@orcl19x ~]$ expdp \'/ as sysdba\' directory=exp dumpfile=metadatabkp.dmp logfile=metadatabkp.log content=metadata_only

Export: Release 12.1.0.2.0 - Production on Fri Aug 13 17:46:14 2021

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  "/******** AS SYSDBA" directory=exp dumpfile=metadatabkp.dmp logfile=metadatabkp.log content=metadata_only
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
ORA-31655: no data or metadata objects selected for job
Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at Fri Aug 13 17:46:41 2021 elapsed 0 

Workaround:

Specify object name for which metadata export backup is required

[oracle@orcl19x ~]$ oerr ora 31655
31655, 00000, "no data or metadata objects selected for job"
// *Cause:  After the job parameters and filters were applied,
//          the job specified by the user did not reference any objects.
// *Action: Verify that the mode of the job specified objects to be moved.
//          For command line clients, verify that the INCLUDE, EXCLUDE and
//          CONTENT parameters were correctly set.  For DBMS_DATAPUMP API
//          users, verify that the metadata filters, data filters, and
//          parameters that were supplied on the job were correctly set.

Use either tables or schemas or full parameter to proceed with metadata export

[oracle@orcl19x ~]$ expdp \'/ as sysdba\' directory=exp dumpfile=metadatabkp.dmp logfile=metadatabkp.log tables=test.tabx content=metadata_only

Export: Release 12.1.0.2.0 - Production on Fri Aug 13 17:47:23 2021

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TABLE_01":  "/******** AS SYSDBA" directory=exp dumpfile=metadatabkp.dmp logfile=metadatabkp.log tables=test.tabx content=metadata_only
Processing object type TABLE_EXPORT/TABLE/TABLE
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
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:
  /home/oracle/metadatabkp.dmp
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Fri Aug 13 17:47:33 2021 elapsed 0 00:00:10

Leave a Reply

Discover more from XscalibaL

Subscribe now to keep reading and get access to the full archive.

Continue reading