emca配置oracle 10g的em

http://hi.baidu.com/sengehao/blog/item/3d52ea0366a165fc08fa93a6.html

emca配置oracle 10g的em

 

D:\Documents and Settings\xxx>emca
E:\oracle\product\10.2.0\db_1\bin\emca.bat [操作] [模式] [数据库类型] [标记] [参数]-h | --h | -help | --help: 打印此帮助消息-version: 打印版本-config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup]
[参数]: 配置数据库的 Database Control
-config centralAgent (db | asm) [-cluster] [-silent] [参数]: 配置中心代理管理
-config all db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [参数]: 配置 Database Control 和中心代理管理
-deconfig dbcontrol db [-repos drop] [-cluster] [-silent] [参数]: 取消配置 Database Control
-deconfig centralAgent (db | asm) [-cluster] [ -silent] [参数]: 取消配置中心代理管理
-deconfig all db [-repos drop] [-cluster] [-silent] [参数]: 取消配置 Database Control 和中心代理管理
-addInst (db | asm) [-silent] [参数]: 为新的 RAC 实例配置 EM
-deleteInst (db | asm) [-silent] [参数]: 取消为指定的 RAC 实例配置 EM
-reconfig ports [-cluster] [参数]: 重新明确分配 Database Control 端口
-reconfig dbcontrol -cluster [-silent] [参数]: 重新配置 RAC Database Control 部署
-displayConfig dbcontrol -cluster [-silent] [参数]: 显示有关 RAC Database Control 配置的信息
-upgrade (db | asm | db_asm) [-cluster] [-silent] [参数]: 将较低版本的 EM 配置升级到当前版本
-restore (db | asm | db_asm) [-cluster] [-silent] [参数]: 将当前版本的 EM 配置复原到较低版本
参数和选项:
[参数]: [ -respFile 文件名 ] [ -paramName paramValue ]*
db: 对数据库 (包括使用 ASM 的数据库) 执行配置操作
asm: 仅对 ASM 实例执行配置操作
db_asm: 对数据库和 ASM 实例执行升级/复原操作
-repos create: 创建新的 Database Control 资料档案库
-repos drop: 删除当前的 Database Control 资料档案库
-repos recreate: 删除当前的 Database Control 资料档案库并重新创建一个
-cluster: 对 RAC 数据库执行配置操作
-silent: 在不提示参数的情况下执行配置操作
-backup: 配置数据库的自动备份
单实例数据库的参数
       HOST: 数据库主机名
       SID: 数据库 SID
       PORT: 监听程序端口号
       ORACLE_HOME: 数据库 ORACLE_HOME
       HOST_USER: 自动备份的主机用户名
       HOST_USER_PWD: 自动备份的主机用户口令
       BACKUP_SCHEDULE: 自动备份调度 (HH:MM)
       EMAIL_ADDRESS: 通知的电子邮件地址
       MAIL_SERVER_NAME: 通知的发件 (SMTP) 服务器
       ASM_OH: ASM ORACLE_HOME
       ASM_SID: ASM SID
       ASM_PORT: ASM 端口
       ASM_USER_ROLE: ASM 用户角色
       ASM_USER_NAME: ASM 用户名
       ASM_USER_PWD: ASM 用户口令
       SRC_OH: 要升级的数据库的 ORACLE_HOME
       DBSNMP_PWD: DBSNMP 用户的口令
       SYSMAN_PWD: SYSMAN 用户的口令
       SYS_PWD: SYS 用户的口令
       DBCONTROL_HTTP_PORT: Database Control HTTP 端口
       AGENT_PORT: EM 代理端口
       RMI_PORT: Database Control 的 RMI 端口
       JMS_PORT: Database Control 的 JMS 端口
集群数据库的其它参数
       CLUSTER_NAME: 集群名
       DB_UNIQUE_NAME: 数据库的唯一名称
       SERVICE_NAME: 服务名
       EM_NODE: Database Control 节点名
       EM_SID_LIST: 代理 SID 列表 [以逗号分隔] 

启动报错
testhost:{/oracle}$emctl start dbconsole
OC4J Configuration issue. /oracle/app/oracle/product/10.2/oc4j/j2ee/OC4J_DBConsole_testhost_testdb not found. 
删除

testhost:{/oracle/app/oracle/product/10.2/network/admin}$emca -repos drop
STARTED EMCA at Oct 20, 2008 3:08:52 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.   All rights reserved.
Enter the following information:
Database SID: testdb
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 20, 2008 3:09:04 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/app/oracle/product/10.2/cfgtoollogs/emca/testdb/emca_2008-10-20_03-08-52-PM.log.
Oct 20, 2008 3:09:04 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Oct 20, 2008 3:09:46 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 20, 2008 3:09:46 PM
testhost:{/oracle/app/oracle/product/10.2/network/admin}$
创建

testhost:{/oracle}$emca -repos create
STARTED EMCA at Oct 20, 2008 3:10:47 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.   All rights reserved.
Enter the following information:
Database SID: testdb
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 20, 2008 3:10:58 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/app/oracle/product/10.2/cfgtoollogs/emca/testdb/emca_2008-10-20_03-10-47-PM.log.
Oct 20, 2008 3:10:58 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Oct 20, 2008 3:12:27 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 20, 2008 3:12:27 PM
配置
testhost:{/oracle}$emca -config dbcontrol db 
STARTED EMCA at Oct 20, 2008 3:13:13 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.   All rights reserved.
Enter the following information:
Database SID: testdb
Database Control is already configured for the database testdb
You have chosen to configure Database Control for managing the database testdb
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: 1521
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /oracle/app/oracle/product/10.2
Database hostname ................ testhost
Listener port number ................ 1521
Database SID ................ testdb
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 20, 2008 3:13:43 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/app/oracle/product/10.2/cfgtoollogs/emca/testdb/emca_2008-10-20_03-13-13-PM.log.
Oct 20, 2008 3:13:45 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Oct 20, 2008 3:13:52 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 20, 2008 3:14:24 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 20, 2008 3:14:24 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 20, 2008 3:16:05 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 20, 2008 3:16:05 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://testhost:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 20, 2008 3:16:05 PM
ORACLE RAC数据库
删除
testhost1:{/oracle}$emca -repos drop -cluster
STARTED EMCA at Oct 20, 2008 4:07:33 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.   All rights reserved.
Enter the following information:
Database unique name: nmyzdb
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 20, 2008 4:07:48 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/app/oracle/product/10.2/cfgtoollogs/emca/nmyzdb/emca_2008-10-20_04-07-33-PM.log.
Oct 20, 2008 4:07:50 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
删除的时候会整体锁住数据库,对数据库的任何访问都没有反应,因此手工中断了删除
创建
testhost1:{/oracle}$emca -repos create -cluster
STARTED EMCA at Oct 20, 2008 4:24:30 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.   All rights reserved.
Enter the following information:
Database unique name: nmyzdb
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user: ge
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 20, 2008 4:24:57 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/app/oracle/product/10.2/cfgtoollogs/emca/nmyzdb/emca_2008-10-20_04-24-30-PM.log.
Oct 20, 2008 4:24:59 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Oct 20, 2008 4:28:31 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 20, 2008 4:28:31 PM
testhost1:{/oracle}$
配置
testhost1:{/oracle}$emca -config dbcontrol db -cluster
STARTED EMCA at Oct 20, 2008 4:32:26 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.   All rights reserved.
Enter the following information:
Database unique name: nmyzdb
Listener port number: 1521
Cluster name: nmyzdb
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /oracle/app/oracle/product/10.2
Database instance hostname ................ testhost1
Listener port number ................ 1521
Cluster name ................ nmyzdb
Database unique name ................ nmyzdb
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 20, 2008 4:33:03 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/app/oracle/product/10.2/cfgtoollogs/emca/nmyzdb/emca_2008-10-20_04-32-26-PM.log.
Oct 20, 2008 4:33:08 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/app/oracle/product/10.2/oc4j/j2ee/OC4J_DBConsole_testhost1_testdb1 to remote nodes ...
Oct 20, 2008 4:33:08 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/app/oracle/product/10.2/oc4j/j2ee/OC4J_DBConsole_testhost2_testdb2 to remote nodes ...
Oct 20, 2008 4:33:09 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir
INFO: Propagating /oracle/app/oracle/product/10.2/oc4j/j2ee/isqlplus_testhost1 to remote nodes ...
Oct 20, 2008 4:33:10 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir
INFO: Propagating /oracle/app/oracle/product/10.2/oc4j/j2ee/isqlplus_testhost2 to remote nodes ...
Oct 20, 2008 4:33:13 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/app/oracle/product/10.2/testhost1_testdb1 to remote nodes ...
Oct 20, 2008 4:33:15 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/app/oracle/product/10.2/testhost2_testdb2 to remote nodes ...
Oct 20, 2008 4:33:16 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 20, 2008 4:34:55 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 20, 2008 4:36:48 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 20, 2008 4:36:48 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://testhost1:1158/em <<<<<<<<<<<
Oct 20, 2008 4:36:48 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO: 
****************   Current Configuration   ****************
INSTANCE          NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------
testdb1           testhost1          testhost
testdb2           testhost2          testhost
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 20, 2008 4:36:48 PM
数据库的端口修改后,需要修改以下的文件中的端口号,em才能访问:
如果是RAC,那么两台机器都需要改
/oracle/app/oracle/product/10.2/testhost1_testdb1/sysman/config/emoms.properties
/oracle/app/oracle/product/10.2/testhost2_testdb2/sysman/config/emoms.properties
/oracle/app/oracle/product/10.2/testhost1_testdb1/sysman/emd/targets.xml
/oracle/app/oracle/product/10.2/testhost2_testdb2/sysman/emd/targets.xml

 

展开阅读全文

没有更多推荐了,返回首页