天天看點

配置oracle11g EM db control

原文位址: 配置oracle11g EM dbcontrol 作者: 蘭博wk oracle從10g以來一直大力推薦dba通過EM來進行管理,不管個人的喜好如何,都不能否認EM還是具有很強的易用性的。   前陣子裝好了11g後,發現oracle11g文檔很多快速管理指南的内容都是通過EM來進行的,但我在文檔上并沒找到EM的安裝說明,于是試着通過10g的說明來對其進行配置。   從安裝軟體上看,我并沒找到gridcontrol部分,不知道是不是還沒有推出,下面簡單描述一下db control的配置過程以及遇到的幾個問題。  跟10g的方法相仿,oracle11g也可以通過EMCA來配置dbcontrol(在裝資料庫時候用dbca可以同時建立em)  登陸oracle使用者,執行emca-h指令後可以看到emca的各種配置參數及選項,具體參數的說明可以參考10g中的說明(可在Introduction toEnterprise Manager Advanced Configuration中找到)。執行emca -configdbcontrol db -reposcreate,按提示輸入一些配置後,建立過程開始,可惜建到一半後,SYSAUX空間不足,報錯退出了。看來自10G以後SYSAUX空間的要求越來越大了,這裡要注意,不光是sysaux表空間,system表空間也要有足夠的空閑。   擴充表空間後執行emca -config dbcontrol db -reposrecreate準備重新開始建立,結果剛一開始就報錯退出了,竟然是報沒有tns監聽,lsnrctlstatus檢查監聽是啟的,用配置的tnsnames連接配接資料庫也能連上,想了很久後懷疑跟監聽沒有采用動态注冊方式有關,可按道理在一些預設條件達成的情況的下,動态注冊是自動生效的。lsnrctlstatus指令再看了一下,動态注冊果然沒有啟動,沒辦法隻能試試強制指定了,tnsnames裡增加 listener1=

  (DESCRIPTION=

    (ADDRESS=(PROTOCOL=tcp)(HOST=oratest)(PORT=1521))

   ) 并指定local_listener=listener1後,動态注冊立即生效了。至于為啥,我不知道,新特性還是bug?以後再說吧(10G沒怎麼玩過,不知道有沒這個問題) 重新執行emca -config dbcontrol db -reposrecreate,成功,開始drop以前的配置了,之後一切順利,執行過程及結果消息如下: $ emca -config dbcontrol db -repos recreate STARTED EMCA at Aug 29, 2007 8:40:57 AM

EM Configuration Assistant, Version 11.1.0.5.0 Production

Copyright (c) 2003, 2005, Oracle.  All rightsreserved. Enter the following information:

Database SID: test11g

Listener port number: 1521

Password for SYS 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 ................/oracle11g/product/11g Local hostname ................ oratest

Listener port number ................ 1521

Database SID ................ test11g

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ............... -----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: Y

Aug 29, 2007 8:41:20 AM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at/oracle11g/cfgtoollogs/emca/test11g/emca_2007_08_29_08_40_56.log.

Aug 29, 2007 8:41:30 AM oracle.sysman.emcp.EMReposConfiginvoke

INFO: Dropping the EM repository (this may take a while) ...

Aug 29, 2007 8:50:26 AM oracle.sysman.emcp.EMReposConfiginvoke

INFO: Repository successfully dropped

Aug 29, 2007 8:50:28 AM oracle.sysman.emcp.EMReposConfigcreateRepository

INFO: Creating the EM repository (this may take a while) ...

Aug 29, 2007 9:16:21 AM oracle.sysman.emcp.EMReposConfiginvoke

INFO: Repository successfully created

Aug 29, 2007 9:17:05 AM oracle.sysman.emcp.EMReposConfiguploadConfigDataToRepository

INFO: Uploading configuration data to EM repository (this may takea while) ...

Aug 29, 2007 9:20:57 AM oracle.sysman.emcp.EMReposConfiginvoke

INFO: Uploaded configuration data successfully

Aug 29, 2007 9:21:22 AM oracle.sysman.emcp.util.DBControlUtilconfigureSoftwareLib

INFO: Software library configured successfully.

Aug 29, 2007 9:21:22 AM oracle.sysman.emcp.EMDBPostConfigconfigureSoftwareLibrary

INFO: Deploying Provisioning archives ...

Aug 29, 2007 9:26:27 AM oracle.sysman.emcp.EMDBPostConfigconfigureSoftwareLibrary

INFO: Provisioning archives deployed successfully.

Aug 29, 2007 9:26:27 AM oracle.sysman.emcp.util.DBControlUtilsecureDBConsole

INFO: Securing Database Control (this may take a while) ...

Aug 29, 2007 9:27:34 AM oracle.sysman.emcp.util.DBControlUtilsecureDBConsole

INFO: Database Control secured successfully.

Aug 29, 2007 9:27:34 AM oracle.sysman.emcp.util.DBControlUtilstartOMS

INFO: Starting Database Control (this may take a while) ...

Aug 29, 2007 9:36:05 AM oracle.sysman.emcp.EMDBPostConfigperformConfiguration

INFO: Database Control started successfully

Aug 29, 2007 9:36:08 AM oracle.sysman.emcp.EMDBPostConfigperformConfiguration

INFO:>>>>>>>>>>>The Database Control URL is https://oratest:1158/em<<<<<<<<<<<

Aug 29, 2007 9:37:50 AM oracle.sysman.emcp.EMDBPostConfiginvoke

WARNING:

************************ WARNING  ************************ Management Repository has been placed in secure mode whereinEnterprise Manager data will be encrypted.  Theencryption key has been placed in the file:/oracle11g/product/11g/oratest_test11g/sysman/config/emkey.ora.  Please ensure this file is backed up as the encrypted data willbecome unusable if this file is lost. ***********************************************************

Enterprise Manager configuration completed successfully

FINISHED EMCA at Aug 29, 2007 9:37:51 AM   emkey.ora是密鑰的所在地是以如果在生成系統上還是需要備份好的。

$ more/oracle11g/product/11g/oratest_test11g/sysman/config/emkey.ora

KEY=056790FE22685160158605895E3E62FC06D7C153C224D99BAA82236AD677DD962B974B3BDA0A678E9D8278C75662EFEB5A8EB793695A79C131F79B8F8BDBBD03

80955F67D1BFBE675F5E20B9DC6B710A92 都完成之後,執行emctl status dbconsole可以檢視狀态,emctl startdbconsole和emctl stop dbconsole可以對Database Control ConsoleProcess進行啟停。預設端口依然跟10G一樣是1158,不過似乎不在支援http,隻能用https登陸。我從遠端用ie7登陸的時候會警告證書是錯誤的(linux本地上沒有問題),不用管它,繼續就可以看到em的登陸界面了,呵呵。  界面看起來挺友好的,具體功能有待日後研究。

轉載于:https://blog.51cto.com/hoarn/1364005