My Oracle Support Banner

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

Last updated on AUGUST 04, 2018

Applies to:

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


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;
ORA-31604: invalid NAME parameter "NAME" for object type JOB in function
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


To view full details, 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 a vibrant support community of peers and Oracle experts.