DBMS LOB.SUBSTR Throwing ORA-00904: Invalid Identifier Error

sunil kumar picture sunil kumar · Apr 12, 2012 · Viewed 13.3k times · Source

One of our cutomer is running the scripts in oracle sql developer to upgrade his database table structure, procudere & triggers etc. But while running the script, he is getting ORA-00904: Invalid Identifier Error for DBMS_LOB.SUBSTR() and DBMS_LOB.GETLENGTH() in one procedure.

Can somebody tell why is happening so?

There are using Oracle Sql developer Version 3.1.07 Build MAIN-07.42 with Oracle 11g.

Answer

Marcin Wroblewski picture Marcin Wroblewski · Apr 12, 2012

I imagine 3 possible reasons:

  1. the user lacks execute privilege on sys.dbms_lob (although the privilege is granted to PUBLIC by default)
  2. there is no synonym dbms_lob for sys.dbms_lob in the database (although such public synonym should exist)
  3. the schema, on which the customer works, contains some other package with the same name DBMS_LOB