FAQ
The proc generates the 'exec dbms_stats ' statements for all the users. Are you saving the output and running it manually or not. IT would have the same statements that you run one by one. Jose Luis Delgado wrote:
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?TIAJLcreate or replace procedure get_statistics ascursor get_users_list isselect usernamefrom dba_userswhere username != 'SYS' and username != 'SYSTEM';beginfor i in get_users_listloopdbms_output.put_line('execdbms_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 DelgadoINET: joseluis_delgado@yahoo.comFat City Network Services -- 858-538-5051 http://www.fatcity.comSan Diego, California -- Mailing list and web hosting services---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing).
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: 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).

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedDec 11, '03 at 5:14p
activeDec 11, '03 at 5:14p
posts1
users1
websiteoracle.com

1 user in discussion

Ryan_oracle_at_cox.net: 1 post

People

Translate

site design / logo © 2022 Grokbase