oracle 如何在oracle中安装jvm?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11788194/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install jvm in oracle?
提问by Lenient Liu
I am having trouble installing JVM in Oracle 9.2.0.6.0
我在 Oracle 9.2.0.6.0 中安装 JVM 时遇到问题
I have attempted installation by running $ORACLE_HOME/javavm/install/initjvm.sql
. But it throws error
我已尝试通过运行安装$ORACLE_HOME/javavm/install/initjvm.sql
。但它抛出错误
ORA-06512: 在"SYS.INITJVMAUX", line 15.
When I look up the package body INITJVMAUX:
当我查找包体 INITJVMAUX 时:
procedure exec (x varchar2) as
begin
dbms_output.put_line(substr(x, 1, 250));
execute immediate x; --line 15
end;
and it's called by
它被称为
-- Load all the Java classes
begin if initjvmaux.startstep('CREATE_JAVA_SYSTEM') then
initjvmaux.rollbacksetup;
commit;
initjvmaux.rollbackset;
initjvmaux.exec('create or replace java system'); --error
commit;
initjvmaux.rollbackcleanup;
initjvmaux.endstep;
end if; end;
/
I need some help in getting this installed. The version is Oracle 9i Enterprise Edition Release 9.2.0.6.0.
我需要一些帮助来安装它。版本为 Oracle 9i Enterprise Edition Release 9.2.0.6.0。
回答by AnBisw
Here are the steps that needs to be carried out to re-install the JAVA Virtual Machine.
以下是重新安装 JAVA 虚拟机需要执行的步骤。
1.To uninstall (if already installed) the current installation of JAVA Virtual Machine, execute the following scripts at the SQL prompt connected as sys
user.
1.要卸载(如果已经安装)当前安装的JAVA虚拟机,请以sys
用户身份在SQL提示符下执行以下脚本。
startup mount; alter system set "_system_trig_enabled" = false scope=memory; alter system enable restricted session; alter database open; @?/rdbms/admin/catnojav.sql @?/xdk/admin/rmxml.sql @?/javavm/install/rmjvm.sql truncate table java$jvm$status;
startup mount; alter system set "_system_trig_enabled" = false scope=memory; alter system enable restricted session; alter database open; @?/rdbms/admin/catnojav.sql @?/xdk/admin/rmxml.sql @?/javavm/install/rmjvm.sql truncate table java$jvm$status;
Once all the above commands have been executed successfully, restart the database. Shutdown of the database is necessary to ensure that the changes are synchronized with the disk after removal of JAVA Virtual Machine.
成功执行上述所有命令后,重新启动数据库。删除 JAVA 虚拟机后,必须关闭数据库以确保更改与磁盘同步。
2.To install the JAVA Virtual Machine execute the following scripts at the SQL prompt connected as sys
user.
2.要安装JAVA虚拟机,以sys
用户身份在SQL提示符下执行以下脚本。
startup mount alter system set "_system_trig_enabled" = false scope=memory; alter database open; @?/javavm/install/initjvm.sql @?/xdk/admin/initxml.sql @?/xdk/admin/xmlja.sql @?/rdbms/admin/catjava.sql shutdown immediate;
startup mount alter system set "_system_trig_enabled" = false scope=memory; alter database open; @?/javavm/install/initjvm.sql @?/xdk/admin/initxml.sql @?/xdk/admin/xmlja.sql @?/rdbms/admin/catjava.sql shutdown immediate;
3.Start the database and resolve any INVALID objects by executing the utlrp.sql script.
3. 启动数据库并通过执行 utlrp.sql 脚本解析任何 INVALID 对象。
@?/rdbms/admin/utlrp.sql
@?/rdbms/admin/utlrp.sql
Now the JVM should be fully installed and functional.
现在 JVM 应该已经完全安装并且可以正常运行了。
SQL> select comp_name, version, status from dba_registry;
SQL> 从 dba_registry 中选择 comp_name、version、status;
Please go through Knowlege Mgmt Note ID 757771.1 How to Reload the JVM in 10.1.0.X and 10.2.0.X
in Oracle Support(formerly metalink ) to go through a much detailed step by step process (with video) to resolve any issues that you may be facing. This note also consists of several other Notes that resolve different issues.
请通过Knowlege管理注意ID 757771.1 How to Reload the JVM in 10.1.0.X and 10.2.0.X
在Oracle支持(以前的Metalink)经过推进的过程(视频)更详细的步骤,以解决您可能遇到的任何问题。此注释还包含解决不同问题的其他几个注释。
回答by Badar
To install Oracle JVM, log into Oracle with SYSDBA privileges.
run this command in SQL*plus:
要安装 Oracle JVM,请使用 SYSDBA 权限登录 Oracle。
在 SQL*plus 中运行此命令:
SQL>@ORACLE_HOME\javavm\install\initjvm.sql
SQL>@ORACLE_HOME\javavm\install\initjvm.sql
And then
进而
SQL> select COMP_NAME, VERSION, STATUS FROM dba_registry
SQL> 从 dba_registry 中选择 COMP_NAME、VERSION、STATUS
to confirm JVM is installed correctly.
确认 JVM 安装正确。