在安装以前可以在Oracle_HOME/Javavm 目录下找到readme,另外注重的是所有jvm相关的sql都必须用sys as sysdba权限.
先决条件:
1:rollback segment至少100m
2:System tablespace,所有的脚本大概要消耗130m,initjvm.sql 所产生
的objects 消耗接近90m空间.
3:Shared_pool_size =50m
4:Java_pool_size =30m
pool sizes 大小可以用
select * from v$sgastat where name = 'free memory' 检定.
安装过程:
1:***INITJVM.SQL***
SQLset echo on
SQLspool jvminst.log
SQL@/javavm/install/initjvm.sql
SQLspool off
作用:载入初始用来支持java应用的java类包,初始化支持java和corba的名字空间的表,以及发布顶层调用的入口指针.
支持的java类包括:
The standard Java runtime
Bytecode verifier and optimizer
Java and SQLJ compilers
JDBC runtime
CORBA ORB and EJB runtime
Some additional support classes, sUCh as DBMS_JAVA, which are
described in "Package DBMS_JAVA"
initjvm.sql 同时做以下动作:
1:将类载入SYS schema
2:建立这些类的同义词,使可以被所有用户访问.
3:调整一些类的权限使支持CORBA callouts.
4:定义一些数据库start up 和shut down触发器.
注重:假如initjvm.sql 运行失败,在重新运行以前必须先执行rmjvm.sql,安装失败一般都是因为资源不足的问题,比如memory 和tablespace
2:***INITXML.SQL***
SQLset echo on
SQLspool initxml.log
SQL@?/oracore/admin/initxml.sql
SQLspool off
主要功能:
将xml 组件load到jserver里,可以利用plsql的接口对xlm进行扩展.
XML Parser for PL/SQL 支持 W3C XML 1.0 规范
3:***CATXSU.SQL***
SQLset echo on
SQLspool catxsu.log
SQL@?/rdbms/admin/catxsu.sql
SQLspool off
主要功能:
将XMLSQL Utility (XSU)装入数据库,主要用来做data transformation,
将关系型的数据的SQL query result转换到xml格式,反之依然.
***INIT_JIS.SQL***
SQLset echo on
SQLspool init_jis.log
SQL@?/javavm/install/init_jis.sql
SQLspool off
主要功能:
用来安装Oracle Servlet Engine (OSE)的,OSE象一个特定的web server一样工作,servlet类 通过java载入命令置入数据库,并在数据库的namespace 里注册,A servlet runner 处理HTTP 请求,publise serverlet进程,invoke serverlet 方法.
***JISJA.SQL***
主要功能:
主要用来使能JAccelerator (ncomp) for JIS,对优化性能有帮助,JServer Accelerator 通过ncomp工具将java类编译成共享库,来提高执行效率.
***JISAEPHC.SQL***
SQLset echo on
SQLspool jisaephc.log
SQL@?/javavm/install/jisaephc.sql
SQLspool off
主要功能:
OSE 安装完毕后,Adds the set of default end points to the server with hardcoded values for the admin service
***INITPLGS.SQL***
SQLset echo on
SQLspool initplgs.log
SQL@?
/rdbms/admin/initplgs.sql
SQLspool off
主要功能:
将PLSQL Gateway Servlet 的jar文件装入数据库,这个使plsql的存储过程可以象servelet那样运行,PL/SQL 过程可以在web上运行而无需做任何改装,
***INITjsp.SQL***
SQLset echo on
SQLspool initjsp.log
SQL@?/jsp/install/initjsp.sql
SQLspool off
主要功能:
用来安装Java Server Pages (JSP) ,
***JSPJA.SQL***
SQLspool jspja.log
SQL@?/jsp/install/jspja.sql
SQLspool off
主要功能:
用JAccelerator 来performace jsp功能组件,以native 方式编译java代码.
***INITPLSJ.SQL***
SQLspool initplsj.log
SQL@?/rdbms/admin/initplsj.sql
SQLspool off
主要功能:
初始化plsql 的java类库
***INITJMS.SQL***
SQLspool initjms.log
SQL@?/rdbms/admin/initjms.sql
SQLspool off
主要功能:
将AQ/JMS 载入数据库,oracle ssaging Service (JMS)提供了一组java api来支持Advanced Queuing based on the JMS standard,
***INITREPAPI.SQL***
SQLspool initrepapi.log
SQL@?/rdbms/admin/initrepapi.sql
SQLspool off
主要功能:
This script loads RepAPI server classes and publishes the 'repapi' objects
The RServer.class and its helper class are published in /etc namespace. RepAPI is a runtime library that enables clients to replicate data with Oracle servers.
***INITSOXX.SQL***
SQLspool initsoxx.log
SQL@?/rdbms/admin/initsoxx.sql
SQLspool off
主要功能:
This script loads objects, extensibility and xml related java classes into the database.
***JISAEP.SQL***
SQLspool jisaep.log
SQL@?/javavm/install/jisaep admin 8080 9090
SQLspool off
主要功能:
将OSE 配置成缺省的web服务,需要2个或三个参数
1:服务名,2:TCP 端口,3: ssl端口
-----
如何检定安装是否成功:
新装的数据库,即运行过catalog.sql 和 catproc.sql后,数据库里并没载入java对象,可以通过查询DBA_OBJECTS,条件是OBJECT_TYPE like 'JAVA%'来检查.
select count(*) from DBA_OBJECTS where OBJECT_TYPE like 'JAVA%'; This should return a count of 6785.
查找无效java对象
select count(*) from DBA_OBJECTS
where OBJECT_TYPE like 'JAVA%' and STATUS = 'INVALID';
假如数量小于第一个查询的值或第二个查询有返回,可能就需要浏览一下spool 的log,来找原因了.
INITJVM.SQL CREATES:
-
3 functions
4 indexes
6438 java classes
290 java data
57 java resources
6 packages
1 sequence
6443 synonyms
8 tables
2 triggers
3 views
SQL select count(*), object_type from dba_objects where object_type like 'JAVA%' group by object_type;
6438 JAVA CLASS
290 JAVA DATA
57 JAVA RESOURCE
6785
INITXML.SQL CREATES:
-
2 indexes
272 classes
31 java resources
1 lob
19 packages
272 synonyms
2 tables
CATXSU.SQL
CREATES:
29 classes
30 java resources
3 packages
3 synonyms
INIT_JIS.SQL
CREATES: --
12 indexes
2384 classes
10 java resources
1 lob
13 packages
5 sequences
2400 synonyms
17 tables
1 trigger
1 view
JISJA.SQL
CREATES: ------------------
154 classes
8 java sources
1 procedure
3 tables
JISAEPHC.SQL
CREATES: --
No new objects......
INITPLGS.SQL
CREATES: --
1 class
1 synonym
INITJSP.SQL
CREATES: -
275 classes
2 java resources
275 synonyms
JSPJA.SQL
CREATES: ------------------
20 classes
INITPLSJ.SQL
CREATES: --
2 classes
INITJMS.SQL CREATES: -
159 classes 159 synonyms
INITREPAPI.SQL
CREATES: ----
71 classes
71 synonyms
INITSOXX.SQL
CREATES: --
37 classes
37 synonyms
JISAEP.SQL
CREATES:
No new objects.....
TOTALS AFTER THE EXECUTION OF ALL SCRIPTS:
----
SQLselect count(*) from dba_objects
where object_type like 'JAVA%' and owner = 'SYS';
COUNT(*) ---------- 10270
SQLselect count(*) from dba_objects
where object_type like 'JAVA%' and status = 'INVALID' and owner = 'SYS';
COUNT(*) ---------- 0