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