Environment variable ORACLE_UNQNAME not defined错误解决
Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.其实就是em的问题重新配
Environment variable Oracle_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
其实就是em的问题重新配置emca即可。以后注意之前设置好ORACLE_UNQNAME 。
总结收藏:
1,修改DBSNMP密码:
重新配置DBCONSOLE,需要输入DBSNMP密码,但任何密码都会显示错误,需要预先修改。
alter user dbsnmp identified by xxx;
2,删除早期DBCONSOLE创建的用户:
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop user sysman cascade;
3,删除早期DBCONSOLE创建的对象:
drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;
drop public synonym MGMT_AVAILABILITY;
drop public synonym MGMT_CURRENT_AVAILABILITY;
drop public synonym MGMT_SEVERITY_OBJ;
4,重新创建DBCONSOLE:(如果是在windows下,要先到注册表删除DBCONSOLE(HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/OracleDBconsole)的服务,重启电脑)
$emca -config dbcontrol db -repos create;
如果此命令还是失败,,可直接利用重建命令:
$emca -config dbcontrol db -repos recreate;
根据提示,先输入SID,再输入Y继续;
输入端口1521,输入SYS密码,输入DBSNMP密码,输入SYSMAN 密码,输入Y继续
完成。
5,检查状态
emctl status dbconsole;
附emca常用命令:
创建一个EM资料库
emca -repos create
重建一个EM资料库
emca -repos recreate
删除一个EM资料库
emca -repos drop
配置数据库的 Database Control
emca -config dbcontrol db
删除数据库的 Database Control配置
emca -deconfig dbcontrol db
重新配置db control的端口,默认端口在1158
emca -reconfig ports
emca -reconfig ports -dbcontrol_http_port 1160
emca -reconfig ports -agent_port 3940
先设置ORACLE_SID环境变量后,启动EM console服务
emctl start dbconsole
先设置ORACLE_SID环境变量后,停止EM console服务
emctl stop dbconsole
先设置ORACLE_SID环境变量后,查看EM console服务的状态
配置dbconsole的步骤
emca -repos create
emca -config dbcontrol db
emctl start dbconsole
重新配置dbconsole的步骤
emca -repos drop
emca -repos create
emca -config dbcontrol db
emctl start dbconsole
推荐阅读
-
Environment variable ORACLE_UNQNAME not defined错误解决
-
variable '' of type '' referenced from scope '', but it is not defined 异常解决方法
-
tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
-
Tomcat9+JDK 13报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run thi
-
jQuery is not defined 错误原因与解决方法小结
-
ubuntu,Debian卸载阿里云盾监控shell脚本:Syntax error: Bad for loop variable错误解决方法
-
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these enviro
-
关于Tomcat打开 **闪退** 及出现 **Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
-
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 完美解决(tomcat error)
-
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined