Generate DDL for scheduler jobs
dbms_metadata job
set long 1000000000 pagesize 0 trimspool on
select replace(replace(replace(dbms_metadata.get_ddl ('PROCOBJ',JOB_NAME,owner),'(''"','('''||owner||'.'),'"'')',''')'),'"','')||'/'
from dba_scheduler_jobs
where JOB_TYPE is not null
and owner !='SYS';
or select from dba_objects
set long 1000000000 pagesize 0 trimspool on
select replace(replace(replace(dbms_metadata.get_ddl ('PROCOBJ',object_NAME,owner),'(''"','('''||owner||'.'),'"'')',''')'),'"','')||'/'
from dba_objects
where object_type='JOB'
and owner !='SYS';
or
expdp \"/ as sysdba\" dumpfile=scott_job.dmp SCHEMAS=SCOTT content=metadata_only include=JOB
****************************************************************************************************
Dbms_metadata.Get_ddl Can Not Capture Ddl For Scheduler Jobs [ID 567504.1] for sys owner ????????
not work for owner ='SYS'; no idea why !!!!!!!!!!!!!!!!!!!!
as per metalink <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Currently the DBMS_METADATA does not support the new 'job' type created by DBMS_SCHEDULER.
********************************************************************************************************
No comments:
Post a Comment