windows SP2-0750:您可能需要设置 ORACLE_HOME

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18095960/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 10:46:38  来源:igfitidea点击:

SP2-0750: You may need to set ORACLE_HOME

windowsoracleoracle11g

提问by bjan

I am getting following error message when i write sqlpluson command prompt

当我sqlplus在命令提示符下写入时收到以下错误消息

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Here are the path details

这是路径详细信息

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

Net Configuration Assistance is not working too. It is not getting launched from Program Files and while accessing directly it gives following error

网络配置协助也不起作用。它不是从 Program Files 启动的,直接访问时会出现以下错误

C:\Oracle\product.1.0\db_1\BIN>netca.bat
java.lang.UnsatisfiedLinkError: Can't load library: C:/Oracle/product/11.1.0/db_
1;/oui/lib/win32/oraInstaller.dll
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)
        at java.lang.Runtime.load0(Runtime.java:769)
        at java.lang.System.load(System.java:968)
        at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.loadNativeLib(
OiipwWin32NativeCalls.java:1491)
        at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.<clinit>(Oiipw
Win32NativeCalls.java:47)
        at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.getEnv(OiipgEnvironment
.java:210)
        at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.initUnixPtrFileLoc(O
iipgPropertyLoader.java:213)
        at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.<clinit>(OiipgProper
tyLoader.java:126)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.updateProperties(
OiicStandardInventorySession.java:461)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicS
tandardInventorySession.java:257)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicS
tandardInventorySession.java:231)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicS
tandardInventorySession.java:180)
        at oracle.net.ca.NetCA.getHomeInfo(Unknown Source)
        at oracle.net.ca.NetCA.main(Unknown Source)


java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:993)
        at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.loadNativeLib(
OiipwWin32NativeCalls.java:1514)
        at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.<clinit>(Oiipw
Win32NativeCalls.java:47)
        at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.getEnv(OiipgEnvironment
.java:210)
        at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.initUnixPtrFileLoc(O
iipgPropertyLoader.java:213)
        at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.<clinit>(OiipgProper
tyLoader.java:126)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.updateProperties(
OiicStandardInventorySession.java:461)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicS
tandardInventorySession.java:257)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicS
tandardInventorySession.java:231)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicS
tandardInventorySession.java:180)
        at oracle.net.ca.NetCA.getHomeInfo(Unknown Source)
        at oracle.net.ca.NetCA.main(Unknown Source)
Oracle Net Services configuration failed.  The exit code is -1

EditGot it solved, since i attempted various solutions so i don't exactly remember, but i think it got solved by following two things

编辑解决了,因为我尝试了各种解决方案,所以我不太记得了,但我认为它通过以下两件事解决了

1-ORACLE_HOMEshould not contain anything after the path i.e. no \, ;,,

1-ORACLE_HOME路径后不应包含任何内容,即 no \, ;,,

2-I added an environment variable named LANGwith value American_America.we8iso8859p15

2-我添加了一个LANG以值命名的环境变量American_America.we8iso8859p15

回答by bjan

Got it solved, since i attempted various solutions so i don't exactly remember, but i think it got solved by following two things

解决了,因为我尝试了各种解决方案,所以我不太记得了,但我认为它通过以下两件事解决了

1-ORACLE_HOMEshould not contain anything after the path i.e. no \, ;,,

1-ORACLE_HOME路径后不应包含任何内容,即 no \, ;,,

2-I added an environment variable named LANGwith value American_America.we8iso8859p15

2-我添加了一个LANG以值命名的环境变量American_America.we8iso8859p15

回答by user6326642

In my case I simply had to do this prior to running the 'opatch apply' command:

在我的情况下,我只需要在运行“opatch apply”命令之前执行此操作:

set PATH=%PATH%;%ORACLE_HOME%\oui\lib\win64

回答by Emmanuel

On Windows (and on Unix as well, but variables are handled differently), you have to set a ORACLE_HOMEvariable in your environment so that SQL*Plus may find your Oracle client. For instance, my Oracle client 11g is installed in C:\oracle\ora11, so I created a ORACLE_HOMEvariable via:

在 Windows 上(在 Unix 上也是如此,但变量的处理方式不同),您必须ORACLE_HOME在您的环境中设置一个变量,以便 SQL*Plus 可以找到您的 Oracle 客户端。例如,我的 Oracle 客户端 11g 安装在 中C:\oracle\ora11,因此我ORACLE_HOME通过以下方式创建了一个变量:

Start -> Settings -> Control Panel -> System -> (Tab) Advanced -> (Button) Environment Variables -> New System Variable

开始 -> 设置 -> 控制面板 -> 系统 ->(选项卡)高级 ->(按钮)环境变量 -> 新建系统变量

(you can also go there by right-clicking on your My Computer icon). SQL*Plkus should be able to find its way to your client, then. You may ask why don't they set this path at install time ? I guess this is because you may have several Oracle versions installed on the same environment.

(您也可以通过右键单击“我的电脑”图标转到那里)。那么,SQL*Plkus 应该能够找到通往您的客户端的路。你可能会问他们为什么不在安装时设置这个路径?我猜这是因为您可能在同一环境中安装了多个 Oracle 版本。