10 Replies Latest reply on Apr 12, 2010 1:38 PM by Matperry-Oracle

    enabling Semantic Technologies Support in 11gr2 help needed

    629738
      Hi,
      I installed fresh copy of 11gr2 with the purpose to testdrive oracle's support for RDF.
      Reading the manual (http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/sem_enable.htm#CHDHEABD) all I need to do is execute one script (@$ORACLE_HOME/md/admin/catsem.sql) and all will be fine. I managed to get this part wrong, so I suspect I have a partially installed mess....for this purpose I'm gonna set-up brand new database and start over, however I am not certain about the prerequisites, the manual is very vague there:
      Do I need to do something special to get Spatial and Partitioning installed? When using dbca I have them checked, so I assume this is all I have to do.

      cheers
        • 1. Re: enabling Semantic Technologies Support in 11gr2 help needed
          Matperry-Oracle
          Hi,

          You are correct. You don't have to do anything special to install Spatial and Partitioning. Just make sure you use Oracle Database 11g Enterprise Edition and check the Spatial and Partitioning options when installing. Then to install Semantic Technologies, just run the catsem.sql script that you mentioned.

          Hope this helps,
          -Matt
          • 2. Re: enabling Semantic Technologies Support in 11gr2 help needed
            638832
            Hello....
            I have installed Oracle Enterprise Edition 11 and want to enable semantic technologies support. I tried to follow the steps written in the documentation
            http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/sem_enable.htm#CHDDBGFH but can't seem to find the casem.sql in the: @%ORACLE_HOME%\md\admin\catsem.sql.....I have only catsem10i.sql and catsem11i.sql....but these scripts do not create the tables specific to semantic technologies support like MDSYS.RDF_PARAMETER table.

            Can you please help me?

            Thank you
            • 3. Re: enabling Semantic Technologies Support in 11gr2 help needed
              Matperry-Oracle
              Hi,

              It looks like you may have an 11g Release 1 database (11.1.x.x.x). The installation instructions you are referring to are for 11g Release 2 (11.2.0.1.0). You can use the following query to check your database version.

              SQL> select * from v$version where banner like 'Oracle%';

              BANNER
              --------------------------------------------------------------------------------
              Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
              • 4. Re: enabling Semantic Technologies Support in 11gr2 help needed
                638832
                Hi.

                Yes, you are right, i am using Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production. The version 11g Release 2(11.2.0.1.0) is for other operating systems then Windows, i have Windows on my machine so i cannot upgrade to version 11g Release 2(11.2.0.1.0).
                Do you know how to proceed with the Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 version?

                Thank you,
                Catalin
                • 5. Re: enabling Semantic Technologies Support in 11gr2 help needed
                  Matperry-Oracle
                  To enable Semantic Technologies in 11g Release 1, just run the catsem11i.sql script.

                  You can find more information about about 11g Release 1 Semantic Technologies here:
                  http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28397/toc.htm

                  More information on installation is here:
                  http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28397/sdo_rdf_concepts.htm#CIHHBFEH

                  There is also a Semantic Technologies patch available on Metalink for 11g Release 1 (interim patch 7600122) that you may want to install.
                  This patch adds support for OPTIONAL graph patterns in SEM_MATCH and support for Virtual Models.

                  Cheers,
                  Matt
                  • 6. Re: enabling Semantic Technologies Support in 11gr2 help needed
                    638832
                    Hello....

                    When i run the script catsem11i.sql i get some errors.... here is the log for the script:

                    line 1: SQLPLUS Command Skipped: set echo off

                    install 11 RDF


                    line 27: SQLPLUS Command Skipped: set echo off


                    check privileges


                    anonymous block completed

                    line 43: SQLPLUS Command Skipped: COLUMN :script_name NEW_VALUE comp_file NOPRINT

                    line 44: SQLPLUS Command Skipped: VARIABLE script_name VARCHAR2(50)

                    Commit

                    Error starting at line 46 in command:
                    declare
                    type_102_exists NUMBER;
                    network_102_exists NUMBER;
                    synonym_102_exists NUMBER;
                    attr_102_exists NUMBER;
                    col_102_exists NUMBER;
                    dep_102_exists NUMBER;
                    begin
                    -- see if 10.2 SDO_RDF_TRIPLE_S type is present in DB
                    SELECT count(*) INTO type_102_exists FROM ALL_TYPE_ATTRS
                    WHERE type_name='SDO_RDF_TRIPLE_S' AND attr_name='RDF_T_ID'
                    AND owner='MDSYS';

                    if (type_102_exists > 0) then
                    -- see if 10.2 RDF Network is present in DB
                    SELECT count(*) INTO network_102_exists FROM ALL_TABLES
                    WHERE table_name='RDF_BLANK_NODE$' AND owner='MDSYS';

                    -- if RDF network present, copy RDF_MODEL$ content and then drop network
                    -- Note: RDF network may be present, but models may or may not be!

                    if (network_102_exists > 0) then
                    raise_application_error(-20000,
                    'Cannot proceed. RDF network exists from Oracle RDF 10.2 version.');
                    end if;

                    -- ensure no extra synonyms based on: SDO_RDF_TRIPLE and SDO_RDF_TRIPLE_S
                    SELECT count(*) INTO synonym_102_exists FROM ALL_SYNONYMS
                    WHERE table_name IN ('SDO_RDF_TRIPLE_S','SDO_RDF_TRIPLE')
                    AND (owner!='PUBLIC' OR
                    synonym_name NOT IN ('SDO_RDF_TRIPLE_S','SDO_RDF_TRIPLE'));

                    if (synonym_102_exists > 0) then
                    raise_application_error(-20000,
                    'Cannot proceed. Extra synonyms based on RDF 10.2 types exist (count=' ||
                    synonym_102_exists || ')');
                    end if;

                    -- ensure no other type w/ attr of type SDO_RDF_TRIPLE and SDO_RDF_TRIPLE_S
                    SELECT count(*) INTO attr_102_exists FROM ALL_TYPE_ATTRS
                    WHERE attr_type_name IN ('SDO_RDF_TRIPLE_S','SDO_RDF_TRIPLE')
                    AND attr_type_owner IN ('PUBLIC','MDSYS');

                    if (attr_102_exists > 0) then
                    raise_application_error(-20000,
                    'Cannot proceed. Types with attrs of RDF 10.2 types exist (count=' ||
                    attr_102_exists || ')');
                    end if;

                    -- NOTE: this must be done after synonym and type check
                    -- ensure no tables with cols of type: SDO_RDF_TRIPLE and SDO_RDF_TRIPLE_S
                    SELECT count(*) INTO col_102_exists FROM ALL_TAB_COLS
                    WHERE data_type IN ('SDO_RDF_TRIPLE_S','SDO_RDF_TRIPLE')
                    AND data_type_owner IN ('PUBLIC','MDSYS');

                    if (col_102_exists > 0) then
                    raise_application_error(-20000,
                    'Cannot proceed. Tables columns of RDF 10.2 types exist (count=' ||
                    col_102_exists || ')');
                    end if;

                    SELECT count(*) INTO dep_102_exists FROM ALL_DEPENDENCIES
                    WHERE referenced_name IN ('SDO_RDF_TRIPLE_S','SDO_RDF_TRIPLE')
                    AND referenced_type = 'SYNONYM'
                    AND referenced_owner IN ('PUBLIC','MDSYS');

                    if (dep_102_exists > 0) then
                    raise_application_error(-20000,
                    'Cannot proceed. Dependencies for RDF 10.2 synonyms SDO_RDF_TRIPLE[_S] (count=' ||
                    dep_102_exists || ')');
                    end if;

                    SELECT count(*) INTO dep_102_exists FROM ALL_DEPENDENCIES
                    WHERE referenced_name IN ('SDO_RDF_TRIPLE_S','SDO_RDF_TRIPLE')
                    AND referenced_type = 'TYPE'
                    AND referenced_owner IN ('PUBLIC','MDSYS')
                    AND (name NOT IN ('SDO_RDF_TRIPLE_S','SDO_RDF_TRIPLE') OR
                    type NOT IN ('TYPE','SYNONYM','TYPE BODY'));

                    if (dep_102_exists > 0) then
                    raise_application_error(-20000,
                    'Cannot proceed. Dependencies for RDF 10.2 type SDO_RDF_TRIPLE[_S] (count=' ||
                    dep_102_exists || ')');
                    end if;

                    :script_name := '@seme101.sql';
                    else
                    :script_name := dbms_registry.nothing_script;
                    end if;
                    end;
                    Error report:
                    Missing IN or OUT parameter at index:: 1
                    • 7. Re: enabling Semantic Technologies Support in 11gr2 help needed
                      638832
                      Hello.

                      Ok, i succeded to run catsem11i.sql....it runned succesfully, but it seems that some tables are missing, like.... MDSYS.SEM_MODEL$, MDSYS.SEM_RULEBASE_INFO... i don't know if they are not supposed to be there?
                      And the next question is how to load triple stores into Oracle database?

                      Thanks,
                      Catalin
                      • 8. Re: enabling Semantic Technologies Support in 11gr2 help needed
                        Matperry-Oracle
                        Those tables get created when you create a semantic network (http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28397/sem_apis_ref.htm#sthref261). This is separate from the installation.

                        There are various ways to load RDF data (bulk load, batch load, incremental load, etc.). They are all discussed in the documentation:
                        http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28397/sdo_rdf_concepts.htm#CHDCEFIE

                        Hope this helps,
                        -Matt
                        • 9. Re: enabling Semantic Technologies Support in 11gr2 help needed
                          765900
                          hi.. I am facing trouble installing 11g R 1 in Configuring it to support semantic data. I followed all the steps and both partitioning and spatial are installed. then t says run the command $ORACLE_HOME\md\admin\catsem11i.sql and for this i need to log in as DBA. i am new to oracle so can you please tell how to log on as a DBA and run the above command? because if i log in as system and run it, the SQL* Plus window just closes.

                          Thanks,
                          Sneha
                          • 10. Re: enabling Semantic Technologies Support in 11gr2 help needed
                            Matperry-Oracle
                            Hi,

                            The problem is most likely that you did not use 'AS SYSDBA' when you connected to Oracle. For example, you should do the following to connect as a DBA:

                            SQL> CONNECT SYS/MY_PASSWD AS SYSDBA

                            Hope this helps,
                            -Matt