查看dbconsole状态的时候报错:

C:\WINDOWS\system32>emctl status dbconsole
Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.

其实就是
oracle_unqname没有设置
Windows下执行:

set oracle_unqname=$ORACLE_SID
如
C:\WINDOWS\system32>set oracle_unqname=orcl
再次运行即可:
C:\WINDOWS\system32>emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://A00263.hongsin.cn:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory E:\app\mahl01\product\11.2.0\dbhome_1/A00263.hongsin.cn_orcl/sysman/log

如果是Linux下需要设置ORACLE_UNQNAME和ORACLE_HOSTNAME:

export ORACLE_UNQNAME=$ORACLE_SID
export ORACLE_HOSTNAME=localhost
Tags标签: dbconsole,UNQNAME,defined Tags相关文章如下:

上一篇:TNS-01190: 用户无权执行所请求的监听程序命令

下一篇:查看oracle数据库(database)的版本命令