Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2246634
  • 博文数量: 310
  • 博客积分: 6853
  • 博客等级: 准将
  • 技术积分: 2833
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-04 16:41
文章分类

全部博文(310)

文章存档

2013年(17)

2012年(42)

2011年(76)

2010年(71)

2009年(99)

2007年(2)

2006年(1)

2005年(2)

分类: Oracle

2011-11-28 14:18:20

  • 控制台管理命令:

$ emctl status dbconsole
$ emctl stop dbconsole    
$ emctl start dbconsole

  •   重建em资料库:
$ emctl stop dbconsole
$ emca -deconfig dbcontrol db 

$ emca -repos recreate

...
Enter the following information:
Database SID: orcl10
Listener port number: 1528
Password for SYS user: oracle10
Password for SYSMAN user: oracle10
Do you wish to continue? [yes(Y)/no(N)]: y
...
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 19, 2007 6:20:22 PM

  配置dbcontrol:

$ emca -config dbcontrol db
Enter the following information:
Database SID: orcl10
Database Control is already
configured for the database orcl10
You have chosen to configure
Database Control for managing
the database orcl10
This will remove the existing configuration
and the default settings and perform. a fresh
configuration
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1528
Password for SYS user: oracle10
Password for DBSNMP user: oracle10 
Password for SYSMAN user: oracle10
Email address for notifications (optional):
Outgoing Mail (SMTP) server for
notifications (optional):
...
Do you wish to continue? [yes(Y)/no(N)]: y
...
Enterprise Manager configuration
completed successfully
FINISHED EMCA at Apr 19, 2007 6:27:44 PM

  • 扩展命令:

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的端口
emctl start console
启动EM console服务,使用前需要先
设置ORACLE_SID环境变量
emctl stop console 停止EM console服务,
使用前需要先设置ORACLE_SID环境变量
注:通过查看$ORACLE_HOME/install/portlist.ini
文件可以知道当前dbcontrol正在使用的端口,
默认dbcontrol http端口1158,agent端口3938。
如果要重新配置端口,可以使用如下命令:
emca -reconfig ports -dbcontrol_http_port 1159
emca -reconfig ports -agent_port 3939


  • 查看em端口

端口在$ORACLE_HOME\install下面的portlist.ini文件中查到

也可以到这个目录下的emca.properties文件中查看em端口:/.../sysman/config/emca.properties。其中 /.../为你的Oracle安装路径,我的为/oracle/oracle10g/sysman/config。


  • em的相关概念:

  Oracle10G的EM采用了web方式,并且分成了2个产品,database control和grid control。Grid control需要下载单独的光盘安装。在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysman的schema,用于保存EM的一些数据,这个就是EM的资料库(repository)。使用命令行工具emca可以创建,修改,重建或者删除dbcontrol的配置。


阅读(4547) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~