新年要有新气象!

Tip: How to use 10G Grid Control & DB control

上一篇 / 下一篇  2004-05-22 00:36:49

查看( 7131 ) / 评论( 39 )
1.  How  to  run  DB control when host  is managed by DHCP ?

      Before running  db control,  It  is  necessary  to  Install
      "Microsoft lookup Adaptor"  first.

TAG:

Leo's Space LoveWinter 发布于2004-05-28 22:56:17
2. 怎样配置EM使其支持SSL 协议
10G EM 中的OMS, DBConsole,Agent 都支持SSL 协议.

   具体操作:  

       1. 如果没有环境变量ORACLE_SID,请先配置,或者
    直接敲入set  ORACLE_SID=xxx   
           (UNIX环境下请根据不同的shell类型使用不同的语法:
            setenv, export...)

       2.  键入 emctl  secure ,可以看到全部的选项:
           secure oms     <sysman password> <registration password>  
                                        [<hostname>] [-reset]

           secure agent   <registration password>

           secure em

           secure dbconsole <sysman password> <registration password>
                                                 [<hostname>]

          secure setpwd  <sysman  password> <registration password>

          secure status  [oms url]

         secure lock | unlock
            
   3. 以配置oms为例

   3.1  先停掉所有与oms相关的 服务(opmnctl  stopall)
        3.2  敲入: emctl  secure  oms,会让你输入registration password,
               然后系统会产生相关的证书文件, 如果一切顺利的话,
               系统会有提示配置成功的信息

   3.3 重新启动服务(opmnctl  startall)   
         
               缺省情况下,7777和4889这两个端口是可用的, 配置
      成secure 模式后,4888端口是支持SSL协议的.  从   
      $EM_HOME\sysman\config目录下的emoms.properties
               文件中可以看到配置信息.

       3.4   检测oms是否已经运行在https协议下

      emctl  secure status  oms  url

                注意:  URL 要输入完整,  
                例如: https://myserver:4888/em/upload/

  4.  Agent, DBconsole的配置基本类似.

  5. 启动浏览器运行时,IE会弹出一个安装安全证书的
  窗口,按"确认".
Leo's Space LoveWinter 发布于2004-05-30 14:07:54
3. 出现了问题,怎样解决?
以DB Control为例, 大致的步骤是这样的:

1. emctl status dbconsole 查看db control 的状态

2.去 $ORACLE_HOME\hostname_sid\sysman\log目录下
查看相关日志(emoms.log,emagent.log等)

3.  检查配置文件 emd.properties,emoms.properties
    目录: $ORACLE_HOME\hostname_sid\sysman\config

4. 确保监听器工作正常: lsnrctl status

5. 10G EM 使用的是配置文件中定义的连接串,而不是
直接访问tnsnames.ora .
目录: $ORACLE_HOME\hostname_sid\sysman\config
文件: emoms.properties.
参数: oracle.sysman.eml.mntr.emdRepConnectDescriptor

New:
6. 检查emdb.nohup,emagent.nohup, emoms.nohup这几个文件,
从这些文件中,可以大致了解为什么db console, agent,
oms不能启动或者非正常退出的一些信息。
[/COLOR]
Leo's Space LoveWinter 发布于2004-06-03 00:08:59
4. 修改了监听端口, 怎样保证 DB Control 正常运行 ?
今天是第四篇,希望大家也都来写写自己的使用经验.

1. 修改 listener.ora 和tnsnames.ora 这两个文件:
    tnsnames.ora 中需要加入:

     listener_1 =
     (ADDRESS = (PROTOCOL = TCP)
       (HOST = xxxx)(PORT = 新的端口))

  然后启动数据库:
    SQL> show parameter  local_listener ;
    SQL> alter system  set  local_listener='listener_1'  scope=spfile;
      重启数据库使得修改生效

2.  修改 $ORACLE_HOME\hostname_sid\sysman\config
  下的emoms.properties文件:
      oracle.sysman.eml.mntr.emdRepPort=新的端口
oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=xxx)(PORT\=新的端口)))(CONNECT_DATA\=(SERVICE_NAME\=xxx)))

3.  最后,还要修改 $ORACLE_HOME\hostname_sid\sysman\emd
      下的targets.xml:

      <Property NAME="Port" VALUE="新的端口"/>

4.  重新启动监听器和dbconsole 服务.


5.  如果嫌上面的操作麻烦,可以用emca这个命令行工具:
      emca  -h  查看所有可用的命令
  emca  -r   跳过资料档案库的创建.
zhu1发布于2004-06-08 15:17:24
Is it 3 installation Disks?
Thx.
Leo's Space LoveWinter 发布于2004-06-08 23:53:28
Re: Is it 3 installation Disks?
GC  control   includes  three CDs;  
DB  control   is  included  in  DB  setup CD, only  one CD.

QUOTE:

最初由 zhu1 发布
[B]Thx. [/B]

Leo's Space LoveWinter 发布于2004-06-26 12:37:55
5. 怎样修改 DB Control 的服务端口 ?
   今天是第五篇

  缺省情况下, DB Control 的端口是5500, 可以参考下面的
说明更改端口 .

   来源:  $ORACLE_HOME\doc\readme.101\readme.em

If a user wants to change the OMS port, they'll have to modify
three files, and then restart DB Control in order to force these
changes to take effect.

a) Edit $ORACLE_HOME/<host>_<sid>/sysman/config/emoms.properties and modify the following parameters:

oracle.sysman.emSDK.svlt.ConsoleServerPort
oracle.sysman.emSDK.svlt.ConsoleServerHTTPSPort

b) Edit $ORACLE_HOME/<host>_<sid>/sysman/config/emd.properties and modify the following parameters:

REPOSITORY_URL
emdWalletSrcUrl

c) Edit $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<host>_<sid>/
config/http-web-site.xml and modify the following parameter:

web-site port

Please back up the existing files before making changes.
Leo's Space LoveWinter 发布于2005-01-31 19:35:48
6. How to re-config EM repository and re-create the schema "SYSMAN"
1.  Logon SQLPLUS as user SYS , drop the schema "sysman"
     and  its mangement objects:

      a.  drop user sysman cascade;
      b.  drop role MGMT_USER;
      c.  drop user MGMT_VIEW cascade;
      d.  drop public synonym  MGMT_TARGET_BLACKOUTS;
      e.  drop public synonym SETEMVIEWUSERCONTEXT;

2.  Run emca -x <SID> to make sure nothing else is left.

3.  Then recreate it , using command line tool:  emca
    (Type  "emca  --help  to see all  available options)
十年磨一剑 husthxd 发布于2005-01-31 21:26:16
go on
william09099发布于2005-05-11 11:28:02
GC control includes three CDs? why mine is only  two CDs?

And  after installed ,i can't open the oem.what's the URL?

THANKS!!!!!
GavinDon发布于2005-06-17 10:33:31
好贴.......
diligence发布于2005-06-18 17:24:12
多谢!我解决了很多问题。
andy9718发布于2005-07-11 16:28:32
多谢!
lihui29发布于2005-09-09 10:25:48
我在安装数据库时,出现创建enterpries manager资料档案库不成功。之后我进入数据库按照LoveWinter版主的6. How to re-config EM repository and re-create the schema "SYSMAN"的说明删除sysman,之后启动dbca,打算重新安装enterpries manager资料档案库,但安装到一半的时候出错,说让我手动执行emca,我执行以后报同样的错误。
D:\oracle\ora10g\BIN>emca -r

EMCA 开始于 Fri Sep 09 10:08:09 CST 2005
输入以下有关要配置的数据库的信息
监听程序端口号: 1521
数据库 SID: keyid
服务名: keyid
通知的电子邮件地址:
通知的电子邮件网关:
dbsnmp 口令:
sysman 口令:
sys 口令:  :

-----------------------------------------------------------------

已指定以下设置

数据库 ORACLE_HOME ................ D:\oracle\ora10g
Enterprise Manager ORACLE_HOME ................ D:\oracle\ora10g

数据库主机名 ................ Maggie
监听程序端口号 ................ 1521
数据库 SID ................ keyid
服务名 ................ keyid
通知的电子邮件地址 ...............
通知的电子邮件网关 ...............

-----------------------------------------------------------------
是否继续? [是/否]: 是
2005-9-9 10:08:31 oracle.sysman.emcp.EMConfig checkParameters
严重: Failed to allocate port(s) in the specified range for the following process(es):
MS [5540-5559],RMI [5520-5539],Database Control [5500-5519],EM agent [1830-1849]
无法完成配置。有关详细信息, 请参阅日志文件

而且我的$oracle_home\bin下没有hostname_sid这个文件夹,这是怎么回事,应该怎么解决啊。谢谢。
emport.gif

emport.gif

lihui29发布于2005-09-09 14:56:17
每人知道吗?看来我只能重装软件了。
luodonghua发布于2005-09-09 16:05:20
Re: Tip: How to use 10G Grid Control & DB control

QUOTE:

最初由 LoveWinter 发布
[B]1.  How  to  run  DB control when host  is managed by DHCP ?

      Before running  db control,  It  is  necessary  to  Install
      "Microsoft lookup Adaptor"  first. [/B]
兄弟,你在哪儿找的Microsoft lookup Adaptor?
强烈关注中,这个可以帮我很大忙
lihui29发布于2005-09-10 17:53:23
我解决了我碰到的问题了,只要给报错的进程指定一个端口号就可以了
D:\oracle\ora10g\BIN>emca -RMI_PORT 5520 -JMS_PORT 5540 -AGENT_PORT 1830 -DBCONSOLE_HTTP_PORT 5500
EMCA 开始于 Sat Sep 10 16:25:00 CST 2005
输入以下有关要配置的数据库的信息
监听程序端口号: 1521
数据库 SID: ORANGE
服务名: ORANGE
通知的电子邮件地址:
通知的电子邮件网关:
dbsnmp 口令:
sysman 口令:
sys 口令:
sys 口令:
-----------------------------------------------------------------

已指定以下设置

数据库 ORACLE_HOME ................ D:\oracle\ora10g
Enterprise Manager ORACLE_HOME ................ D:\oracle\ora10g

数据库主机名 ................ Mycomputer
监听程序端口号 ................ 1521
数据库 SID ................ ORANGE
服务名 ................ ORANGE
通知的电子邮件地址 ...............
通知的电子邮件网关 ...............

-----------------------------------------------------------------
是否继续? [是/否]: 是
2005-9-10 16:25:27 oracle.sysman.emcp.EMConfig checkConfiguration
警告: 'shared_pool_size' 必须大于等于 80 MB。
2005-9-10 16:25:27 oracle.sysman.emcp.EMConfig updateReposVars
信息: 正在更新文件 D:\oracle\ora10g\sysman\emdrep\config\repository.variables...
2005-9-10 16:31:11 oracle.sysman.emcp.EMConfig createRepository
信息: 正在创建资料档案库...
2005-9-10 16:31:11 oracle.sysman.emcp.EMConfig perform
信息: 资料档案库已成功创建
2005-9-10 16:31:28 oracle.sysman.emcp.EMConfig addPortEntries
信息: 正在更新文件 D:\oracle\ora10g\install\portlist.ini...
2005-9-10 16:31:29 oracle.sysman.emcp.EMConfig updateEmdProps
信息: 正在更新文件 D:\oracle\ora10g\sysman\config\emd.properties...
2005-9-10 16:31:30 oracle.sysman.emcp.EMConfig updateConfigFiles
信息: targets.xml 文件已成功更新
2005-9-10 16:31:30 oracle.sysman.emcp.EMConfig updateEmomsProps
信息: 正在更新文件 D:\oracle\ora10g\sysman\config\emoms.properties...
2005-9-10 16:31:30 oracle.sysman.emcp.EMConfig updateConfigFiles
信息: emoms.properties 文件已成功更新
2005-9-10 16:31:36 oracle.sysman.emcp.EMConfig startOMS
信息: 正在启动 DBConsole...
2005-9-10 16:33:16 oracle.sysman.emcp.EMConfig perform
信息: DBConsole 已成功启动
2005-9-10 16:33:16 oracle.sysman.emcp.EMConfig perform
信息: >>>>>>>>>>> Enterprise Manager URL 为 http://Mycomputer:5500/em <<<<<<<<<<<
Enterprise Manager 配置已成功完成
EMCA 结束于 Sat Sep 10 16:33:16 CST 2005

创建成功了。
coco1960发布于2006-01-04 22:47:35
整不明白的一个事情关于rac 中dbconsole
我修改了两个实例sysman的密码,dbconsole可以起来,但是没有登录窗口,代理检测到数据库是关闭的。奇怪
删除sysman用户和repos
emca重新创建repos和重新配置dbconsole
问题依旧。

发现启动dbconsole后sysman用户总是被自动锁定
ocpmi发布于2006-02-14 04:30:36
Re: Tip: How to use 10G Grid Control & DB control
在Linux下也需要这样做吗?

具体怎样做?

QUOTE:

最初由 LoveWinter 发布
[B]1.  How  to  run  DB control when host  is managed by DHCP ?

      Before running  db control,  It  is  necessary  to  Install
      "Microsoft lookup Adaptor"  first. [/B]

charles_gao发布于2006-02-14 15:29:47
Good.
zggyl的个人空间 zggyl 发布于2006-02-16 13:19:59
好贴,谢谢
Leo's Space LoveWinter 发布于2006-02-20 23:42:26
New Tips (No 7)
Q7: Out of Memory Errors Under Heavy Load  (Grid Control)
A7:
Under heavy load, especially when connecting to multiple target databases, The Oracle Management Service may encounter
out-of-memory errors and restart. When an Oracle Management Service restarts, there is no loss of state in the repository, but users logged in to that Management Service will be asked to login
again. If the restarts are frequent, do the following for each
installed Management Service:

a)  Stop the oms;
    $ORACLE_HOME/opmn/bin/opmnctl stopall

   (Note: it is important to use opmnctl stopall here rather than
    "emctl stop oms" since we need to completely stop the associated
    Application Server instance as well)

b)  Edit $ORACLE_HOME/opmn/conf/opmn.xml

Search for the OC4J_EM section, which is a line that looks like this:

<process-type id="OC4J_EM" module-id="OC4J">

Edit the "java-options" data tag under this process type. Before edit,
this line should look similar to this:

<data id="java-options" value="-server
-Djava.security.policy=/private/smptest/oms_rel9/j2ee/OC4J_EM/config/java2.policy
-Djava.awt.headless=true -Xmx512M -XX:MaxPermSize=64m
-DORACLE_HOME=/private/smptest/oms_rel9 "/>

Change the -Xmx option from 512M to 1024M, and the -XX:MaxPermSize option from
64M to 256M.Also add the -Xnoclassgc option.

After edits, the line should look like this:

<data id="java-options" value="-server
-Djava.security.policy=/private/smptest/oms_rel9/j2ee/OC4J_EM/config/java2.policy
-Djava.awt.headless=true -Xmx1024M -XX:MaxPermSize=256M -Xnoclassgc
-DORACLE_HOME=/private/smptest/oms_rel9 "/>

c) Restart the Oracle Management Service using "emctl start oms".
Leo's Space LoveWinter 发布于2006-02-20 23:45:31
New Tips (No 8)
Q8: How to diagnose emd upload error

[B] Note:  This is  a  frequently asked question in some forums. [/B]

Case:
I builded up a database with Dbcontrol inside itsself,
Everything worked fine.
then I revoked
utl_FILE, UTL_SMTP, UTL_TCP, UTP_HTTP, DBMS_RANDOM
from public.

Then I got the error when i did a emctl upload
EMD upload error: Failed to upload file B0000002.xml, ret = -2

I granted
utl_FILE
UTL_SMTP
UTL_TCP
UTP_HTTP
DBMS_RANDOM

to public but the error remains.

Any soutions?

Answer 1:

This is a bug (in grid control,db control)

The bug 4573965 based on bug 3638973 is not fixed in 10.1.0.4; it is
fixed in Grid Control - Release 2 (10.2 version).

Bug indicates as a workaround: removed some targets from targets.xml
(mainly database targets), agent successfully uploaded and then added
targets back via GC Console.

Upgrade to 10.2 when the release will be available

You can remove some targets (mainly database targets) by running the
following command:
emctl config agent deletetarget oracle_database <db_name>


Answer 2:
1. Log into the repository database as sys:
grant execute on sys.utl_smtp to sysman
grant execute on sys.utl_tcp to sysman

2. alter package sysman.emd_notification compile;

And some other schemas need grants as well -

grant execute on utl_file to xdb;
grant execute on sys.utl_file to DMSYS;
etc......

Then recompile invalid objects in db using utlrp.sql found here =

$ORACLE_HOME/bla/bla/RDBMS/ADMIN/utlrp.sql

Then refresh the agent

emctl clearstate agent
wait around 30 minutes for the state to clear

[B]BTW: I'll create a  PDF file to contain some frequently asked questions.[/B][/COLOR]
kickster发布于2007-03-03 08:13:09

zhycjun发布于2007-03-15 10:05:29
很好,谢谢
kickster发布于2007-03-15 12:19:19
现在好像很少看到楼主了,希望楼主能有更多的总结帖上来和大家分享
hanjs发布于2007-03-17 20:59:18
学习了!
Leo's Space LoveWinter 发布于2007-03-28 14:56:24
更新几个:
今天更新几个Tip,基本都是我在测试过程中发现的.
Leo's Space LoveWinter 发布于2007-03-28 14:57:59
Tip 9: How to solve agent upload timeout issue?
Q9:. How to solve agent upload timeout issue ?
A9:
Agent upload timeout may related to many factors include:

1) The OMS is very busy on deal with specified agent's http request;

2) The OMS box is over workloaded and the Apache time out occurs, so it refuses agent http request from specified agent side;

3) The connection between OMS and repository db is in poor performance, e.g. using remote repository db sometimes will
trigger this issue.

4) The meta data xml files are corrupted or bad, so OMS refueses
to accept it.

From performance tuning point, there is one possible approach
can be considered to try:

    . Increase the Apache time out value;
      
      File 1 : $OMS_HOME/Apache/Apache/conf/httpd.conf
      parameter: Timeout (Default 300 seconds)
      
      File 2: $OMS_HOME/sysman/config/httpd_em.conf
      parameter: Timout   
     
      Then restart oms, clean agent and restart agent on target box.
      
   
    . Tune the connection issue between OMS box and repository box. If possible,
      using local repository db or make the repository db locates on the same lan
      as oms box.
      
   
    . Increase the timeout parameter in agent side, then restart agent.
     
      UploadTimeout=xxx (default is 1800)
      UploadMaxTime=xxx (default is 300)
Leo's Space LoveWinter 发布于2007-03-28 15:01:15
Tip 10: How to Configure Grid Control to use the Single Sign-On Logon Page
Q10. How to Configure EM Grid Control to use the Single Sign-On Logon Page

A10: Note, This tip comes from Metalink.

To configure the Grid Control Console for use with Oracle Application Server Single Sign-On:

Steps:

1. Set the ORACLE_HOME environment variables to the Management Service home directory.

For example:

$PROMPT> setenv ORACLE_HOME /dev01/oracle/em10g_GridControl

2. Change directory to the bin directory of the Management Service Oracle home:

$PROMPT> cd $ORACLE_HOME/opmn/bin

3. Stop the Management Service, the Oracle HTTP Server, and the other components of the application server:

$PROMPT> ./opmnctl stopall

4. Change directory to the bin directory of the Management Service Oracle home:

$PROMPT> cd $ORACLE_HOME/bin

5. Enter the following command at the operating system prompt:

$PROMPT> ./emctl config oms sso -host ssoHost -port ssoPort -sid ssoSid  -pass ssoPassword -das [url]http://ssohostort/[/url]

For example:

$PROMPT> ./emctl config oms sso -host sshost1.acme.com -port 1521 -sid asdb -pass Ch22x5xt -das http://ssohost1.acme.com:7777


6. Restart the Management Service, Oracle HTTP Server, and the other application server components:

$PROMPT> cd $ORACLE_HOME/opmn/bin
$PROMPT> ./opmnctl startall

Go the Grid Control Console URL.

For example:
http://mgmthost1.acme.com:7777/em

The browser is redirected to the standard Single Sign-On Logon page.
Leo's Space LoveWinter 发布于2007-03-28 15:05:44
Tip 11: Interesting query
Tip 11. For Grid control, How to get the following results

Group Name     Target Name       Host Name
------------------------------------------------------------------
Grp1                       db1                       host1
Grp1                      db2                       host 1
Grp1                      db3                       host2
Grp2                      db4                       host2
Grp3                     +ASM1                 host1
....


A11:  This comes from mail list, I replied one approach.

[B]A single group can include many members(targets), they can be
same target type or different target type. Some targets have
relationship with hosts(e.g. database instance, rac instance,
ASM instance,Listeners,,etc) others have not. So, user should
first understand the relationship between group,target and
associate target.[/B]


Let's see an example.

First you should know the relationship between these tables:
"MGMT_TARGETS", "MGMT_TARGET_TYPES",
"MGMT_TARGET_ASSOCS".

Then build single queries, Finally combine them.

For example:

(Optional) [B]Step 1: Get the target type definition[/B]

select target_type from mgmt_target_types where NLS_UPPER(type_display_name)=NLS_UPPER('group')


[B]Step 2: Get the target guid, group name of your created groups[/B]

select rawtohex(target_guid),target_name from mgmt_targets where target_type
in (select target_type from mgmt_target_types where NLS_UPPER(type_display_name)=NLS_UPPER('group'))


[B]Step 3: Get the relationship between source and accoc targets[/B]

select T2.target_name,Rawtohex(T1.ASSOC_TARGET_GUID)
from MGMT_TARGET_ASSOCS T1, MGMT_TARGETS T2
where T2.target_guid=T1.source_target_guid
and T1.source_target_guid in
(select target_guid from mgmt_targets where target_type='composite')


[B]Step 4: Get the relationship between host and specified targets[/B]

select target_name, host_name from mgmt_targets
where target_guid in (Q3) ...


[B]Step 5: Combine these queries, using self-join on tables:[/B]

select T2.target_name as "Group Name",
T3.target_name as "Target Name" ,T3.host_name as "Host Name" from
MGMT_TARGET_ASSOCS T1, MGMT_TARGETS T2,
(select target_guid,target_name, host_name from mgmt_targets) T3
where T2.target_guid=T1.source_target_guid
and T1.source_target_guid in
(select target_guid from mgmt_targets where target_type='composite')
and T3.target_guid=T1.ASSOC_TARGET_GUID
我来说两句

(可选)

日历

« 2008-11-23  
      1
2345678
9101112131415
16171819202122
23242526272829
30      

我的存档

数据统计

  • 访问量: 431
  • 日志数: 4
  • 建立时间: 2008-01-08
  • 更新时间: 2008-01-08

RSS订阅