注意,应该下载里面的:Oracle Database 11g Release 1 - Patch Set for 11.1.0.6 我的系统环境: linux (ubuntu 8.04) + oracle
为了使Oracle 11g release 1支持完全的DL推理,需要给oracle 11g安装Oracle Jena Adaptor补丁。
官方安装文档:
补丁下载地址:
注意,应该下载里面的:Oracle Database 11g Release 1 - Patch Set for 11.1.0.6
我的系统环境: linux (Ubuntu 8.04) + oracle 11g release 1
下面是Oracle Jena Adaptor语义网补丁的安装方法:
----------------------------------------------------------
0. 启动数据库:
wuxi@ubuntu:~$ sqlplus / as sysdba
SQL> startup
...
SQL> quit
1. 确认你的安装参数: $ORACLE_HOME 和 $ORACLE_SID 的值。
wuxi@ubuntu:~$ echo $ORACLE_HOME
/u01/app/oracle/product/11.1.0/db_1
wuxi@ubuntu: ~$ echo $ORACLE_SID
mydb
2. 运行catsem11i.sql脚本:
cd $ORACLE_HOME/md/admin
wuxi@ubuntu:admin$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Oct 31 07:57:19 2007
SQL> @catsem11i.sql
... 省略 ...
Session altered.
Call completed.
Install 11 RDF ... DONE
SQL> quit
3. 解压缩安装包:
wuxi@ubuntu:admin$ mkdir /tmp/work
wuxi@ubuntu:admin$ cd /tmp/work
wuxi@ubuntu: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. 更新数据库schema:首先要解锁MDSYS用户,官方强烈推荐使用一个安全的密码,但是在下面的安装过程中,,暂时就用mdsys作为密码(下面红色的地方就是密码),你可以在安装结束后用下面的方法把密码改为你自己的安全的密码。
进入解压目录中的sql目录:
wuxi@ubuntu:work$ cd /tmp/work/sql
/tmp/work/sql
wuxi@ubuntu: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
解锁MDSYS用户:
SQL> alter user mdsys account unlock identified by mdsys;
User altered.
用MDSYS用户登录并执行相关脚本:
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. 更新jar文件:
wuxi@ubuntu:sql$ cd ..
wuxi@ubuntu:sql$ pwd
/tmp/work
wuxi@ubuntu:work$ $ORACLE_HOME/bin/loadjava -u MDSYS/mdsys -resolve -force -synonym -schema MDSYS -grant PUBLIC java/sdordf.jar
6. 测试一下安装是否成功:
用具有建表空间权限的用户登录ORACLE 11g,例如:sysman
wuxi@ubuntu:work$ sqlplus sysman/your_password
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Jul 9 10:48:57 2008
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
创建表空间:
CREATE TABLESPACE sem_family
DATAFILE '/u01/app/oracle/oradata/mydb/sem_family.dbf' SIZE 100M
AUTOEXTEND ON NEXT 32M MAXSIZE 512M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
创建语义网表:
EXECUTE sem_apis.create_sem_network('sem_family');
如果这两个操作都执行成功,证明你的语义网补丁已经安装成功了:)