Windows版:
情景:MESDB EM不能使用了,需要rebuild。
解决方案:
0,事先说明,此操作相当cool~ 因此,如果是online的db,请事先告知user停止操作,否则,DB会卡在那~
1,drop the sysman account and mangement objects:
drop user sysman cascade;
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;
2,cmd下输入:
> emca -config dbcontrol db -repos recreate
之后按提示进行输入安装即可。
3,ok后,输入:
>emctl start dbconsole
*************************************************************************
常见问题:
1,SEVERE: Cannot start Database Control. The following ports are already in use:***
解决方案:换个em agent和http端口号(如5500)
emca -config dbcontrol db -DBCONTROL_HTTP_PORT 5500 -AGENT_PORT 3940 -RMI_PORT 5524 -JMS_PORT 5545
*************************************************************************
Linux版:
情景:通过RMAN Copy过来的dtberp(http://www.cnblogs.com/vegaslee/archive/2009/05/07/1451717.html),现在需要做监控了,需要配置em。
解决方案:
1,查看数据库端口信息:
$ more $ORACLE_HOME/install/portlist.ini
2,如果步骤1中有em的端口信息,则:
$ emca -x dtberp
3,sqlplus到dtberp数据库中:
SQL> drop user sysman cascade;
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS;
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS;
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
4,新建em:
$ emca -config dbcontrol -repos create
5,查看em当前状态:
$ emctl status dbconsole
版权声明:程序员胖胖胖虎阿 发表于 2022年9月15日 上午7:00。
转载请注明:【Vegas原创】rebuild em (Database Control)【Windows/Linux版】 | 胖虎的工具箱-编程导航
转载请注明:【Vegas原创】rebuild em (Database Control)【Windows/Linux版】 | 胖虎的工具箱-编程导航
相关文章
暂无评论...