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.
Roxanne25Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.