dbms_stats [message #129745] |
Tue, 26 July 2005 08:48 |
balavignesh
Messages: 180 Registered: March 2005
|
Senior Member |
|
|
hai ,
we are using statspack to tune the performance of the db.based on the report generated, we have to generate the statistics for the objects to trigger CBO.we have used dbms_stats.get_table_stats function for the same.
it worked out good while gathering the statistics for one table which has 100 rows and did nt work out while gathering for the table having 3 rows and blown the errors as follows.
ERROR at line 1:
ORA-20000: Unable to get values for table TEST
ORA-06512: at "SYS.DBMS_STATS", line 2647
ORA-06512: at line 10
our procedure is as follows
------------------------------------------
declare
numrows integer;
numblks integer;
avglen integer;
begin
dbms_stats.get_table_stats('SYSTEM','TEST',null,null,null,numrows,numblks,avglen);
--dbms_stats.get_table_stats('TCMS_DATA','AUDITLOG',null,null,null,numrows,numblks,avglen);
dbms_output.put_line('numrows='||numrows||'numblks='||numblks||'avglen='||avglen);
end;
------------------------------------------
we have given the execute privilege for that package to public even then does not work out.how to fix this...?plz help.
regards
bala
[Updated on: Tue, 26 July 2005 08:49] Report message to a moderator
|
|
|
|
|
|