ORACLE 11g在Linux下手工配置EM

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

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

          $ emca -config dbcontrol db -repos recreate

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

          Mar 312012 4:16:06 PM oracle.sysman.emcp.EMReposConfig createRepository
          CONFIG: ORA-00604: error occurred at recursive SQL level 1
          ORA-01653: unable to extend table SYS.SOURCE$ by 128 in tablespace SYSTEM
          oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-00604: error occurred at recursive SQL level 1
          ORA-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 312012 4:16:06 PM oracle.sysman.emcp.EMReposConfig invoke
          SEVERE: 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

          posted on 2012-04-05 11:08 kuuyee 閱讀(5267) 評論(1)  編輯  收藏 所屬分類: Linux數據庫系統管理

          導航

          <2012年4月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          統計

          隨筆分類(139)

          Linux內核

          搜索

          •  

          積分與排名

          • 積分 - 320251
          • 排名 - 178

          最新評論

          閱讀排行榜

          主站蜘蛛池模板: 禄丰县| 重庆市| 安塞县| 孟州市| 郧西县| 平罗县| 开江县| 武宣县| 汉中市| 华宁县| 霍州市| 仙游县| 昆明市| 新龙县| 大丰市| 望奎县| 恭城| 图木舒克市| 乡宁县| 彭阳县| 蚌埠市| 鄂托克旗| 班戈县| 伊川县| 呼图壁县| 龙海市| 双桥区| 承德县| 湘潭县| 镇安县| 绥芬河市| 南部县| 精河县| 松江区| 弋阳县| 渝中区| 自治县| 乐山市| 宁远县| 松滋市| 武城县|