September 2010
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
27282930  

Oracle DBA, Analyze table using PL/SQL

Below are the steps to re-tuning up your database;

Alter database enable restrict session;
1- Backup it firts
2- from each table alter table rebuild online
3- rebuild indexes

Analyze table using pl/slq
declare
tablename varchar2(50);
CURSOR c1 is select table_name from tabs;
BEGIN
open c1;
loop
fetch c1 into tablename;
EXIT WHEN c1%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('ANALYZE table '||tablename||' ESTIMATE STATISTICS;');
end loop;
end;

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>