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!

Unable to use DBMS_METATDATA.GET_DDL for Materialized Views on 11g

C PatelNov 8 2012 — edited Nov 8 2012
Hi, we recently upgraded our 10.2.0.4.0 database to 11.2.0.3.0. I am unable to extract the DDL, using DBMS_METATDATA.GET_DDL, for materialized views owned by the owner which I log in as. This works for tables, views, procs, etc, but not for any MV's for some reason. I've verified that the user has been granted SELECT_CATALOG_ROLE. I am able to extract the DDL on the 10g copy of the same database with the same MV's without any issue. Any ideas what could cause this problem?
select dbms_metadata.get_ddl('MATERIALIZED_VIEW','MV_SAMPLE','TEST') 
 from dual;

ORA-31603: object "MV_SAMPLE" of type MATERIALIZED_VIEW not found in schema "TEST'"
ORA-06512: at "SYS.DBMS_METADATA", line 5088
ORA-06512: at "SYS.DBMS_METADATA", line 7589
ORA-06512: at line 1
31603. 00000 -  "object \"%s\" of type %s not found in schema \"%s\""
*Cause:    The specified object was not found in the database.
*Action:   Correct the object specification and try the call again.
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2012
Added on Nov 8 2012
1 comment
525 views