2 Replies Latest reply on Jun 2, 2017 5:16 PM by 3054700



      Dear all,


      I'm trying to create a semantic model in a PDB, following the step from 1.14 Quick Start for Using Semantic Data. I'm used to do it in a non-CDB database and had no problem so far.


      I created a new PDB (mypdb) and I'm performing the following steps while logged as the newly created PDB administrator.


      At step 5, here is what happens:

      SQL> EXECUTE SEM_APIS.CREATE_SEM_MODEL('articles', 'articles_rdf_data', 'triple');
      BEGIN SEM_APIS.CREATE_SEM_MODEL('articles', 'articles_rdf_data', 'triple'); END;
      ERROR at line 1:
      ORA-13199:  Error in SDO_RDF.CREATE_RDF_MODEL: SQLERRM=ORA-13199: MIE: Model Id
      0 does not exist. SQLERRM=ORA-01403: no data found dss=
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF", line 2166
      ORA-06512: at "MDSYS.SDO_RDF", line 2204
      ORA-06512: at "MDSYS.RDF_APIS", line 1252
      ORA-06512: at line 1


      Another observation I made is while MDSYS schema exists in my PDB, the table SEM_MODEL$ is not present in it; SEM_MODEL$ is only present under MDSYS schema in the root:


      While logged as SYS:

      SQL> alter session set container=CDB$ROOT;
      Session altered.
      SQL> select count(*) from mdsys.sem_model$;
      SQL> alter session set container=mypdb;
      Session altered.
      SQL>  select count(*) from mdsys.sem_model$;
       select count(*) from mdsys.sem_model$
      ERROR at line 1:
      ORA-00942: table or view does not exist


      I don't know if this is related...


      Am I doing something wrong here?


        • 1. Re: CREATE_SEM_MODEL in a PDB

          Hi Fred,


          With a multi-tenant setup, you need to run sem_apis.create_sem_network() in each PDB that you want to use for RDF data. Semantic networks in each PDB are completely independent of each other. It's best not to create a semantic network in CDB$ROOT.


          Please do the following in this order:

          1) run sem_apis.drop_sem_network() in CDB$ROOT

          2) run sem_apis.create_sem_network() in mypdb

          3) create models, entailments, etc. in mypdb


          In the future, you can run sem_apis.create_semantic_network() in any new pdbs that will be used for RDF data management.


          Sorry for the confusion, it seems that our documentation is a bit lacking with respect to these multi-tenant issues.



          1 person found this helpful
          • 2. Re: CREATE_SEM_MODEL in a PDB

            Thank you very much Matt!