================================================ This patch fixes known bugs and is required for RDF and the Oracle Jena Adaptor If you are using Oracle Database 10g Release 2, follow the instructions in Section 1. If you are using Oracle Database 11g Release 1, follow the instructions in Section 2. A step-by-step example of patching Oracle Database 11g is provided after Section 2. ------------------------------------------------ Section 1: Patch Oracle Database 10g Release 2 ------------------------------------------------ Patch Installation Instructions: -------------------------------- To apply the patch in your 10.2.0.1 RDBMS or 10.2.0.3 RDBMS, unzip the following container zip file under a temporary, empty working directory: jenadrv_patch102rdf.zip Set your current directory to the directory where the patch is unpacked. To update the schema: --------------------- Go to the sql/ subdirectory: cd sql/ Connect to the database using SQL*Plus. Connect as SYS with sysdba privileges and execute catrdf10i.sql: @catrdf10i.sql To update the jar file: ---------------------- - Go to the directory where the patch is unpacked. - Backup and then update existing sodrdf.jar: cp $ORACLE_HOME/md/lib/sdordf.jar $ORACLE_HOME/md/lib/sdordf.jar.save cp jar/sdordf.jar $ORACLE_HOME/md/lib - Load the jar into the server (in one line): $ORACLE_HOME/bin/loadjava -u MDSYS/ -resolve -force -synonym -schema MDSYS -grant PUBLIC java/sdordf.jar ------------------------------------------------ Section 2: Patch Oracle Database 11g Release 1 ------------------------------------------------ Patch Installation Instructions: -------------------------------- To apply the patch in your 11gR1 RDBMS, unzip the following container zip file under a temporary, empty working directory: jenadrv_patch111rdf.zip Set your current directory to the directory where the patch is unpacked. Important Note: --------------- Due to a bug in bulk data loading (6279149), if you have already created SEM (RDF) network in your existing 11gR1 database, and you have used Oracle 11gR1 bulk loader to load data into Oracle database, then you need to do the following before moving on to the schema update. 1) Backup and save all the RDF/OWL data in your 11gR1 database. 2) Drop all existing RDF/OWL models. 3) Drop the existing SEM (RDF) network. To update the schema: --------------------- Backup relevant SQL and PLB files mkdir $ORACLE_HOME/md/admin/backup cp $ORACLE_HOME/md/admin/sdordf* $ORACLE_HOME/md/admin/backup cp $ORACLE_HOME/md/admin/sdosem* $ORACLE_HOME/md/admin/backup Go to the sql/ subdirectory: cd sql/ cp sdordf* $ORACLE_HOME/md/admin cp sdosem* $ORACLE_HOME/md/admin Connect to the database using SQL*Plus and load the following SQL or PLB files. Note that the assumption here is that catsem11i.sql has already been executed. Refer to Section 1.10 of Oracle Database Semantic Technologies Developer's Guide for details. sqlplus MDSYS/ @sdordfh.sql @sdordfxh.sql @sdordfa.sql @sdordfb.plb @sdordfxb.plb @sdoseminfhb.plb @sdordfai.plb Note that if you receive the error message "PLS-00201: identifier 'RDF_APIS_INTERNAL.TYPE_FAMILY' must be declared" when sdordfb.plb is being executed, it means that you have not executed catsem11i.sql as instructed. A successful run of catsem11i.sql is a MUST. To update the jar file: ---------------------- - Go to the directory where the patch is unpacked. - Backup and then update existing sodrdf.jar: cp $ORACLE_HOME/md/jlib/sdordf.jar $ORACLE_HOME/md/jlib/sdordf.jar.save cp jar/sdordf.jar $ORACLE_HOME/md/jlib - Load the jar into the server (in one line): $ORACLE_HOME/bin/loadjava -u MDSYS/ -resolve -force -synonym -schema MDSYS -grant PUBLIC java/sdordf.jar ------------------------------------------------------- Example: Step-by-step instructions (new Oracle Database 11g installation): ------------------------------------------------------- 1. Assume a new Oracle Database 11g database has been created. (Assume SID is "new11g"). user5@system10:admin/% echo $ORACLE_HOME /scratch/user5/release11g/product/11.1.0/db_1 user5@system10:admin/% echo $ORACLE_SID new11g 2. Run catsem11i.sql. cd $ORACLE_HOME/md/admin user5@system10:admin/% sqlplus / as sysdba SQL*Plus: Release 11.1.0.6.0 - Production on Wed Oct 31 07:57:19 2007 SQL> @catsem11i.sql ..... omitted ... Session altered. Call completed. Install 11 RDF ... DONE SQL> quit 3. Unpack (under /tmp/work directory). user5@system10:admin/% mkdir /tmp/work user5@system10:admin/% cd /tmp/work user5@system10:work/% unzip jenadrv_patch111rdf.zip Archive: jenadrv_patch111rdf.zip creating: java/ inflating: java/sdordf.jar creating: sql/ inflating: sql/sdoseminfhb.plb inflating: sql/sdordfxb.plb inflating: sql/sdordfxh.sql inflating: sql/sdordfai.plb inflating: sql/sdordfa.sql inflating: sql/sdordfh.sql inflating: sql/sdordfb.plb 4. Update the schema. First unlock the MDSYS user and set its password. Official Oracle security recommendations include not using the username as the password. So if you set the password to "mdsys" as in this example, you should change it to something else afterwards. user5@system10:work/% cd /tmp/work/sql /tmp/work/sql user5@system10:sql/% sqlplus / as sysdba SQL*Plus: Release 11.1.0.6.0 - Production on Wed Oct 31 07:59:08 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> alter user mdsys account unlock identified by mdsys; User altered. SQL> conn mdsys/mdsys Connected. SQL> @sdordfh.sql SQL> @sdordfxh.sql SQL> @sdordfa.sql SQL> @sdordfb.plb SQL> @sdordfxb.plb SQL> @sdoseminfhb.plb SQL> @sdordfai.plb Package created. ... SQL> Package body created. No errors. 5. Update the jar file. user5@system10:java/% cd .. /tmp/work user5@system10:work/% $ORACLE_HOME/bin/loadjava -u MDSYS/mdsys -resolve -force -synonym -schema MDSYS -grant PUBLIC java/sdordf.jar 6. Create a tablespace and then create the RDF/SEM network. SQL> connect / as sysdba -- create a tablespace. You can change the datafile location as you wish. -- "?" means ORACLE_HOME create bigfile tablespace sem_ts datafile '?/dbs/sem_ts01.dat' size 512M reuse autoextend on next 512M maxsize unlimited EXTENT MANAGEMENT LOCAL segment space management auto; SQL> exec sem_apis.create_sem_network('SEM_TS'); Done.