Wednesday, September 02, 2009

Oracle 11g R2 Features

Continuing on the previous posts, here is another gee-whiz feature of 11gR2 - the "deinstall" feature. Yes, that's right the deinstall one. Sometimes installations fail; sometimes you have to deinstall something to clean out the server for other use. Sometimes, I did, you have to clean out beta code to install production code. A deinstall utility stops all the processes, removes all the relevant software and components (such as diskgroups), updates all config files and make all necessary modifications to the other files. All these are done without you ever bothering about remnants that may cause issues later.

You have to download the deinstall software from 11gR2 download from OTN. Choose "see all" to get to that software.

Here is the demonstration of the deinstall utility:


[oracle@oradba2 deinstall]$ ./deinstall -home /opt/oracle/product/11.2/grid1
ORACLE_HOME = /opt/oracle/product/11.2/grid1
Location of logs /opt/oracle/oraInventory/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


######################## CHECK OPERATION START ########################
Install check configuration START


Checking for existence of the Oracle home location /opt/oracle/product/11.2/grid
1
Oracle Home type selected for de-install is: SIHA
Oracle Base selected for de-install is: /opt/oracle
Checking for existence of central inventory location /opt/oracle/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /opt/oracle/produc
t/11.2/grid1

Install check configuration END

Traces log file: /opt/oracle/oraInventory/logs//crsdc.log

Network Configuration check config START

Network de-configuration trace file location: /opt/oracle/oraInventory/logs/netd
c_check22387.log

Specify all Oracle Restart enabled listeners that are to be de-configured [LISTE
NER]:

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /opt/oracle/oraInventory/logs/asmcadc_
check22388.log

Automatic Storage Management (ASM) instance is detected in this Oracle home /opt/oracle/product/
11.2/grid1.
ASM Diagnostic Destination : /opt/oracle
ASM Diskgroups : +DATA1,+FRA1
Diskgroups will be dropped
De-configuring ASM will drop all the diskgroups and it's contents at cleanup time. This will aff
ect all of the databases and ACFS that use this ASM instance(s).


After some initial question and answer it shows a summary of activities and prompts you for a confirmation:


####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /opt/oracle/product/11.2/grid1
The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)null
Oracle Home selected for de-install is: /opt/oracle/product/11.2/grid1
Inventory Location where the Oracle home registered is: /opt/oracle/oraInventory
Following Oracle Restart enabled listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/opt/oracle/oraInventory/logs/deinstall_deconfig2009-09-02_02-12-22-PM.out'
Any error messages from this session will be written to: '/opt/oracle/oraInventory/logs/deinstall_deconfig2009-09-02_02-12-22-PM.err'



After you press "y", it starts the operation of a clean deinstallation. The output continues as shown below:


######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /opt/oracle/oraInventory/logs/asmcadc_clean22389.log
ASM Clean Configuration START
ASM deletion in progress. This operation may take few minutes.
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /opt/oracle/oraInventory/logs/netdc_clean22390.log

De-configuring Oracle Restart enabled listener(s): LISTENER

De-configuring listener: LISTENER
Stopping listener: LISTENER
Listener stopped successfully.
Unregistering listener: LISTENER
Listener unregistered successfully.
Deleting listener: LISTENER
Listener deleted successfully.
Listener de-configured successfully.

De-configuring Listener configuration file...
Listener configuration file de-configured successfully.

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


---------------------------------------->



At some point you will be asked to shutdown cssd, etc. which need root privileges. The deinstall utility shows a comamnd string you can run as root to accomplish this task:


Run the following command as the root user or the administrator on node "oradba2".

/opt/oracle/software/11gR2/deinstall/perl/bin/perl -I/opt/oracle/software/11gR2/deinstall/perl/lib -I/opt/oracle/software/11gR2/deinstall/crs/install /opt/oracle/software/11gR2/deinstall/crs/install/roothas.pl -force -delete -paramfile /opt/oracle/software/11gR2/deinstall/response/deinstall_Ora11g_gridinfrahome1.rsp

Press Enter after you finish running the above commands


Running the command on a different terminal as root:


[root@oradba2 ~]# /opt/oracle/software/11gR2/deinstall/perl/bin/perl -I/opt/oracle/software/11gR2/deinstall/perl/lib -I/opt/oracle/software/11gR2/deinstall/crs/install /opt/oracle/software/11gR2/deinstall/crs/install/roothas.pl -force -delete -paramfile /opt/oracle/software/11gR2/deinstall/response/deinstall_Ora11g_gridinfrahome1.rsp
2009-09-02 14:20:57: Checking for super user privileges
2009-09-02 14:20:57: User has super user privileges
2009-09-02 14:20:57: Parsing the host name
Using configuration parameter file: /opt/oracle/software/11gR2/deinstall/response/deinstall_Ora11g_gridinfrahome1.rsp
CRS-2673: Attempting to stop 'ora.cssd' on 'oradba2'
CRS-2677: Stop of 'ora.cssd' on 'oradba2' succeeded
CRS-4549: Stopping resources.
CRS-2673: Attempting to stop 'ora.diskmon' on 'oradba2'
CRS-2677: Stop of 'ora.diskmon' on 'oradba2' succeeded
CRS-4133: Oracle High Availability Services has been stopped.
ACFS-9200: Supported
Successfully deconfigured Oracle Restart stack


Now going back to the original terminal where deinstall was called from, press Enter. The output continues:


Oracle Universal Installer clean START

Detach Oracle home '/opt/oracle/product/11.2/grid1' from the central inventory on the local node : Done

Delete directory '/opt/oracle/product/11.2/grid1' on the local node : Done

The Oracle Base directory '/opt/oracle' will not be removed on local node. The directory is in use by Oracle Home '/opt/oracle/product/10.2/db1'.

The Oracle Base directory '/opt/oracle' will not be removed on local node. The directory is in use by central inventory.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


Oracle install clean START

Clean install operation removing temporary directory '/tmp/install' on node 'oradba2'

Oracle install clean END

Moved default properties file /opt/oracle/software/11gR2/deinstall/response/deinstall_Ora11g_gridinfrahome1.rsp as /opt/oracle/software/11gR2/deinstall/response/deinstall_Ora11g_gridinfrahome1.rsp1

######################### CLEAN OPERATION END #########################


####################### CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER
Oracle Restart was already stopped and de-configured on node "oradba2"
Oracle Restart is stopped and de-configured successfully.
Successfully detached Oracle home '/opt/oracle/product/11.2/grid1' from the central inventory on the local node.
Successfully deleted directory '/opt/oracle/product/11.2/grid1' on the local node.
Oracle Universal Installer cleanup was successful.

Oracle install successfully cleaned up the temporary directories.
#######################################################################


############# ORACLE DEINSTALL & DECONFIG TOOL END #############


The components are cleanly deinstalled now. The directories have been cleaned up by this tool.

This was available in 11gR1 as well; but R2 just makes it very user friendly.

More on this later.

13 comments:

Surachart said...

Nice article...

Deon Bouwer said...

Hi

I tried the same and nothing works! I have many problems to get 11gR2 working. For example I can't see the ASM disk in ASMCA in order to create ASM etc. Although my ASM disks is configured and fine.

When I tried to deinstall the software the deinstall doesn't complete and I have nothing running on the server at the moment.

./deinstall -home /orahome/app/11.2.0/grid

ORACLE_HOME = /orahome/app/11.2.0/grid
Location of logs /orahome/app/oraInventory/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


######################## CHECK OPERATION START ########################
Install check configuration START


Checking for existence of the Oracle home location /orahome/app/11.2.0/grid
Oracle Home type selected for de-install is: SIHA
Oracle Base selected for de-install is: /orahome/app/grid
Checking for existence of central inventory location /orahome/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /orahome/app/11.2.0/grid

Install check configuration END

Traces log file: /orahome/app/oraInventory/logs//crsdc.log
ERROR: null

Network Configuration check config START

Network de-configuration trace file location: /orahome/app/oraInventory/logs/netdc_check48353.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /orahome/app/oraInventory/logs/asmcadc_check48354.log

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: n
ASM was not detected in the Oracle Home

######################### CHECK OPERATION END #########################


####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /orahome/app/11.2.0/grid
The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)null
Oracle Home selected for de-install is: /orahome/app/11.2.0/grid
Inventory Location where the Oracle home registered is: /orahome/app/oraInventory
ASM was not detected in the Oracle Home
A log of this session will be written to: '/orahome/app/oraInventory/logs/deinstall_deconfig2009-10-16_04-32-21-AM.out'
Any error messages from this session will be written to: '/orahome/app/oraInventory/logs/deinstall_deconfig2009-10-16_04-32-21-AM.err'

ERROR: The deconfiguration and deinstallation tool has detected runtime errors when checking the existing configuration due to which the tool c annot continue with clean up operation. Please check the log files for more information. Rerun the tool after fixing the errors to proceed wi th the ORACLE_HOME clean up.

############# ORACLE DEINSTALL & DECONFIG TOOL END #############

The error file above is empty and nothing has been done?

Not quite sure what I am doing wrong though? Any idea?

Regards,
Deon

pbsl said...

you have a nice site. thanks for sharing this valuable resources. keep it up. anyway, various kinds of ebooks are available here

http://feboook.blogspot.com

salinata said...

thanks. you may also try the sql database repair program, it quickly parses corrupted files of specified format and retrieves the source data from affected documents when possible. It may become a good addition to other ways of keeping your data safe

keyur said...

Arup,
You may know this, but it is for other reader on the bloge.

It is not necessary to download deinstall utility from OTN. Once you have installed Oracle 11.2software, failed or success, deinstall utility is under $ORACLE_HOME/deinstall directory.

Thanks
~ Keyur

Arup said...

@keyur yes, it is there in the $OH directory. But if you are deinstalling, $OH will be deinstalled as well. So, ideally you need to have it on a different location.

Suresh Babu said...

Arup,

I tried deinstalling 11gR2 software on test server using deinstall option but as a part of deinstall, oraInventory also deleted. But I have someother versions in the same oraInventory. How to deinstall without removing oraInventory?

Thanks,
Suresh

murali said...

Hi,

Can the deinstall tool be used to uninstall 11gR1 home?

regards
Murali

Surachart said...

@murali

we can use deinstall command-line at

$ORACLE_HOME/deinstall/ PATH

tarakan said...

looks nice. but have you ever heard about another access recovery tool box, provided by appropriate data recovery services?

Inventory Management Software said...

I really appreciate your post and it was superb .Thanks for sharing information.
Regards:
http://www.blackitsoft.com/inventory-pos-software.aspx

Connor Weston said...

This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative artic

Isaac E Wright Wright said...

Your given most of the usefull information..The Oracle consists of all master data.
It includes the following information and processes.ORACLE 11g TRAINIING IN A SIMPLE WAY.
ORACLE11g ONLINE TRAINING

Translate