Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Analyze a synonym

466941Dec 19 2005 — edited Dec 19 2005
Hi,

I am facing a problem in analyzing the synonym.

I have created a table abc in schema1. Granted all the privilleges on that table to schema2. In schema2, I have created synonym xyz for table schema1.abc.

When I analyze the synonym xyz using the following statement.

DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=> UPPER(P_SCHEMA_OWNER), TABNAME=> UPPER(P_OBJ_NAME), ESTIMATE_PERCENT=> dbms_stats.auto_sample_size, degree=> 2, CASCADE=> TRUE);

DBMS_OUTPUT.put_line ('Statistics gathered for object ''' || UPPER(P_SCHEMA_OWNER)|| '.' || UPPER(P_OBJ_NAME) || '''');


But I am getting the following error:

ORA-20000: Object does not exist or insufficient privileges to analyze

Is it possible to analyze the synonym.??

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2006
Added on Dec 19 2005
5 comments
1,344 views