ORACLE 11g在Linux下手工配置EM

來源:互聯網
上載者:User

使用OTK工具安裝的Oracle預設沒有配置EM,下面記錄下配置和啟動過程!

首先建立EM,執行下面的命令

$ emca -config dbcontrol db -repos recreate

我第一次運行報如下錯誤:

Mar 31, 2012 4:16:06 PM oracle.sysman.emcp.EMReposConfig createRepositoryCONFIG: ORA-00604: error occurred at recursive SQL level 1ORA-01653: unable to extend table SYS.SOURCE$ by 128 in tablespace SYSTEMoracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-00604: error occurred at recursive SQL level 1ORA-01653: unable to extend table SYS.SOURCE$ by 128 in tablespace SYSTEM        at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)        at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:1000)        at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:339)        at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:380)        at oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:510)        at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:228)        at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)        at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)        at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)        at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)        at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)        at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)Mar 31, 2012 4:16:06 PM oracle.sysman.emcp.EMReposConfig invokeSEVERE: Error creating the repository

解決辦法

使用SYS使用者登入sqlplus,然後執行下面的語句:

SQL> SELECT * FROM DBA_DATA_FILES where TABLESPACE_NAME = 'SYSTEM'; FILE_NAME     FILE_ID TABLESPACE_NAME                     BYTES     BLOCKS STATUS  RELATIVE_FNO AUT   MAXBYTES  MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS  ONLINE_  /data01/rdbms/wcdb/datafile/wcdb_system_01.dbf          1 SYSTEM                          536870912      65536 AVAILABLE            1 NO           0          0            0  535822336       65408 SYSTEM

然後新定義個空間檔案wcdb_system_02.dbf,注意不要重名

然後新定義個空間檔案*wcdb_system_02.dbf*,注意不要重名

SQL> ALTER TABLESPACE SYSTEM ADD DATAFILE '/data01/rdbms/wcdb/datafile/wcdb_system_02.dbf' SIZE 500M; Tablespace altered.

然後再次執行EM建立成功!

EM的訪問地址:https://localhost:1158/em

刪除一個EM資料庫

$ emca -repos drop

設定資料庫的 Database Control

$ emca -config dbcontrol db

刪除資料庫的 Database Control配置

$ emca -deconfig dbcontrol db

重新設定db control的連接埠,預設連接埠在1158

$ emca -reconfig ports $ emca -reconfig ports -dbcontrol_http_port 1160 $ emca -reconfig ports -agent_port 3940

先設 置ORACLE_SID環境變數後,啟動EM console服務

$ emctl start dbconsole

先設定 ORACLE_SID環境變數後,停止EM console服務

$ emctl stop dbconsole

先設定ORACLE_SID環 境變數後,查看EM console服務的狀態

$ emctl status dbconsole

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.