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

Home -> Community -> Usenet -> c.d.o.misc -> Re: newbie plsql

Re: newbie plsql

From: Norbert Ferstl <ferstl_at_netway.at>
Date: 1997/10/09
Message-ID: <343D1C9B.3D85C0D4@netway.at>#1/1

Nuno Martins wrote:
>
> Hi,
>
> i´m tring to write a block in plsql . The ideia is to drop an index and
> re-create the same index again ( desfragmentation ) .
> But i have a problem after i drop the index , i don´t know how to
> commit, and the create index fails because it thas not have space ( the
> create index allocates the same extents that the index had ) .
>
> begin
> ....
> dbms_sql.parse(cursor,'drop index ISALES',0);
> i:=dbms_sql.execute(cursor);
> dbms_sql.close_cursor(cursor);
> commit;
> dbms_sql.parse(cursor,'create index ISALES on SALES (......) ... ',0);
> i:=dbms_sql.execute(cursor);
> dbms_sql.close_cursor(cursor);
> ...
> end;
>
> Have you ever had the same problem ?
>
> Nuno
> PORTUGAL
Since 7.3
alter index .. rebuild;
will do it for you

Norbert

-- 
=====================================
Norbert Ferstl
DI Forsthuber GmbH
Kohlbauernstr. 17
A-2630 Ternitz, AUSTRIA
Tel: +43 2630 382500
Fax: +43 2630 3825014
<ferstl_at_netway.at>
=====================================
Received on Thu Oct 09 1997 - 00:00:00 CDT

Original text of this message

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