This discussion is archived
10 Replies Latest reply: Jul 20, 2010 6:48 AM by Marco Gralike RSS

Invalid XDB schema - how to identify

68212 Newbie
Currently Being Moderated
Hi,
My xdb schema has an invalid object, that according to user_objects is a XML schema:

select OBJECT_NAME,OBJECT_TYPE
from user_objects
where status != 'VALID';
OBJECT_NAME                      OBJECT_TYPE
------------------------------  -------------------
XDP5cTdCiCA6LgQOIKIAQUHQ==       XML SCHEMA
But I cannot figure out which schema it is, the object_name value looks like it should appear in user_xml_schemas.int_objname, but there are no matches. Where do I need to look?

Thanks

Pete
  • 1. Re: Invalid XDB schema - how to identify
    mdrake Expert
    Currently Being Moderated
    That appears to be the correct table. Can you try the query as sys using all_objects and all_xml_schemas joing by int_objname = object_name and retriveing schema_url and owner
  • 2. Re: Invalid XDB schema - how to identify
    68212 Newbie
    Currently Being Moderated
    Hi,
    When I query all_objects as sys I get no rows returned, but I can see it against that view connected as xdb.

    Pete
  • 3. Re: Invalid XDB schema - how to identify
    mdrake Expert
    Currently Being Moderated
    And I assume it's still there is you stop and restart the DB ?.. BTW did you register an XML Schema as XDB ?
  • 4. Re: Invalid XDB schema - how to identify
    68212 Newbie
    Currently Being Moderated
    Hi,
    No chance to stop and start.

    But yes I did register my own version of the XML schema xml.xsd.

    Pete
  • 5. Re: Invalid XDB schema - how to identify
    mdrake Expert
    Currently Being Moderated
    Ok, as XDB I can see the same thing in my instance, Is this affecting you in any way or is it idle curioristy. In general XDB is a locked account....
  • 6. Re: Invalid XDB schema - how to identify
    68212 Newbie
    Currently Being Moderated
    Mark,
    In a way it is just curiosity, but we have had so much trouble with schema registration and doing updates, I was having a look around to see if something was broken that could be fixed. But if you see this to, it is probably OK.

    Thanks

    Pete
  • 7. Re: Invalid XDB schema - how to identify
    mdrake Expert
    Currently Being Moderated
    Pete

    Can you try the following

    SQL> connect / as sysdba
    Connected.
    SQL> select schema_url from dba_xml_schemas, dba_objects
      2  where int_objname = object_name and status = 'INVALID';
    
    SCHEMA_URL
    --------------------------------------------------------------------------------
    niem/ansi-nist/2.0/ansi-nist.xsd
    niem/apco/2.0/apco.xsd
    niem/domains/emergencyManagement/2.0/emergencyManagement.xsd
    niem/domains/immigration/2.0/immigration.xsd
    niem/domains/infrastructureProtection/2.0/infrastructureProtection.xsd
    niem/domains/intelligence/2.0/intelligence.xsd
    niem/domains/internationalTrade/2.0/internationalTrade.xsd
    niem/domains/jxdm/4.0/jxdm.xsd
    niem/domains/screening/2.0/screening.xsd
    niem/edxl/2.0/edxl.xsd
    niem/edxl-cap/2.0/edxl-cap.xsd
    
    SCHEMA_URL
    --------------------------------------------------------------------------------
    niem/edxl-de/2.0/edxl-de.xsd
    niem/external/dhs-gmo/AS/mobileObject/1.0.0/mobileObject.xsd
    niem/external/dhs-gmo/AS/multiModalRoute/1.0.0/multiModalRoute.xsd
    niem/external/iai-ifc/rc2/dhs-gmo/1.0.0/IFC2X2_FINAL.xsd
    niem/external/ogc-observation/draft-0.14.5/om/dhs-gmo/1.0.0/commonObservation.xs
    d
    
    niem/external/ogc-observation/draft-0.14.5/om/dhs-gmo/1.0.0/event.xsd
    niem/external/ogc-observation/draft-0.14.5/om/dhs-gmo/1.0.0/observation.xsd
    niem/external/ogc-observation/draft-0.14.5/om/dhs-gmo/1.0.0/observationSpecializ
    ations.xsd
    
    SCHEMA_URL
    --------------------------------------------------------------------------------
    
    niem/external/ogc-observation/draft-0.14.5/om/dhs-gmo/1.0.0/om.xsd
    niem/external/ogc-observation/draft-0.14.5/om/dhs-gmo/1.0.0/procedure.xsd
    niem/external/ogc-observation/draft-0.14.5/om/dhs-gmo/1.0.0/procedureSpecializat
    ions.xsd
    
    niem/external/ogc-observation/draft-0.14.5/swe/dhs-gmo/1.0.0/discreteCoverage.xs
    d
    
    niem/external/ogc-observation/draft-0.14.5/swe/dhs-gmo/1.0.0/phenomenon.xsd
    niem/external/ogc-observation/draft-0.14.5/swe/dhs-gmo/1.0.0/recordType.xsd
    
    SCHEMA_URL
    --------------------------------------------------------------------------------
    niem/external/ogc-observation/draft-0.14.5/swe/dhs-gmo/1.0.0/swe.xsd
    niem/niem-core/2.0/niem-core.xsd
    niem/external/ogc-observation/draft-0.14.5/swe/dhs-gmo/1.0.0/temporalAggregates.
    xsd
    
    niem/external/ogc-openls/1.1.0/dhs-gmo/1.0.0/ols.xsd
    niem/external/ogc-swe-common/1.0.0/dhs-gmo/1.0.0/data.xsd
    niem/external/ogc-swe-common/1.0.0/dhs-gmo/1.0.0/parameters.xsd
    niem/external/ogc-swe-common/1.0.0/dhs-gmo/1.0.0/positionData.xsd
    niem/external/ogc-swe-common/1.0.0/dhs-gmo/1.0.0/sweCommon.xsd
    niem/geospatial/2.0/geospatial.xsd
    
    SCHEMA_URL
    --------------------------------------------------------------------------------
    niem/have/2.0/have.xsd
    common/ldsParaTypes.xsd
    common/ldsMusic.xsd
    common/ldsImageBlockTypes.xsd
    common/ldsScriptureElements.xsd
    common/ldsPoetry.xsd
    common/ldsTableBlock.xsd
    common/ldsBlockTypes.xsd
    common/ldsLists.xsd
    
    43 rows selected.
    
    SQL>
    This would be correct in my instance since these schemas were registered with the force option
  • 8. Re: Invalid XDB schema - how to identify
    Marco Gralike Oracle ACE Director
    Currently Being Moderated
    ...you got challenging stuff in your database

    ;-)
  • 9. Re: Invalid XDB schema - how to identify
    68212 Newbie
    Currently Being Moderated
    Hi,
    OK now I can see it:
    select schema_url,INT_OBJNAME from dba_xml_schemas, dba_objects
    where int_objname = object_name and status = 'INVALID'


    SCHEMA_URL
    --------------------------------------------------------------------------------
    INT_OBJNAME
    --------------------------------------------------------------------------------
    attribute_pan.xsd
    XDP5cTdCiCA6LgQOIKIAQUHQ==
    Sorry that I could not see this yesterday, thanks again.

    Pete
  • 10. Re: Invalid XDB schema - how to identify
    Marco Gralike Oracle ACE Director
    Currently Being Moderated
    ----------------
    -- Check
    ----------------
    
    SQL> select ax.schema_url,
      2         ax.local,
      3         ax.hier_type,
      4         ao.status
      5  from   ALL_XML_SCHEMAS ax
      6  ,      ALL_OBJECTS     ao
      7  where  ax.int_objname = ao.object_name
      8  and    ax.owner = user;
    
    SCHEMA_URL                                         LOC HIER_TYPE   STATUS
    -------------------------------------------------- --- ----------- -------
    Dictionary.xsd                                     YES NONE        VALID
    
    1 rows selected.
    
    ----------------
    -- PL/SQL Block
    ----------------
    
    set serveroutput on size 10000
    --
    declare 
    
         cursor getSchemaList 
         IS 
      select ax.schema_url 
         from   ALL_XML_SCHEMAS ax
         ,      ALL_OBJECTS     ao
         where  ax.int_objname = ao.object_name 
         and    ax.owner = user
         and    ao.status <> 'VALID';
         
    begin 
         FOR schema IN getSchemaList 
         loop 
           begin 
             dbms_output.put_line('Processing : ' || schema.schema_url); 
             dbms_xmlschema.compileSchema(schema.schema_url); 
             dbms_output.put_line('Compiled'); 
           exception when others then 
             dbms_output.put_line('Failed ('||SQLCODE||'): ' ||SQLERRM); 
           end; 
         end loop; 
    end; 
    / 
    --
    set serveroutput off
    
    ----------------
    -- Output
    ----------------
    
    SQL> declare
      2
      3     cursor getSchemaList
      4     IS
      5    select ax.schema_url
      6     from   ALL_XML_SCHEMAS ax
      7     ,      ALL_OBJECTS     ao
      8     where  ax.int_objname = ao.object_name
      9     and    ax.owner = user
     10     and    ao.status <> 'VALID';
     11
     12  begin
     13     FOR schema IN getSchemaList
     14     loop
     15       begin
     16         dbms_output.put_line('Processing : ' || schema.schema_url);
     17         dbms_xmlschema.compileSchema(schema.schema_url);
     18         dbms_output.put_line('Compiled');
     19       exception when others then
     20         dbms_output.put_line('Failed ('||SQLCODE||'): ' ||SQLERRM);
     21       end;
     22     end loop;
     23  end;
     24  /
    
    PL/SQL procedure successfully completed.
    
    SQL> set serveroutput on size 10000
    
    SQL> declare
      2
      3     cursor getSchemaList
      4     IS
      5    select ax.schema_url
      6     from   ALL_XML_SCHEMAS ax
      7     ,      ALL_OBJECTS     ao
      8     where  ax.int_objname = ao.object_name
      9     and    ax.owner = user
     10     -- and    ao.status <> 'VALID'
     11     ;
     12
     13  begin
     14     FOR schema IN getSchemaList
     15     loop
     16       begin
     17         dbms_output.put_line('Processing : ' || schema.schema_url);
     18         dbms_xmlschema.compileSchema(schema.schema_url);
     19         dbms_output.put_line('Compiled');
     20       exception when others then
     21         dbms_output.put_line('Failed ('||SQLCODE||'): ' ||SQLERRM);
     22       end;
     23     end loop;
     24  end;
     25  /
    
    Processing : Dictionary.xsd
    Compiled
    
    PL/SQL procedure successfully completed.
    
    SQL> set serveroutput off