Update
The following privileges are required to register an XML schema:
grant alter session to <USER>;
grant create type to <USER>;
grant create table to <USER>;
For some reason, this is not enough if these privileges are granted indirectly through roles, but privileges should be granted directly to the schema / user.
Original answer
, gentables gentypes insufficient privileges. , , , . , .
Oracle Database 11g Release 11.2.0.1.0
gentypes = > true, gentables = > true
dbms_xmlschema.registerschema(schemaurl => name,
schemadoc => xmltype(schema),
local => true
--gentypes => false,
--gentables => false
);
ORA-01031: insufficient privileges
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 55
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 159
ORA-06512: at "JANI.XML_VALIDATOR", line 38
ORA-06512: at line 7
gentypes = > false, gentables = > true
dbms_xmlschema.registerschema(schemaurl => name,
schemadoc => xmltype(schema),
local => true,
gentypes => false
--gentables => false
);
ORA-31084: error while creating table "JANI"."example873_TAB" for element "example"
ORA-01031: insufficient privileges
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 55
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 159
ORA-06512: at "JANI.XML_VALIDATOR", line 38
ORA-06512: at line 7
gentypes = > true, gentables = > false
dbms_xmlschema.registerschema(schemaurl => name,
schemadoc => xmltype(schema),
local => true,
--gentypes => false
gentables => false
);
ORA-01031: insufficient privileges
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 55
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 159
ORA-06512: at "JANI.XML_VALIDATOR", line 38
ORA-06512: at line 7
gentypes = > false, gentables = > false
dbms_xmlschema.registerschema(schemaurl => name,
schemadoc => xmltype(schema),
local => true,
gentypes => false,
gentables => false
);
PL/SQL procedure successfully completed.