posts - 495,comments - 227,trackbacks - 0

          OEM 控制臺是運行在HTTP服務器上的web頁面(非常方便,可以遠程管理),該HTTP服務器將作為Grid Control 安裝的一部分安裝和配置,沒有任何客戶端安裝。 將中心 Console、多個代理、公共服務以及工具結為一體,提供一個集成的綜合性系統管理平臺,管理 Oracle 數據庫環境,因此Oracle公司大力推薦DBA們使用EM來進行管理Oracle。

          使用 Oracle Enterprise Manager Console,可以執行以下任務:

          ·管理、診斷和調整多個遠程系統。
          ·在多個節點上,按不同的時間間隔調度作業。
          ·監視整個網絡范圍內的服務和事件。
          ·管理管理員,實現 Oracle Enterprise Manager 管理員間的信息共享。
          ·將遠程系統分組組織,便于管理和監視。
          ·管理 Oracle Parallel Server。
          ·從任何一個授權位置上通過 Management Server 管理您的數據庫網絡。
          ·管理集成使用的 Oracle 和第三方工具。 

          使用命令行工具emca可以創建,修改,重建或者刪除dbcontrol的配置。

          SQL > select * from v$version                                             
          Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
          PL/SQL Release 11.2.0.1.0 - Production
          CORE    11.2.0.1.0      Production
          TNS for Linux: Version 11.2.0.1.0 - Production
          NLSRTL Version 11.2.0.1.0 - Production

           

          由于要在數據庫中建EM資料庫,數據庫和監聽都必須已經啟動并正常工作。

          配置dbcontrol(如果你提前配置的話,啟動emctl 等命令會出現錯誤DB Console start error:OC4J Configuration issue滴)

          [oracle~]$ emca -config dbcontrol db

          STARTED EMCA at Aug 16, 2010 3:50:49 PM
          EM Configuration Assistant, Version 11.2.0.0.2 Production
          Copyright (c) 2003, 2005, Oracle.  All rights reserved.

          Enter the following information:
          Database SID: blogbench
          Listener port number: 1521
          Listener ORACLE_HOME [ /mnt/ddb/1/app/oracle/product/11.2.0/dbhome_1 ]:
          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 ................ /mnt/ddb/1/app/oracle/product/11.2.0/dbhome_1

          Local hostname ................ %%%

          Listener ORACLE_HOME ................ /mnt/ddb/1/app/oracle/product/11.2.0/dbhome_1
          Listener port number ................ 1521
          Database SID ................ ceshi

          Email address for notifications ...............
          Outgoing Mail (SMTP) server for notifications ...............

          -----------------------------------------------------------------
          Do you wish to continue? [yes(Y)/no(N)]: y
          Aug 16, 2010 3:51:35 PM oracle.sysman.emcp.EMConfig perform
          INFO: This operation is being logged at /mnt/ddb/1/app/oracle/cfgtoollogs/emca/blogbench/emca_2010_08_16_15_50_48.log.
          Aug 16, 2010 3:51:36 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
          INFO: Uploading configuration data to EM repository (this may take a while) ...
          Aug 16, 2010 3:52:18 PM oracle.sysman.emcp.EMReposConfig invoke
          INFO: Uploaded configuration data successfully
          Aug 16, 2010 3:52:20 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
          INFO: Software library configured successfully.
          Aug 16, 2010 3:52:20 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
          INFO: Deploying Provisioning archives ...
          Aug 16, 2010 3:52:42 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
          INFO: Provisioning archives deployed successfully.
          Aug 16, 2010 3:52:42 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
          INFO: Securing Database Control (this may take a while) ...
          Aug 16, 2010 3:52:56 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
          INFO: Database Control secured successfully.
          Aug 16, 2010 3:52:56 PM oracle.sysman.emcp.util.DBControlUtil startOMS
          INFO: Starting Database Control (this may take a while) ...
          Aug 16, 2010 3:53:13 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
          INFO: Database Control started successfully
          Aug 16, 2010 3:53:13 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
          INFO: >>>>>>>>>>> The Database Control URL is https://%%%:1158/em <<<<<<<<<<<
          Aug 16, 2010 3:53:15 PM oracle.sysman.emcp.EMDBPostConfig invoke

          ***********************************************************
          Enterprise Manager configuration completed successfully
          FINISHED EMCA at Aug 16, 2010 3:53:15 PM

           

          配置完畢后就可以登錄https://%%%:1158/em(這個我記得以前Oracle 10g的時候支持的可是http協議,看來11g在安全性上又做了相應的提升)進行管理數據庫了,可以查看數據庫的很多運行狀態。

           

          其他常用的命令語法:

          emca -repos create創建一個EM資料庫

          emca -repos recreate重建一個EM資料庫 (可以解決OracleService*、OracleDBConsole*無法啟動的問題)

          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環境變量

          emctl status console查看EM console的服務狀態,使用前需要先設置ORACLE_SID環境變量

          注:通過查看$ORACLE_HOME/install/readme文件可以知道當前dbcontrol正在使用的端口,默認dbcontrol http端口1158,agent端口3938。如果要重新配置端口,可以使用如下命令:

          emca -reconfig ports -dbcontrol_http_port 1159

          emca -reconfig ports -agent_port 3939

          使用命令行工具emctl可以啟動/停止console服務,察看服務狀態等。

          配置dbconsole的步驟
          emca -repos create
          emca -config dbcontrol db
          emctl start dbconsole

          重新配置dbconsole的步驟
          emca -repos drop
          emca -repos create
          emca -config dbcontrol db
          emctl start dbconsole

          posted on 2011-07-19 18:50 SIMONE 閱讀(5748) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 洞口县| 揭西县| 通渭县| 繁昌县| 宽甸| 尚义县| 桦南县| 靖宇县| 乌苏市| 沙雅县| 西丰县| 云浮市| 汝南县| 子长县| 绥宁县| 姚安县| 雷山县| 贵南县| 太保市| 新竹县| 永年县| 承德市| 武邑县| 南木林县| 武定县| 张家港市| 太谷县| 琼结县| 新泰市| 阳曲县| 谷城县| 新竹县| 卢湾区| 桃江县| 天津市| 方正县| 咸宁市| 鹤庆县| 天水市| 定兴县| 武安市|