Ooopppssss...
Sorry... I sent the testing proc... this is the
original...
procedure get_statistics as
cursor get_users_list is
select username
from dba_users
where username != 'SYS' and username != 'SYSTEM';
begin
for i in get_users_list
loop
dbms_stats.gather_schema_stats(ownname=>
chr(39)||i.username||chr(39), cascade=> TRUE);
end loop;
end;
- "Jamadagni, Rajendra"
<Rajendra.Jamadagni_at_espn.com> wrote:
> after running the block, do you actually spool the
> output and run that??
>
> 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-----
> Sent: Thursday, December 11, 2003 11:09 AM
> To: Multiple recipients of list ORACLE-L
>
>
> List...
>
> SunOS 5.8, Oracle 8.1.6 (and 8.1.7 too).
>
> I use the proc at the bottom to generate statistics.
>
> It seems to work, but if I check statistics with:
>
> select owner, table_name, num_rows, blocks,
> av_row_len,
> to_char(last_analyzed, 'MM/DD/YYYY HH24:MI:SS')
> from dba_tables;
>
> the tables have the OLD last_analyzed time!
>
> but... If I execute ONE by ONE:
>
> exec dbms_stats.gather_schema_stats(ownname =>
> 'PERFSTAT', cascade => TRUE);
>
> it works fine!!...
>
> So, am I doing something wrong?
>
> Any help?
>
> TIA
> JL
>
> create or replace procedure get_statistics as
> cursor get_users_list is
> select username
> from dba_users
> where username != 'SYS'
> and username != 'SYSTEM';
>
> begin
> for i in get_users_list
> loop
> dbms_output.put_line('exec
> dbms_stats.gather_schema_stats(ownname =>
> '||chr(39)||i.username||chr(39)||', cascade =>
> TRUE);');
> end loop;
> end;
> /
>
>
>
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.net
> --
> Author: Jose Luis Delgado
> INET: joseluis_delgado_at_yahoo.com
>
> 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).
>
>
> This e-mail message is confidential, intended only
> for the named recipient(s) above and may contain
> information that is privileged, attorney work
> product or exempt from disclosure under applicable
> law. If you have received this message in error, or
> are not the named recipient(s), please immediately
> notify corporate MIS at (860) 766-2000 and delete
> this e-mail message from your computer, Thank you.
>
**************************************************************************************4
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.net
> --
> Author: Jamadagni, Rajendra
> INET: Rajendra.Jamadagni_at_espn.com
>
> 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).
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jose Luis Delgado
INET: joseluis_delgado_at_yahoo.com
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 Thu Dec 11 2003 - 11:19:33 CST