Home » SQL & PL/SQL » SQL & PL/SQL » how to gather statistics in oracle 9i (database-oracle 9i(9.2), os- linux(RHEL3))
how to gather statistics in oracle 9i [message #417575] Mon, 10 August 2009 05:48 Go to next message
suryakantnirala
Messages: 19
Registered: May 2009
Location: Mumbai
Junior Member
where i am gather statistics using dbms_stats

"sql>exec dbms_stats.gather_schema_stats ( -
ownname => 'DOMAIR', -
options => 'GATHER', -
estimate_percent => dbms_stats.auto_sample_size, -
method_opt => 'for all columns size auto', -
cascade => true, -
degree => 5 -
)
/"

then it's display an error which is given below

/
"BEGIN dbms_stats.gather_schema_stats ( ownname => 'DOMAIR',
options => 'GATHER', estimate_percent => dbms_stats.auto_sample_
size, method_opt => 'for all columns size auto', cascade
=> true, degree => 5 ); END;

*
ERROR at line 1:
ORA-06521: PL/SQL: Error mapping function
ORA-06512: at "SYS.DBMS_STATS", line 10301
ORA-06512: at "SYS.DBMS_STATS", line 10795
ORA-06512: at "SYS.DBMS_STATS", line 10982
ORA-06512: at "SYS.DBMS_STATS", line 11036
ORA-06512: at "SYS.DBMS_STATS", line 11013
ORA-06512: at line 1


SQL> SP2-0103: Nothing in SQL buffer to run."



please help me solve it
Re: how to gather statistics in oracle 9i [message #417619 is a reply to message #417575] Mon, 10 August 2009 09:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It works for me.
SQL> ed
Wrote file afiedt.buf

  1  BEGIN dbms_stats.gather_schema_stats ( ownname => 'DBADMIN',
  2  options => 'GATHER', estimate_percent => dbms_stats.auto_sample_size,
  3* method_opt => 'for all columns size auto', cascade => true, degree => 5 ); END;
SQL> /

PL/SQL procedure successfully completed.

SQL> 



so can't be sure whether you have error of omission or commission.

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.
Re: how to gather statistics in oracle 9i [message #417637 is a reply to message #417575] Mon, 10 August 2009 12:17 Go to previous message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Works for me.

Looks like you might be doing this as part of some EXECUTE IMMEDIATE or something else unconventional, but it's only a guess as you only show us partial information.
Previous Topic: PIVOT query
Next Topic: Identifying Dates and Create Coverage Periods
Goto Forum:
  


Current Time: Fri Feb 14 16:42:51 CST 2025