Skip to Main Content

Oracle Database Discussions

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-31600 with dbms_metadata

user12158503Jul 29 2010 — edited Jul 29 2010
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?
This post has been answered by 591186 on Jul 29 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2010
Added on Jul 29 2010
2 comments
1,273 views