删除和创建EM的方法

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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值