Oracle10g重建EM

Oracle10G 的EM采用了web方式,并且分成了2个产品,database control和grid control。使用命令行工具emca可以创建,修改,重建或者删除dbcontrol的配置。而使用命令行工具emctl可以启动/停止EM console服务,察看服务状态等。

1.drop configuration files and repository run :

emca -deconfig dbcontrol db -repos drop

2. Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and mangement objects:

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;

3.Create configuration files and repository run

emca -config dbcontrol db -repos create

附A emca常用命令语法

emca -repos create创建一个EM资料库

emca -repos recreate重建一个EM资料库

emca -repos drop删除一个EM资料库

emca -config dbcontrol db配置数据库的 Database Control

emca -deconfig dbcontrol db删除数据库的 Database Control配置

emca -reconfig ports 重新配置db control和agent的端口

注:通过查看$ORACLE_HOME/install/portlist.ini 文件可以知道当前dbcontrol正在使用的端口,默认dbcontrol http端口1158,agent端口3938。如果要重新配置端口,可以使用如下命令:

emca -reconfig ports -dbcontrol_http_port 1159

emca -reconfig ports -agent_port 3939

附B emctl常用命令语法

emctl start dbconsole启动EM console服务,使用前需要先设置ORACLE_SID环境变量

emctl stop dbconsole停止EM console服务,使用前需要先设置ORACLE_SID环境变量

emctl status dbconsole 查看EM console服务状态

参考:

【1】 Oracle 10G重建EM DB Control,http://home.ixpub.net/space.php?uid=22032845&do=blog&id=407481

【2】 emca与emctl常用的命令语法,http://blog.m6699.com/diomedea/article/10510.html

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>