How to Capture DDL for Scheduler Jobs (Doc ID 567504.1)

Last updated on MARCH 26, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.3 and later
Information in this document applies to any platform.
***Checked for relevance on 29-Jun-2012***

Symptoms

Capturing the DDL for a DBA_SCHEDULER_JOBS object via DBMS_METADATA.GET_DDL. OBJECT_TYPE of "JOB" fails with ORA-31604.

SQL> select dbms_metadata.get_ddl ('JOB', 'PURGE_LOG') from dual;
ERROR:
ORA-31604: invalid NAME parameter "NAME" for object type JOB in function
SET_FILTER
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 116
ORA-06512: at "SYS.DBMS_METADATA_INT", line 4676
ORA-06512: at "SYS.DBMS_METADATA_INT", line 8552
ORA-06512: at "SYS.DBMS_METADATA", line 2881
ORA-06512: at "SYS.DBMS_METADATA", line 2747
ORA-06512: at "SYS.DBMS_METADATA", line 4333
ORA-06512: at line 1

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms