如何建立Oracle10G EM dbcontrol
在用DBCA建庫的時候,可以選擇是否啟用dbcontrol,啟用的話需要在資料庫中建立一個sysman的schema,用於儲存EM的一些資料,這個就是EM的資料庫(repository)。
使用命令列工具emca可以建立,修改,重建或者刪除dbcontrol的配置。
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL>
由於要在資料庫中建EM資料庫,資料庫和監聽都必須已經啟動並正常工作。
配置dbcontrol
[oracle@oracle10 ~]$ emca -config dbcontrol db
STARTED EMCA at Oct 27, 2007 9:33:48 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
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 ................ /opt/oracle/product/10.2.0/Database
Database hostname ................ oracle10
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 27, 2007 9:35:12 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2.0/Database/cfgtoollogs/emca/orcl/emca_2007-10-27_09-33-46-AM.log.
Oct 27, 2007 9:35:33 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Oct 27, 2007 9:36:39 AM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for oracle10
Oct 27, 2007 9:36:54 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 27, 2007 9:39:51 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 27, 2007 9:39:53 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 27, 2007 9:39:53 AM
[oracle@oracle10 ~]$
刪除資料庫的 Database Control配置
[oracle@oracle10 ~]$ emca -deconfig dbcontrol db
STARTED EMCA at Oct 27, 2007 10:44:24 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 27, 2007 10:44:47 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2.0/Database/cfgtoollogs/emca/orcl/emca_2007-10-27_10-44-22-AM.log.
Oct 27, 2007 10:44:52 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Oct 27, 2007 10:48:13 AM oracle.sysman.emcp.EMReposConfig stopDBMSJobs
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Oct 27, 2007 10:48:13 AM oracle.sysman.emcp.EMReposConfig invoke
WARNING: Unable to remove DBMS jobs.
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 27, 2007 10:51:01 AM
[oracle@oracle10 ~]$
此時執行emctl命令的顯示是:
[oracle@oracle10 ~]$ emctl status dbconsole
TZ set to PRC
OC4J Configuration issue. /opt/oracle/product/10.2.0/Database/oc4j/j2ee/OC4J_DBConsole_oracle10_orcl not found.
常用的命令語法:
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
使用命令列工具emctl可以啟動/停止console服務,察看服務狀態等。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-245793/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle10G EM dbcontrolOracle
- 【EM】重新建立EM Database ControlDatabase
- Oracle10g EM亂碼解決Oracle
- Oracle 11G EM建立Oracle
- oracle 10g em建立Oracle 10g
- Oracle10g EM亂碼之快速解決Oracle
- [zt] Oracle10g EM起不來解決方法Oracle
- 解決oracle10g EM主機驗證問題Oracle
- oracle10g中EM的有關問題解決Oracle
- Oracle10g EM使用中的主機身份證明問題!Oracle
- oracle10g最佳化:emd_maintenance.execute_em_dbms_job_procsOracleAINaN
- Oracle10g 建立物理DataGuard(一)Oracle
- Oracle10g 建立物理DataGuard(二)Oracle
- Oracle10g 建立物理DataGuard(三)Oracle
- Oracle10g logical standby 建立Oracle
- oracle10g建立使用者Oracle
- ORACLE 11G OCM備考之建立EM與EM登陸異常的處理Oracle
- 建立EM遇到歸檔Hang住ORA-19504
- oracle10g手工建立資料庫Oracle資料庫
- Oracle10G手動建立例項Oracle
- Oracle10g RAC em agent ORA-20603 問題解決Oracle
- oracle10g 物理standby dataguard 建立過程Oracle
- 建立DB的指令碼 (windows,oracle10g)指令碼WindowsOracle
- 建立 Oracle10g ASM 資料庫(1)OracleASM資料庫
- oracle10g之standby tempfile自動建立Oracle
- 11g裡建立OEM時的一個坑“emca -config dbcontrol db -repos recreate”
- (EM演算法)The EM Algorithm演算法Go
- EM
- 如何感性地理解EM演算法?演算法
- 建立oracle10g 11g分割槽表Oracle
- emca -deconfig/config dbcontrol db (三) for windowsWindows
- oracle10g 11g分割槽表建立舉例Oracle
- ORACLE EM recreateOracle
- windows drop emWindows
- 重建oracle EMOracle
- em 和 remREM
- oracle10g如何暫時禁用索引Oracle索引
- oracle10g data guard建立物理standby資料庫的例子Oracle資料庫