Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Preventing jobs from being imported

Re: Preventing jobs from being imported

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 10 Aug 2004 20:46:43 +0800
Message-ID: <4118C3B3.1970@yahoo.com>


Paul Drake wrote:
>
> hboswel1_at_bellsouth.net wrote in message news:<cuifh0duak1uhls5m00d2pbjbrbi6erkc3_at_4ax.com>...
> > On Mon, 09 Aug 2004 11:09:19 -0500, Turkbear <john.g_at_dot.spamfree.com>
> > wrote:
> >
> > >hboswel1_at_bellsouth.net wrote:
> > >
> > >>I have a nightly export/import job that runs, to place some data on a
> > >>database server that sits outside our firewall. The export parfile
> > >>has these parameters:
> > >>
> > >>COMPRESS=Y
> > >>GRANTS=Y
> > >>INDEXES=Y
> > >>ROWS=Y
> > >>CONSTRAINTS=Y
> > >>TRIGGERS=Y
> > >>
> > >>
> > >>The import parfile has these commands:
> > >>
> > >>INDEXES=Y
> > >>GRANTS=Y
> > >>CONSTRAINTS=Y
> > >>ROWS=Y
> > >>IGNORE=Y
> > >>ANALYZE=N
> > >>
> > >>
> > >>The schema being exported/imported has some jobs associated with it,
> > >>that I don't want exported or imported, but that's happening. How do
> > >>I prevent this? I haven't found mention on jobs in the exp/imp
> > >>documentation, and a Metalink search didn't turn anything up.
> > >>
> > >>Thanks,
> > >>Harry Boswell
> > >If all that is needed is the data, use the TABLE=(<table list>) method instead of a FULL export..
> >
> > We also need the procedures and packages. It appears that to get
> > those, you have to get the jobs also.
> >
> >
> > >
>
> this should tidy it up - might have a typo, didn't eat dinner yet and
> brain is shutting down ...
>
> connect imported_user/pword
>
> begin
> for rec in (select job from user_jobs)
> loop
> execute immediate (exec dbms_job.remove(rec.job));
> end loop;
> end for;
> end;
>
> commit;
>
> that won't work if you're importing as a different user.
> e.g. running imp as system, the system account would own the jobs.
> you'd have to connect as the owner of the dbms_jobs.
>
> -bdbafh

its also worth setting job processes to zero before the import...otherwise they can start before you get a chance to blow them away.

-- 
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
ISBN: 1590592174

web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com

Coming Soon! "Oracle Insight - Tales of the OakTable"

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish,
and...he will sit in a boat and drink beer all day"

------------------------------------------------------------
Received on Tue Aug 10 2004 - 07:46:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US