ANALYZE OBJECT PROBLEM !!

OPERATING SYSTEM : WINDOWSXP SERVICE PACK 2
PRODUCT : ORACLE 9.X RE. 1.0.1.0.1.1

OUT CRY : SOLVE THIS ERROR PLEASE

SQL> connect hr/hr
Connected.
SQL> execute analyze_object('TABLE','EMPLOYEES');
BEGIN analyze_object('TABLE','EMPLOYEES'); END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'ANALYZE_OBJECT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
LVL 1
vegetasharmaAsked:
Who is Participating?
 
SujithConnect With a Mentor Data ArchitectCommented:
There is a package for gathering the statistics of objects, called DBMS_STATS. You may use that better.

exec dbms_stats.gather_table_stats('HR', 'EMPLOYEES');

If you dont have execute privs on either of DBMS_DDL or DBMS_STATS you may issue an analyze command to gather the statistics. e.g

analyze table employees compute statistics
/
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
any better like this:

execute DBMS_DDL.analyze_object('TABLE','EMPLOYEES');

0
 
vegetasharmaAuthor Commented:
I do not know how can I get privilege to execute that !!
please explain !!
0
 
vegetasharmaAuthor Commented:
I think master sujith solved my problem!!

Thanks for your excuse !!

bye the way if you have kindness please tell me how can I grant previlege for excuting
'analyze object'  by any user or specify user. however it's not neccessary yet because you resolved
my damn problem.

Thanks once again !!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.