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!

ORA-31603 encountered using dbms_metadata.get_ddl

user545194May 17 2022 — edited May 17 2022

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!

Comments
Post Details
Added on May 17 2022
2 comments
962 views