Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use DBMS_STATS.gather_schema_stats

Status
Not open for further replies.

Ogzilal

MIS
Oct 9, 2003
280
FR
Hi,

I have a database 9.2.0 on whitch I want to gather stats using DBMS_STATS.gather_schema_stats method instead of ANALYZE.

When I do the following under sqlplus, I get an error
Code:
  1  exec SYS.DBMS_STATS.gather_schema_stats(
  2         ownname => 'MYUSER',
  3         estimate_percent => NULL,
  4         method_opt => 'for all indexed columns size 10',
  5         options => 'GATHER STALE',
  6         cascade => TRUE)
  7* /
SQL> /
exec SYS.DBMS_STATS.gather_schema_stats(
*
ERROR at line 1:
ORA-00900: invalid SQL statement

Do I have to run some package on my database before using DBMS_STATS

In advance, thank you

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top