windows 环境变量“ORACLE_UNQNAME”的 Oracle 问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22846859/
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
Oracle Issue with Environment Variable 'ORACLE_UNQNAME'
提问by Chlebta
I'm trying to install Oracle 11gR2 Entreprise Edition but during database creation, I got this Error :
我正在尝试安装 Oracle 11gR2 企业版,但在创建数据库期间,出现此错误:
Environment Variable ORACLE_UNQNAME not defined
And when I tried to lunch 'emctl.bat' From cmd I got this one :
当我尝试用 'emctl.bat' 从 cmd 吃午饭时,我得到了这个:
Please set ORACLE_UNQNAME to database unique name.
And to slove this error, I have used this commande :
为了解决这个错误,我使用了这个命令:
set ORACLE_UNQNAME=orcl
To define my Enivronment variable (orcl is the database name) I got this error for the 'emctl' command:
要定义我的 Enivronment 变量(orcl 是数据库名称),我收到了“emctl”命令的这个错误:
EM Configuration issue. D:\app\product.2.0\dbhome_1/Chlebta-PC_orcl not found
So any Help For sloving this issue ?
那么对于解决这个问题有什么帮助吗?
回答by Anton Drelin
:\> emctl status dbconsole
Environment variable ORACLE_UNQNAME not defined.
Please set ORACLE_UNQNAME to database unique name
Here is how to set oracle_unqname in Windows. You use a similar "export command" in UNIX/Linux:
下面介绍如何在 Windows 中设置 oracle_unqname。您在 UNIX/Linux 中使用类似的“导出命令”:
C:\>set ORACLE_HOSTNAME=localhost
C:\>set ORACLE_UNQNAME=orcl
C:\>set ORACLE_SID=orcl
C:\>emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
回答by Moawia307
the best way to set your environment variables is the graphical way :
设置环境变量的最佳方式是图形方式:
control panel > system > advanced system settings > Environment variables
now just click on new and inter the variable name : inter your variable name like ORACLE_UNQNAMEand int variable value : inter the value , such as orcl
现在只需单击新建并插入变量名:插入变量名,如 ORACLE_UNQNAME和 int 变量值:插入值,如orcl
now for the error of em-configuration: its seems like your host name "which is the computer name" is : chlebta-pcnot localhost, check your listenerand make sure of the host-namein there and the host name of the variable-value.
现在的错误EM-配置:它看起来像你的主机名“这是计算机名”是:chlebta-PC不是本地主机,检查你的听众,并做出确保主机名在那里和主机名 变量-值。