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 -> stored procedure

stored procedure

From: Alessandro Benati <webmaster_at_gsisrl.it>
Date: Tue, 14 Sep 1999 23:11:12 +0200
Message-ID: <37DEB9F0.FE51EA5F@gsisrl.it>


I need to make a stored procedures that deallocates the unused space for all tables of a given schema. I've tried to do something like this, but it doesn't work:

create procedure proc as
tab_name varchar2;
beegin
declare cursor c1 is

    select table_name from all_tables where owner='myowner'; open c1;
loop
fetch c1 into tab_name;
dbms_sql.execute('ALTER TABLE ' || table_name || ' DEALLOCATE UNUSED;');

end loop;
close c1;
end proc;


Where is the error?
Thank you to anyone will help me.
Alessandro Benati Received on Tue Sep 14 1999 - 16:11:12 CDT

Original text of this message

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