Forum Stats

  • 3,826,078 Users
  • 2,260,593 Discussions
  • 7,896,782 Comments

Discussions

ORA-31603 encountered using dbms_metadata.get_ddl

user545194
user545194 Member Posts: 605 Bronze Badge
edited May 17, 2022 8:54AM in SQL & PL/SQL

Hi,

Env: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production, Version 19.11.0.0.0"

We are encountering the following error: ORA-31603 encountered using dbms_metadata.get_ddl

select sys.dbms_metadata.get_ddl ('VIEW', 'SOME_VIEW', 'USER2') from dual;

ERROR:

ORA-31603: object "SOME_VIEW" of type VIEW not found in schema "USER2" ...

Even after granting the role; "grant select_catalog_role to User1;" to a user with the DBA role the error still persists.

Other checks done:

  • Underlying tables exist
  • View exists and is valid
  • All other necessary privileges, e.g. "select any table.." are set for this user.

Any ideas appreciated. Thanks!

Tagged:

Answers