4 Replies Latest reply on Jan 13, 2018 12:01 PM by SemanticGuy

    Semantic support in 12cR2 docker version?

    c8dfad43-d35f-4168-b6e2-80d3e9b19916

      Hello,

       

      I have installed a docker that contains Oracle database 12c R2 from the docker store (https://store.docker.com/images/oracle-database-enterprise-edition ).

      Although I enjoy the user-friendliness  of the docker-ized version of oracle database, I am not sure if semantic features are enabled.

       

      I can log in using sys user as sysdba, create table and tablespaces but I cannot use the sem_api package. For example, when I try to create a semantic network

      using the command (EXECUTE SEM_APIS.CREATE_SEM_NETWORK('rdf_tblspace');) I get the following error:

      ERROR at line 1:

      ORA-06598: insufficient INHERIT PRIVILEGES privilege

      ORA-06512: at "MDSYS.RDF_APIS", line 1

      ORA-06512: at line 1

       

      I have already created the respective tablespace in a previous step.

       

      It seems like a permission issue but since I used sys user with sysdba permissions, it made me think that something is not right with the sem_apis  installation.

      But the output of the "desc sem_apis" command seems OK as i get a list of the description of semantic functions and procedures.

      On the other hand, I am able to execute scripts like this one: @$ORACLE_HOME/md/admin/catsem.sql with no errors.

       

      The docker instructions mention explicitly that database options and patching is not supported. I am wondering if any of these  limitations are disabling (directly or indirectly) the semantic support

      or I am just missing something else. I think that partitioning is disabled in this version and I read that it could affect the functionality of the semantic features. However, I would expect a different kind of error in this case.

      I would like to confirm that docker supports Spatial and Graph features,  so that I can proceed to a native installation if this is not the case.

       

      Thank you and best regards,

      Dina

        • 1. Re: Semantic support in 12cR2 docker version?
          alwu-Oracle

          Can you please run the SEM_APIS.CREATE_SEM_NETWORK API as SYSTEM (not SYS)?

           

          Thanks,

           

          Zhe Wu

          • 2. Re: Semantic support in 12cR2 docker version?
            c8dfad43-d35f-4168-b6e2-80d3e9b19916

            Thanks a lot for the quick reply.

             

            I ran the command as system and now I get the following error:

             

            ORA-13199: Error during RDF Network creation: step_num=2 SQLERRM=ORA-00439:

            feature not enabled: Partitioning. Error backtrace is: ORA-06512: at

            "MDSYS.SDO_RDF_INTERNAL", line 21608

            ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 21603

            ORA-06512: at "MDSYS.MD", line 1723

            ORA-06512: at "MDSYS.MDERR", line 17

            ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 22728

            ORA-06512: at "MDSYS.SDO_RDF", line 8432

            ORA-06512: at "MDSYS.SDO_RDF", line 8450

            ORA-06512: at "MDSYS.RDF_APIS", line 1490

            ORA-06512: at line 1

            So I guess it is the partitioning feature that is not enabled in docker and affects the semantic functionality. \

             

            Thanks again!

            Dina

            • 3. Re: Semantic support in 12cR2 docker version?
              alwu-Oracle

              Hi Dina,

               

              You guessed right. The semantic functionality requires: 1) Oracle Database Enterprise Edition,  2) Oracle Spatial and Graph option, and 3) Partitioning.

               

              Hope it clarifies,

               

              Zhe Wu

              • 4. Re: Semantic support in 12cR2 docker version?
                SemanticGuy

                Hi....

                 

                I've been working with docker semantic extensions in a very similar way.

                 

                I've installed extensions by copying following script (named 01SemanticExtension.sh) into $ORACLE_BASE/scripts/startup with a docker COPY line... I hope it helps as source of inspiration.

                 

                 

                ORACLE_SID="`grep $ORACLE_HOME /etc/oratab | cut -d: -f1`"

                ORACLE_PDB="`ls -dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep -v pdbseed | awk '{print $9}' | cut -d/ -f6`"

                ORAENV_ASK=NO

                source oraenv

                 

                 

                sqlplus / as sysdba << EOF

                EXECUTE mdsys.enableGeoRaster;

                EOF

                 

                 

                 

                 

                sqlplus / as sysdba << EOF

                @'$ORACLE_HOME/md/admin/catsem.sql';

                @'$ORACLE_HOME/md/admin/sdordfwm.sql';

                EOF

                 

                 

                sqlplus / as sysdba << EOF

                CREATE TABLESPACE rdf_tblspace

                DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/rdf_tblspace.dat' SIZE 1024M REUSE

                AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED

                SEGMENT SPACE MANAGEMENT AUTO;

                EOF

                 

                sqlplus / as sysdba << EOF

                -- USER SQL

                alter session set "_ORACLE_SCRIPT"=true;

                CREATE USER SEMANTICUSER IDENTIFIED BY "####SEMANTICUSERPWD####"  ;

                [....here you grant proper permissions to SEMANTICUSER depending on the use you will like to give]

                GRANT CREATE DATABASE LINK TO SEMANTICUSER ;

                EOF

                 

                sqlplus SEMANTICUSER/####SEMANTICUSERPWD#### << EOF

                EXECUTE SEM_APIS.CREATE_SEM_NETWORK('rdf_tblspace');

                EOF