对于10g的数据库,其中有一个dbconsole 是用来管理oracle的web界面的,他是在数据库创建阶段产生的,dbconsole的默认监听端口是1521,所以在创建好数据库后,修改listener的端口为非1521时,需要手工删除dbconsole,然后重建,模拟情景如下:
1.修改默认1521监听,创建非默认1531端口的监听
[oracle@rac1 admin]$ lsnrctl stop listener --停掉默认listener
[oracle@rac1 admin]$ netca --新建1531端口listener:listener_new
[oracle@rac1 admin]$ more listener.ora
--新增部分
LISTENER_NEW =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1.domain.com)(PORT = 1531))
)
)
2.动态注册非默认端口
[oracle@rac1 bdump]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jun 1 23:13:42 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.s
SQL> conn / as sysdba
Connected.
SQL> ALTER SYSTEM SET local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=rac1.domain.com)(PORT=1531))' SCOPE=BOTH SID='devdb1';
3.查看新非默认端口注册状态
[oracle@rac1 bdump]$ lsnrctl status listener_new
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 01-JUN-2009 23:37:52
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1.domain.com)(PORT=1531)))
STATUS of the LISTENER
------------------------
Alias LISTENER_NEW
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 01-JUN-2009 20:37:52
Uptime 0 days 3 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_new.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.domain.com)(PORT=1531)))
Services Summary...
Service "devdb" has 1 instance(s).
Instance "devdb1", status READY, has 1 handler(s) for this service...
Service "devdbXDB" has 1 instance(s).
Instance "devdb1", status READY, has 1 handler(s) for this service...
Service "devdb_XPT" has 1 instance(s).
Instance "devdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac1 bdump]$ 备注:READY表示动态注册
4.emctl status dbconsole
此时重启一下emctl stop/start dbconsole以后,之前的https://192.168.230.66:1158/em/console/已经无法登陆了,关掉dbconsole,重建。
[oracle@rac1 bdump]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://rac1.domain.com:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.
5.Drop DB Control keeping the repository
This emca command does the following:
- stop the DB Control (dbconsole, agent) on all nodes of the cluster
- remove all DB Control related directories on all nodes of the cluster
- The repository has not been dropped.
- You can then if needed recreate DBControl without recreating the repository.
a.检查dbconsole的状态
[oracle@rac1 bdump]$ emca -displayConfig dbcontrol -cluster
STARTED EMCA at Jun 1, 2009 11:43:02 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: devdb
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 1, 2009 11:43:09 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/devdb/emca_2009-06-01_11-43-02-PM.log.
Jun 1, 2009 11:43:13 PM oracle.sysman.emcp.ParamsManager getInaccessibleNodeList
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------
devdb1 rac1 rac1.domain.com
b.删掉dbconsole中的信息
[oracle@rac1 bdump]$ emca -deconfig dbcontrol db
STARTED EMCA at Jun 1, 2009 11:46:20 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: devdb1
Do you wish to continue? [yes(Y)/no(N)]: yes
Jun 1, 2009 11:46:25 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/devdb/emca_2009-06-01_11-46-20-PM.log.
Jun 1, 2009 11:46:28 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 1, 2009 11:47:22 PM
6.Configure DB Control 配置新的dbconsole
[oracle@rac1 bdump]$ emca -config dbcontrol db
STARTED EMCA at Jun 1, 2009 11:54:55 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: devdb1
Listener port number: 1531
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 ................ /u01/app/oracle/product/10.2.0/db_1
Database hostname ................ rac1.domain.com
Listener port number ................ 1531
Database SID ................ devdb1
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 1, 2009 11:56:58 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/devdb/emca_2009-06-01_11-54-55-PM.log.
Jun 1, 2009 11:57:18 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jun 1, 2009 11:57:58 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jun 1, 2009 11:57:58 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 1, 2009 11:59:42 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 1, 2009 11:59:42 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://rac1.domain.com:5500/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 1, 2009 11:59:42 PM
7.check status dbconsole
[oracle@rac1 bdump]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://rac1.domain.com:5500/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/rac1_devdb1/sysman/log
可以登陆,重建dbconsole成功
参考文献:http://space.itpub.net/9842/viewspace-349433
| Subject: | How to manage DB Control 10.2 for RAC Database with emca | |||
| Doc ID: | 395162.1 | Type: | BULLETIN | |
| Modified Date : | 21-JUL-2008 | Status: | PUBLISHED | |