Re: Scheduler Jobs

  • From: "Jeremy Schneider" <jeremy.schneider@xxxxxxxxxxxxxx>
  • To: "Sanjay Mishra" <smishra_97@xxxxxxxxx>
  • Date: Wed, 16 Jan 2008 13:23:47 -0500

You can extract DDL for both scheduler jobs and old DBMS_JOB jobs with data
pump.

SQL> create directory tmpdir as '/tmp';
# expdp \"/ as sysdba\" directory=tmpdir
dumpfile=jsjobs.dmpcontent=metadata_only full=y include=JOB
# impdp \"/ as sysdba\" directory=tmpdir dumpfile=jsjobs.dmp sqlfile=
itcjobs.sql
# vi /tmp/jsjobs.sql

FYI, this will not give you system jobs (PURGE_LOG, GATHER_STATS_JOB,
AUTO_SPACE_ADVISOR_JOB, etc) - to get those the best suggestion I've found
is to use "Create Like" in OEM and then copy the DDL.  There was also a
suggestion someone made about using the undocumented package
DBMS_SCHED_JOB_EXPORT - this looks like it'll work too but I haven't tried
it yet personally.  My guess is that this package is the guts of Data Pump
anyway.
http://forums.oracle.com/forums/thread.jspa?messageID=1751703

-Jeremy


On 1/15/08, Andrew Kerber <andrew.kerber@xxxxxxxxx> wrote:
>
> That may be the only way you have to do it.  Generate the ddl from the
> dba_scheduler_jobs table.  It has everything you need, you just have to
> generate it.
>
> On Jan 15, 2008 10:11 PM, Sanjay Mishra < smishra_97@xxxxxxxxx> wrote:
>
> > Andrew
> >
> > I had upgraded the Database from 8i to 10g and converted 30 dbmsJobs to
> > Scheduler running at various interval. The test database was created few
> > month back and lost the drive where I stored all scheduler scripts. Now in
> > order to move to Production, I want to remove the dbms Job to 10g schedulere
> > and so want to create the DDL. It is difficult to go with DBa_scheduler_jobs
> > and then create the jobs based on different schedule.
> >
> > Thanks
> > Sanjay
> >
> > ----- Original Message ----
> > From: Andrew Kerber <andrew.kerber@xxxxxxxxx >
> > To: smishra_97@xxxxxxxxx
> > Cc: oracle-l@xxxxxxxxxxxxx
> > Sent: Tuesday, January 15, 2008 4:22:00 PM
> > Subject: Re: Scheduler Jobs
> >
> > Why do you need to?  select * from dba_scheduler_jobs should show you
> > what you need to know.
> >
> > On Jan 15, 2008 2:50 PM, Sanjay Mishra <smishra_97@xxxxxxxxx > wrote:
> >
> > >  Is there way to extract the DDL for Scheduler Job.
> > >
> > > TIA
> > > Sanjay
> > >
> > > ------------------------------
> > > Never miss a thing. Make Yahoo your 
> > > homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
> > >
> >
> >
> >
> > --
> > Andrew W. Kerber
> >
> > 'If at first you dont succeed, dont take up skydiving.'
> >
> >
> > ------------------------------
> > Never miss a thing. Make Yahoo your 
> > homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
> >
>
>
>
> --
> Andrew W. Kerber
>
> 'If at first you dont succeed, dont take up skydiving.'
>



-- 
Jeremy Schneider
Chicago, IL
http://www.ardentperf.com/category/technical

Other related posts: