A quick dirty home grown solution is:
for i in 1 .. no_of_indexes loop
dbms_submit.submit(
index_builder(index_name, power(2,i));
end loop;
where index_builder does:
- the index build
- inserts power(i,2) into a log table
when 'select sum(log_table)' =
power(2,no_of_indexes+1)-1 then they are all done
hopefully you get what I'm describing here - basically
a bit in a bit stream for each index. Even sinpler is
to submit a new job which simply queries dba_jobs
every 'n' seconds until there are no more
'index_builder' jobs left at which point start the
dbms_stats
hth
connor
- Ryan <rgaffuri_at_cox.net> wrote: > RE: how to
notify when dbms_job completes?I have a
> variety of constraints and indices to run. Instead
> of running them one after another,. I want to use
> dbms_job to run them all at the same time.
>
> I thought the use of 'parallel' was an add-on that
> you had to pay extra for? We do not have the
> parallel query option enabled. Is that different
> then running index creation in parallel?
> ----- Original Message -----
> From: Jamadagni, Rajendra
> To: Multiple recipients of list ORACLE-L
> Sent: Tuesday, May 13, 2003 5:32 PM
> Subject: RE: how to notify when dbms_job
> completes?
>
>
> Maybe I am not clear ...
>
> creating index in parallel means your command will
> create index in parallel. Even if it runs in
> parallel, it is only one command. And as long as you
> follow the command with stats analyze, you will be
> okay.
>
> Now, if you mean you wish to create multiple
> indices in parallel, then my script would look
> something like ...
>
> create index ...;
> dbms_stats.gather...
>
> lather ; rinse; repeat
>
> Raj
>
>
>
> Rajendra dot Jamadagni at nospamespn dot com
> All Views expressed in this email are strictly
> personal.
> QOTD: Any clod can have facts, having an opinion
> is an art !
>
>
>
> -----Original Message-----
> From: rgaffuri_at_cox.net [mailto:rgaffuri_at_cox.net]
> Sent: Tuesday, May 13, 2003 4:27 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Re: how to notify when dbms_job
> completes?
>
>
>
> oh i think I figured it out.
>
> I register a listener with dbms_alert for every
> dbms_job I run. I then have my jobs alert the
> listener when complete.
>
> my main thread will have a counter for every job
> inside a loop.
>
> for i=0;i<wait_count;i++
> sleep.
> wake when alerted.
>
> finish loop when all alerts come in
> do analyze
>
> yes I know that isnt pl/sql syntax. I Think that
> will work.
>
>
Connor McDonald
web:
http://www.oracledba.co.uk
web:
http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com
"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"
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
INET: hamcdc_at_yahoo.co.uk
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Wed May 14 2003 - 00:11:51 CDT