ORA-31600 with dbms_metadata
Hi,
I am worjking on refreshing my test db through an export/import. (My db is 11.1.0.7 and the OS is Linux platform - x86-64.) So,for the import, I do a GRANT=EXCLUDE since the users are different and I want to generate the grants myself. My problem is -
Consider that I am going to refresh prodtest schema of dev db from the prodprod schema of prod db. The application users access the prodtest schema through another user called prodapptest. I want to know how In can get all the grants given to the user prodapptest. I tried -
select dbms_metadata.get_granted_ddl( 'TABLES', 'PRODAPPTEST', 'COMPATIBLE', 'ORACLE', 'DDL', 10000) from dual;
And this gives me the error -
ERROR:
ORA-31600: invalid input value TABLES for parameter OBJECT_TYPE in function
GET_GRANTED_DDL
ORA-06512: at "SYS.DBMS_METADATA", line 3110
ORA-06512: at "SYS.DBMS_METADATA", line 3165
ORA-06512: at "SYS.DBMS_METADATA", line 4960
ORA-06512: at line 1
I tried this query with grantee ->PRODTEST also and it gives me the same error. I tried it from both prodtest schema and prodapptest schema . Can someone please tell me how I can get the grants for user prodapptest?