2 Replies Latest reply on Nov 22, 2012 8:38 AM by Nick Walsh

    Scheduler extract SQL script

    Nick Walsh

      SQL Developer version

      Is there a way to extract the SQL script from a scheduler job? I have set up a job in my test enviromnent using the SQL Developer wizard which worked extremely well, but my dba insists on having a SQL script to deploy it to the live database.


        • 1. Re: Scheduler extract SQL script
          Try this:
            dbms_metadata.get_ddl('PROCOBJ', 'your_job_name')
          from dual;
          You can also create new tab "DDL" for jobs in SQL Developer by yourself in less than 5 minutes:
          (a) Save the following XML in a file - for example "JobEditDDL.xml"
            <item type="editor" objectType="SCHNEWJOB" style="Code">
            dbms_metadata.get_ddl('PROCOBJ', :OBJECT_NAME)
          from dual
          (b) In SQL Developer open: Tools -> Preferences -> Database -> User defined extensions
          (c) Click button <Add Row>. Select EDITOR (type) and add the full path of the xml file.
          (d) Choose "OK" and restart SQL Developer

          Edited by: dz_r on 2012-11-21 23:12
          • 2. Re: Scheduler extract SQL script
            Nick Walsh
            Excellent. Thank you.