Analyze a synonym
466941Dec 19 2005 — edited Dec 19 2005Hi,
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,