Friday, February 17, 2012

DBMS_DDL Error

when the package dbms_ddl is used, I get an error message as given below .

Pl SQL Code :

begin
dbms_ddl.analyze_object('table','scott','emp','com pute');
end;

error message :

ERROR at line 1
ORA-20000: Unable to analyze table "scott"."emp", insufficient privileges or does not exist
ORA-06512: at "SYS.DBMS_DDL",line 192
ORA-06512: at line 2

-----------

I have checked and the table does exist under the same schema(viz. SCOTT). So I think it is a privilege problem. What may be the privileges( other than the owner privilege) that may be required for the succesful execution of this PL/SQL code?

TIA for assistanceDoes your user has the right to execute package dbms_dll ?|||HI,

The table name and schema name have to be in the correct case for the package to work.

dbms_ddl.analyze_object('TABLE','SCOTT','EMP','COM PUTE');

Parameter descriptions for the ANALYZE_OBJECT procedure specifies the SCHEMA and object NAME are both case sensitive.

No comments:

Post a Comment