How To Deinstall Oracle Home In 11GR2

How To Deinstall Oracle Home In 11GR2

Oracle 11g R2的Deinstall较复杂,要根据提示输入一大堆信息,然后复制很多文件到/tmp,如果是GRID,还会分发到其他节点,一共好几百M!成功后再要求以root执行uninstall。这样很是不爽快。最快速的删除办法是:

rm -rf  $ORACLE_HOME
rm -rf  $ORACLE_BASE
rm -rf  /etc/ora*

--------------对于单实例的Oracle数据库应该可以,而如果使用asm grid 等安装的系统,个人感觉不简单rm就能解决问题了.

以下是官方的deinstall文档:

Goal

Goal of this document is to know the steps of deinstalling Oracle Home in 11GR2 environment.

Solution

Hands On Document for deinstalling Oracle Home in 11GR2.

From 11gr2, de-installing Oracle Home should be done by deinstall tool provided separately. De-installation from new OUI is desupported.

There are two ways to deinstall Oracle Home.
1- By using deinstall utility installed inside the Oracle home.
2- By downloading deinstall utility from Oracle Site and use it from outside Oracle Home.

De-installing Oracle Home using home deinstall utility
1- Go to the $ORACLE_HOME/deinstall folder.
2- Invoke deinstall utility.
%deinstall
3- Answer the questions it asks interactively. Typical questions are;

-Specify all Single Instance listeners that are to be de-configured:
-Specify the list of database names that are configured in this Oracle home:
-Specify the type of this database (1.Single Instance Database|2.Oracle Restart Enabled Database)
-Specify the diagnostic destination location of the database
-Specify the storage type used by the Database
-Specify the list of directories if any database files exist on a shared file system. If 'upgrade' subdirectory is found, then it will be deleted. Otherwise, the specified directory will be deleted. Alternatively, you can specify list of database files with full path
-Specify the flash recovery area location, if it is configured on the file system. If 'upgrade' subdirectory is found, then it will be deleted.
-Specify the database spfile location

4- After taking all inputs, it will start de-install operation. Logs will be created under <central_inventory>/logs folder

5- After successful completion check if inventory is updated properly.
6- Check if OracleHome folder is deleted. If not then you have to remove it manually.

De-installing Oracle Home using external deinstall utility

If Oracle Home deinstall utility has some issue and you want to deinstall home then you can download separate deinstall utility from OTN and use it.

1- Download and unzipped deinstall utility in some folder outside Oracle Home.
2- Go to the deinstall folder.
3- Invoke deinstall utility with –home option specifying full path of the Oracle Home you want to deinstall. Example:
% ./deinstall –home /u01/app/oracle/product/11.2.0/dbhome_2

4- If you want non-interactive deinstall you can use the –silent option with parameter file. Example:
%./deinstall –home /u01/app/oracle/product/11.2.0/dbhome_2 –silent <path for response file>

example response file located in /deinstall/response/deinstall.rsp.tmpl. You can modify it and use it.

5- Check the logs created under <central_inventory>/logs folder for any issue.
6- Check the inventory is updated properly.
7- Check if Oracle home folder is deleted or not. If not then you have to remove it manually.

LOG LOCATION
- deinstall tool creates logs as per this logic.
a) If there are other oracle home (OUI based) exist in this Host except one which you are installing then it will create log under <central_inventory>/log folder.
b) If this is last Oracle Home to be deinstalled then current central inventory will also get deleted along with deinstall , therefore in this case it will choose log locations in following order.
- It will create log directory in current location where deinstall utility is launched .
- If current folder is not writable or remotely mounted (permission issues ) then it will create user home directory (/home/oracle) as next option.
- If above all criteria not meeting then it will proceed to create log directory under user TEMP location (/tmp).

How To Deinstall Oracle Home In 11GR2? [ID 883743.1]

<EOF>

posted @ 2010-12-10 15:53  dbblog  阅读(1306)  评论(0编辑  收藏  举报