1. Deleting Database Control Objects 刪除數據庫控制對象.
官方文檔上說一共有六種刪除數據庫控制對象的方法. 實際上我就看見5種.不知那位高人能看見第六種啊.
Option 1: Deleting Database Control Configuration Files Using EMCA Scripts 使用EMCA腳本刪除數據庫控制文件.
對於單個實例使用如下腳本
$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db
對於集羣實例使用如下腳本
$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db –cluster
-deconfig 是必須的.不然會引起一些錯誤.
Option 2: Deleting Database Control Configuration Files and Repository Objects Using An EMCA Script 使用EMCA腳本刪除數據庫控制文件和repository對象.
單個實例使用如下命令
$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop
集羣實例使用如下命令
$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop –cluster
注意這個命令把數據庫放到了Quiesce Mode下.
Option 3: Deleting A Database Control Repository Using EMCA Scripts 使用EMCA腳本刪除repository對象.
單個實例使用如下命令
$ $ORACLE_HOME/bin/emca –repos drop
集羣實例使用如下命令
$ $ORACLE_HOME/bin/emca -repos drop -cluster
注意這個命令把數據庫放到了Quiesce Mode下.
Option 4: Deleting Database Control Configuration Files Manually 手工刪除數據庫控制文件.
從你的系統中刪除如下目錄
$ $ORACLE_HOME/ hostname_sid
$ $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_ hostname _sid
在windows中你需要刪除服務.如下:
1. Run regedit. 運行註冊表
2. Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services. 在註冊表的位置中找到 oracleDBConsolesid條目並刪除它。
3. Locate the OracleDBConsolesid entry and delete it.
在XP或者2003下面也可以運行下面的指令
sc delete service_name
也可以用delsrv.exe 刪除這個服務.
Option 5: Deleting the Database Control Repository Using RepManager 使用RepManager刪除數控控制Repository
這種方法不徹底也不能使用這種方法創建Repository對象.
$ $ORACLE_HOME/sysman/admin/emdrep/bin/RepManager hostname listener_port sid -action drop
Creating Database Control Objects 創建數據庫控制對象.
有三種方法可以創建對象
Option 1: Creating the DB Control Configuration Files
不會創建repository 對象
Run the following command for a single-instance database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db
Run the following command for an Oracle RAC database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -cluster
Option 2: Creating the Database Control Repository Objects and Configuration Files
可創建配置文件和repositiory對象.
Run the following command for a single-instance database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos create
Run the following command for an Oracle RAC database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos create –cluster
Option 3: Creating the Database Control Repository Objects and Configuration Files For a Cloned Database Home
原話說的從database home克隆一個. 估計就是複製舊的.
Run the following command for a single-instance database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate
Run the following command for an Oracle RAC database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate -cluster
Re-Creating Or Reconfiguring Database Control 重建或者重新配置數據庫控件
Option 1: Re-Creating the Database Control Configuration Files Only (Leaving Repository Intact)
只重建數據庫控制配置文件.
Run the following command for a single-instance database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db
Run the following command for an Oracle RAC database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -cluster
Option 2: Re-Creating the Database Control Configuration Files and Repository
重建數據庫控制配置文件和reposityory文件.
Run the following command for a single-instance database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate
Run the following command for an Oracle RAC database:
$ $ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate -cluster