pl/sql simple help - analyze table avail?
Date: Sun, 26 Mar 1995 14:01:05
Message-ID: <odysscci.258.000E0507_at_teleport.com>
I created a procedure in pl/sql and the whole thing compiles and runs except
if I uncomment 1 line. Of course that one line is hte whole purpose of the
procedure. The purpose of this procedure is to run analyze on the whole
shooting match (except system and sys). Here is the code:
create or replace procedure analyze_all is
cursor c1 is
BEGIN
commit;
select table_name,owner from all_tables where owner not in('SYS','SYSTEM');
list_to c1%ROWTYPE;
tabName varchar2(255);
open c1;
loop
fetch c1 into list_to;
exit when c1%NOTFOUND;
tabName:= list_to.owner ||'.' ||list_to.table_name ;
end loop;
close c1;
END analyze_all;
I have tried execute immediate and building a string for that.
Anyone have some suggestions? I would prefer that this was a stored procedure that some process can kick off every so often.
TIA,
Jim Kennedy
Received on Sun Mar 26 1995 - 14:01:05 CEST