This content has been marked as final. Show 4 replies
the following procedures i use in a package procedure and they work fine:
Both packages (dbms_xdb and dbms_xmlSchema) are granted to public.
Only the procedure dbms_xmlschema.registerSchema seems to work but generates no db objects with no error!
I have to wait on our dba. Afterwards i can test it again.
As I said you have to grant these DIRECTLY to the user that executes the package (and NOT via a ROLE or via PUBLIC).
Depending on implicit or explicit use of invokers/definer rights in your PL/SQL code, the grantee can be different.
-- can't check if /don't know by hart if the packages are owned by XDB or SYS grant execute on dbms_xmlschema to "your invoker/definer" grant execute on dbms_xdb.createresource to "your invoker/definer" grant execute on dbms_xdb.deleteresource to "your invoker/definer"
Edited by: Marco Gralike on Feb 22, 2013 5:46 PM
Internally Oracle makes use of VPD. If you register a XML Schema via a package for public use, that is use the parameter LOCAL => FALSE while using DBMS_XMLSCHEMA, you also need direct grants of all the privileges that are defined in the role XDBADMIN...
Users that do not have the XDBADMIN role are not allowed to register XML Schemas for public usage. Therefore I would really advise you to register schemas always for LOCAL usage. Granting XDBADMIN privileges to "the world", "PUBLIC", is not a good thing.
Edited by: Marco Gralike on Feb 22, 2013 5:50 PM