【问题标题】:Windows 10 pro x64, Oracle database 21c express edition: How to set ORACLE_HOME correct?Windows 10 pro x64,Oracle database 21c express edition:如何正确设置ORACLE_HOME?
【发布时间】:2023-01-11 18:12:11
【问题描述】:
我正在使用 Windows 10 pro x64、Oracle 数据库 21c Express 版、Oracle SQL Developer 22.2.1。 ORACLE_HOME如何设置正确?
我知道这是我的设置错误(因为 sqlplus.exe 无法使用此系统变量运行/打开,我试过了)
是ORACLE_HOME
C:\app\Administrator\product\21c
C:\app\Administrator\product\21c\dbhomeXE
C:\app\Administrator\product\21c\homes
C:\app\Administrator\product\21c\homes\OraDB21Home1
?
请指导我正确设置ORACLE_HOME!
【问题讨论】:
标签:
oracle
oracle-xe
oracle21c
【解决方案1】:
在 Windows 上,您不需要显式设置 Oracle Home,因为我们可以从注册表和 PATH 中找到它。
但是如果你想设置一个 ORACLE_HOME,它是'bin'目录的父文件夹。因此,如果在 C:ppAdministratorproductchomesOraDB21Home1in 中找到了 sqlplus,那么您的 ORACLE_HOME 将是 C:ppAdministratorproductchomesOraDB21Home1
如果您正在运行 Oracle 的多个版本/安装(就像我一样),我通常会为每个版本创建一个小批处理文件,例如
sql19.cmd
=========
set ORACLE_SID=db19
set ORACLE_HOME=C:oracleproduct9
set PATH=C:oracleproduct9in;%PATH%
sqlplus scott/tiger@db19_pdb1
sql21.cmd
=========
set ORACLE_SID=db21
set ORACLE_HOME=C:oracleproduct
set PATH=C:oracleproductin;%PATH%
sqlplus scott/tiger@db21_pdb1
等等