[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2473
  • Last Modified:

Extracting DDL for Jobs

Hello, I'm working on a development oracle application and its about to be moved to production.  I am using SQL Developer to view the database and I noticed that a job I created is not showing up in the job folder.  I have a schedule created for it and the job is set up and working... I'm just curious how I would extract the ddl for this?

We need to keep ddl files in our version manager for all our objects and I'm used to doing this in sql server.

Thanks.
0
Roxanne25
Asked:
Roxanne25
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
I've never done this.  I've always looked at the parameters set in the views and just re-typed the SQL.

That said see if this helps:
http://forums.oracle.com/forums/thread.jspa?messageID=3912958
0
 
Roxanne25Author Commented:
Thanks!  The last entry on that post gave me this:

SELECT dbms_metadata.get_ddl('PROCOBJ','job name', 'owner') from dual

And the result was this:

"
 
BEGIN
dbms_scheduler.create_job('"JOB_LOGON_TRAIL"',
job_type=>'STORED_PROCEDURE', job_action=>
'stored procedure name'
, number_of_arguments=>0,
start_date=>TO_TIMESTAMP_TZ('25-FEB-2010 07.00.00.000000000 AM US/EASTERN','DD-MON-RRRR HH.MI.SSXFF AM TZR','NLS_DATE_LANGUAGE=english'), repeat_interval=>
'FREQ=DAILY'
, end_date=>NULL,
job_class=>'"DEFAULT_JOB_CLASS"', enabled=>FALSE, auto_drop=>TRUE,comments=>
'Run the unsuccessful logon attempt stored procedure'
);
dbms_scheduler.set_attribute('"job name"','raise_events',207);
dbms_scheduler.enable('"job name"');
COMMIT;
END;
/
 "
0
 
slightwv (䄆 Netminder) Commented:
Cool.  Glad it worked.  I figured one of the three methods in the thread would.

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now