--
connect &METADATAOWNER/&METADATAPASSWORD@&TNSALIAS
--
alter session set events='31098 trace name context forever'
/
begin
  dbms_xmlschema.registerSchema
  (
    schemaURL       => :SCHEMA_URL,
    schemaDoc       => xdbURIType(:SCHEMA_LOCATION).getClob(),
    local           => FALSE,
    genTypes        => TRUE,
    genTables       => TRUE,
    owner           => :METADATAOWNER,
    enableHierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_RESMETADATA
  ); 
end;
/
create or replace public synonym IMAGE_METADATA_TABLE for IMAGE_METADATA_TABLE
/
grant select,insert,update,delete on IMAGE_METADATA_TABLE to public
/
create table IMAGE_METADATA_ERROR_TABLE of XMLTYPE
XMLType store as BINARY XML
/
grant select, insert, update, delete on IMAGE_METADATA_ERROR_TABLE to public
/
create or replace public synonym IMAGE_METADATA_ERROR_TABLE for IMAGE_METADATA_ERROR_TABLE
/
disconnect
--
