天天看点

10G oem 重新配置过程 ---OEM

 为方便以后查阅,将以前收集整理的文档一一上传!

此篇为OEM config for oracle 10.2.0.1-10.2.0.5

未配置em时候 启动dbconsole报错为:

emctl start dbconsole

[oracle@~/product/10.2/install]$>emctl start

EM Configuration issue. /export/home/oracle/product/10.2/james.jill.com_ora10g not found.

Running emca to Configure the Database Control

$ export ORACLE_SID=orcl

$ emca -config dbcontrol db

1 使用命令行工具emca可以创建,修改,重建或者删除dbcontrol的配置。

2 使用命令行工具emctl可以启动/停止EM console服务,察看服务状态等。

1 通过emca来配置 database control (最好先删除EM资料库然后重建新的)

主要分为两步:

A、是建立EM资料库

B、是配置dbcontrol

1.1 建立EM资料库

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

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

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

1.2配置dbcontrol    

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

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

如果初次配置dbcontrol时,会报以下错误:

SEVERE: 'job_queue_processes' must be greater than or equal to 1. Fix the error(s) and run EM Configuration Assistant again in standalone mode.

solution:

set in spfile.ora

# Job Queues

###########################################

job_queue_processes=10

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

2 emctl可以启动/停止EM console服务

emctl start dbconsole启动EM console服务

emctl stop dbconsole停止EM console服务

emctl start| stop| status| setpasswd dbconsole

[oracle@~/product/10.2/install]$>vi portlist.ini

"portlist.ini" 3 lines, 132 characters

iSQL*Plus HTTP port number =5560

Enterprise Manager Console HTTP Port (ora10g) = 1158

Enterprise Manager Agent Port (ora10g) = 3938

访问OEM

<a href="http://192.168.1.188:1158/em">http://192.168.1.188:1158/em</a>

In my database I tried to create repository and stopped several times while creating repository. I spend a significant amount of time to create repository and after analysis I got the following.

A)Manually Resolve

1)If you fail after invoking command

emca -config dbcontrol db -repos create see alert log file for more details. Also refer to another log file if it shows. Directly go to step 3)

2)However I see many errors like,

CONFIG: ORA-00955: name is already used by an existing object

CONFIG: ORA-01921: role name 'MGMT_USER' conflicts with another user or role name

and many severals errors.

3)Execute the following commands in SQL*plus and then execute emca command. I wish no more error will come. After several experiment I get this.

drop user sysman cascade;

drop public synonym SETEMVIEWUSERCONTEXT;

drop role MGMT_USER;

drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;

drop user MGMT_VIEW;

And then,

$ emca -deconfig dbcontrol db

$ emca -config dbcontrol db -repos create

B)Using RepManager:

If I drop the Repository using RepManager like following error will not come while creating repository.

$ORACLE_HOME/sysman/admin/emdrep/bin/RepManager -action drop

This will not remove the configuration files, but only the repository related objects from the database.

But you need to remember when RepManager is ran the database will be put in Quiescing mode.