Oracle 11g在Linux下手工配置EM

來源:互聯網
上載者:User

Oracle 11g在Linux下手工配置EM

本文永久更新連結地址:
使用OTK工具安裝的Oracle預設沒有配置EM,下面記錄下配置和啟動過程!

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

$ emca -config dbcontrol db -repos recreate

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

Mar 31, 2012 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 31, 2012 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

 

在CentOS 6.4下安裝Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虛擬機器中安裝步驟

Debian 下 安裝 Oracle 11g XE R2

相關文章

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.