« Oracle Certified Expert : SQL 10g (1z0-047)Oracle11gr1 : DUPLICATE ACTIVE DATABASE de RMAN »

Oracle 11gr2 : Tool deinstall



Si quieres desinstalar algo en Oracle , casi siempre esta a mano el OUI , cierto?

Con su interfaz gráfica y que de verdad ayuda bastante, pero como la idea de Oracle es que te quedes obsoleto lo antes posible, en la versión Oracle11gr2 lanzo al mercado una tool para realizar las desinstalaciones de productos Oracle, esta tool simplemente se llama deinstall :P , obvio, y dentro del OUI ya no aparece el "Uninstalled Products"



La acabo de usar , y por su interfaz no gráfica, me da la idea de que es mucho más segura que el OUI, además desinstala los productos aunque se hayan instalado mal. Y un dato no menor, cuando se desinstalan productos Oracle con el deinstall, si hay ASM de por medio, también resetea la cabecera de los discos para que queden como PROVISIONED en la siguiente instalación y no tener que hacer a mano un comando dd. :)

Se baja este utilitario desde la siguiente URL
http://www.oracle.com/technology/software/products/database/oracle11g/112010_linx8664soft.html

Y se llama
Oracle De-install Utility (11.2.0.1.0) for Linux x86-64 (existe también para 32 bits)

He aquí un ejemplo para ambiente RAC

- Se baja el utilitario , se descomprime el archivo

- Se ejecuta el desinstalador, indicandole el ORACLE_HOME que deseamos remover

[oracle@oracle11gnodo1 instaladores]$ cd deinstall/
[oracle@oracle11gnodo1 deinstall]$ ls -ltr
total 216
-r-xr-xr-x 1 oracle oinstall 31544 Apr 1 01:24 sshUserSetup.sh
-r--r--r-- 1 oracle oinstall 3154 Jul 13 08:01 deinstall.xml
-r-xr-xr-x 1 oracle oinstall 20670 Jul 13 08:26 deinstall
-rw-r--r-- 1 oracle oinstall 382 Aug 4 18:16 readme.txt
drwxr-xr-x 7 oracle oinstall 4096 Aug 13 05:46 jre
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 01:35 utl
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 01:35 response
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 01:35 logs
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 01:50 mapfiles
drwxrwxr-x 4 oracle oinstall 4096 Aug 14 01:53 sysman
drwxrwxr-x 3 oracle oinstall 4096 Aug 14 01:53 srvm
drwxrwxr-x 8 oracle oinstall 4096 Aug 14 01:53 perl
drwxrwxr-x 7 oracle oinstall 4096 Aug 14 01:53 oui
drwxr-xr-x 3 oracle oinstall 4096 Aug 14 01:53 lib
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 01:53 jlib
drwxrwxr-x 3 oracle oinstall 4096 Aug 14 01:53 diagnostics
drwxrwxr-x 2 oracle oinstall 4096 Aug 14 01:53 dc_ocm
drwxrwxr-x 3 oracle oinstall 4096 Aug 14 01:53 cv
drwxrwxr-x 3 oracle oinstall 4096 Aug 14 01:53 crs
drwxrwxr-x 2 oracle oinstall 4096 Aug 14 01:53 bin
drwxrwxr-x 4 oracle oinstall 4096 Aug 14 01:53 assistants

[oracle@oracle11gnodo1 deinstall]$ ./deinstall -home /u01/app/11.2.0/grid

ORACLE_HOME = /u01/app/11.2.0/grid
Location of logs /home/oracle/oraInventory/logs/

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

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

Checking for existence of the Oracle home location /u01/app/11.2.0/grid
Oracle Home type selected for de-install is: CRS
Oracle Base selected for de-install is: /u01/app/oracle
Checking for existence of central inventory location /home/oracle/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/11.2.0/grid
The following nodes are part of this cluster: oracle11gnodo1,oracle11gnodo2

Install check configuration END

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

- Ahora comienza la serie de preguntitas, relacionadas con las IP Virtuales, físicas y el formato de la máscara.

Enter an address or the name of the virtual IP used on node "oracle11gnodo1"[oracle11gnodo1-vip]

The following information can be collected by running ifconfig -a on node "oracle11gnodo1"
Enter the IP netmask of Virtual IP "192.168.239.131" on node "oracle11gnodo1"[255.255.255.0]
192.168.239.129

Enter the network interface name on which the virtual IP address "192.168.239.131" is active
eth0

Enter an address or the name of the virtual IP used on node "oracle11gnodo2"[oracle11gnodo2-vip]

The following information can be collected by running ifconfig -a on node "oracle11gnodo2"
Enter the IP netmask of Virtual IP "192.168.239.132" on node "oracle11gnodo2"[192.168.239.129]
192.168.239.130

Enter the network interface name on which the virtual IP address "192.168.239.132" is active[eth0]

Enter an address or the name of the virtual IP[]
192.168.239.131

The following information can be collected by running ifconfig -a on node "oracle11gnodo1"
Enter the IP netmask of the virtual IP "192.168.239.131"[]
255.255.255.0

Enter the network interface name on which the virtual IP address "192.168.239.131" is active
eth0

Enter an address or the name of the virtual IP[]
192.168.239.131

The following information can be collected by running ifconfig -a on node "oracle11gnodo1"
Enter the IP netmask of the virtual IP "192.168.239.131"[255.255.255.0]

Enter the network interface name on which the virtual IP address "192.168.239.131" is active[eth0]

Enter an address or the name of the virtual IP

- Una vez ingresados todos los datos, comienza realmente la desinstalación

Network Configuration check config START

Network de-configuration trace file location: /home/oracle/oraInventory/logs/netdc_check32554.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /home/oracle/oraInventory/logs/asmcadc_check32555.log

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
Specify the ASM Diagnostic Destination [ ]:
Specify the diskgroups that are managed by this ASM instance []: DATA1

De-configuring ASM will drop all the diskgroups at cleanup time. Do you want deconfig tool to drop the diskgroups y|n [y]:

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

####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/11.2.0/grid
The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)oracle11gnodo1,oracle11gnodo2
Oracle Home selected for de-install is: /u01/app/11.2.0/grid
Inventory Location where the Oracle home registered is: /home/oracle/oraInventory
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: '/home/oracle/oraInventory/logs/deinstall_deconfig2009-09-21_02-57-31-PM.out'
Any error messages from this session will be written to: '/home/oracle/oraInventory/logs/deinstall_deconfig2009-09-21_02-57-31-PM.err'

######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /home/oracle/oraInventory/logs/asmcadc_clean32556.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /home/oracle/oraInventory/logs/netdc_clean32557.log

De-configuring Naming Methods configuration file on all nodes...
Naming Methods configuration file de-configured successfully.

De-configuring Local Net Service Names configuration file on all nodes...
Local Net Service Names configuration file de-configured successfully.

De-configuring Directory Usage configuration file on all nodes...
Directory Usage configuration file de-configured successfully.

De-configuring backup files on all nodes...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END

- Una vez pasado lo anterior, indica que debemos ejecutar ciertos comandos con root en cada uno de los nodos.

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

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

/home/oracle/instaladores/deinstall/perl/bin/perl -I/home/oracle/instaladores/deinstall/perl/lib -I/home/oracle/instaladores/deinstall/crs/install /home/oracle/instaladores/deinstall/crs/install/rootcrs.pl -force -delete -paramfile /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp

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

/home/oracle/instaladores/deinstall/perl/bin/perl -I/home/oracle/instaladores/deinstall/perl/lib -I/home/oracle/instaladores/deinstall/crs/install /home/oracle/instaladores/deinstall/crs/install/rootcrs.pl -force -delete -paramfile /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp -lastnode

- Ejecutamos esos comandos en cada uno de los nodos del RAC con usuario root, y el desinstalador simplemente remueve y aquellos procesos que no puede eliminar, los deja para el reboteo.

[oracle@oracle11gnodo2 ~]$ su - root
Password:
[root@oracle11gnodo2 ~]# /home/oracle/instaladores/deinstall/perl/bin/perl -I/home/oracle/instaladores/deinstall/perl/lib -I/home/oracle/instaladores/deinstall/crs/install /home/oracle/instaladores/deinstall/crs/install/rootcrs.pl -force -delete -paramfile /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp
2009-09-21 15:05:48: Parsing the host name
2009-09-21 15:05:48: Checking for super user privileges
2009-09-21 15:05:48: User has super user privileges
Using configuration parameter file: /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp
PRCR-1035 : Failed to look up CRS resource ora.cluster_vip.type for 1
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.gsd is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.ons is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.eons is registered
Cannot communicate with crsd

ADVM/ACFS is not supported on Redhat 4
ACFS-9201: Not Supported
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle11gnodo2'
CRS-2673: Attempting to stop 'ora.crsd' on 'oracle11gnodo2'
CRS-4548: Unable to connect to CRSD
CRS-2675: Stop of 'ora.crsd' on 'oracle11gnodo2' failed
CRS-2679: Attempting to clean 'ora.crsd' on 'oracle11gnodo2'
CRS-4548: Unable to connect to CRSD
CRS-2678: 'ora.crsd' on 'oracle11gnodo2' has experienced an unrecoverable failure
CRS-0267: Human intervention required to resume its availability.
CRS-2795: Shutdown of Oracle High Availability Services-managed resources on 'oracle11gnodo2' has failed
CRS-4687: Shutdown command has completed with error(s).
CRS-4000: Command Stop failed, or completed with errors.
You must kill crs processes or reboot the system to properly
cleanup the processes started by Oracle clusterware
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

[oracle@oracle11gnodo1 ~]$ su - root
Password:
[root@oracle11gnodo1 ~]# /home/oracle/instaladores/deinstall/perl/bin/perl -I/home/oracle/instaladores/deinstall/perl/lib -I/home/oracle/instaladores/deinstall/crs/install /home/oracle/instaladores/deinstall/crs/install/rootcrs.pl -force -delete -paramfile /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp -lastnode
2009-09-21 15:07:52: Parsing the host name
2009-09-21 15:07:52: Checking for super user privileges
2009-09-21 15:07:52: User has super user privileges
Using configuration parameter file: /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp

CRS-2672: Attempting to start 'ora.cssd' on 'oracle11gnodo1'
CRS-2676: Start of 'ora.cssd' on 'oracle11gnodo1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'oracle11gnodo1'
CRS-2676: Start of 'ora.ctssd' on 'oracle11gnodo1' succeeded
CRS-2679: Attempting to clean 'ora.asm' on 'oracle11gnodo1'
CRS-5011: Check of resource "+ASM" failed: details at "(:CLSN00006:)" in "/u01/app/11.2.0/grid/log/oracle11gnodo1/agent/ohasd/oraagent_oracle/oraagent_oracle.log"
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
CRS-5011: Check of resource "+ASM" failed: details at "(:CLSN00006:)" in "/u01/app/11.2.0/grid/log/oracle11gnodo1/agent/ohasd/oraagent_oracle/oraagent_oracle.log"
CRS-2681: Clean of 'ora.asm' on 'oracle11gnodo1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'oracle11gnodo1'
CRS-2676: Start of 'ora.asm' on 'oracle11gnodo1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oracle11gnodo1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'oracle11gnodo1' succeeded
CRS-2529: Unable to act on 'ora.cssd' because that would require stopping or relocating 'ora.asm', but the force option was not specified
CRS-4000: Command Stop failed, or completed with errors.
Command return code of 1 (256) from command: /u01/app/11.2.0/grid/bin/crsctl stop resource ora.cssd -init
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1035 : Failed to look up CRS resource ora.cluster_vip.type for 1
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.gsd is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.ons is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.eons is registered
Cannot communicate with crsd

ADVM/ACFS is not supported on Redhat 4
ACFS-9201: Not Supported

CRS-2673: Attempting to stop 'ora.ctssd' on 'oracle11gnodo1'
CRS-2673: Attempting to stop 'ora.evmd' on 'oracle11gnodo1'
CRS-2673: Attempting to stop 'ora.asm' on 'oracle11gnodo1'
CRS-2677: Stop of 'ora.evmd' on 'oracle11gnodo1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oracle11gnodo1' succeeded
CRS-2677: Stop of 'ora.asm' on 'oracle11gnodo1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oracle11gnodo1'
CRS-2677: Stop of 'ora.cssd' on 'oracle11gnodo1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'oracle11gnodo1'
CRS-2677: Stop of 'ora.diskmon' on 'oracle11gnodo1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oracle11gnodo1'
CRS-2676: Start of 'ora.cssdmonitor' on 'oracle11gnodo1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'oracle11gnodo1'
CRS-2672: Attempting to start 'ora.diskmon' on 'oracle11gnodo1'
CRS-2676: Start of 'ora.diskmon' on 'oracle11gnodo1' succeeded
CRS-2676: Start of 'ora.cssd' on 'oracle11gnodo1' succeeded
This ASM diskgroup does not contain voting disks to be deleted
CRS-2672: Attempting to start 'ora.ctssd' on 'oracle11gnodo1'
CRS-2676: Start of 'ora.ctssd' on 'oracle11gnodo1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'oracle11gnodo1'
CRS-2676: Start of 'ora.asm' on 'oracle11gnodo1' succeeded
ASM de-configuration trace file location: /home/oracle/oraInventory/logs/asmcadc_clean2043844166297175867.log
ASM Clean Configuration START
ASM Clean Configuration END

ASM with SID +ASM1 deleted successfully. Check /home/oracle/oraInventory/logs/asmcadc_clean2043844166297175867.log for details.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle11gnodo1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oracle11gnodo1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oracle11gnodo1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'oracle11gnodo1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oracle11gnodo1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'oracle11gnodo1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'oracle11gnodo1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'oracle11gnodo1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oracle11gnodo1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oracle11gnodo1'
CRS-2677: Stop of 'ora.cssd' on 'oracle11gnodo1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'oracle11gnodo1'
CRS-2673: Attempting to stop 'ora.gipcd' on 'oracle11gnodo1'
CRS-2677: Stop of 'ora.gipcd' on 'oracle11gnodo1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'oracle11gnodo1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle11gnodo1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

- Una vez terminado lo anterior , procedemos a dar ENTER

Press Enter after you finish running the above commands

<----------------------------------------
Oracle Universal Installer clean START

Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node : Done

Delete directory '/u01/app/11.2.0/grid' on the local node : Done

Delete directory '/u01/app/oracle' on the local node : Done

Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'oracle11gnodo2' : Done

Delete directory '/u01/app/11.2.0/grid' on the remote nodes 'oracle11gnodo2' : Done

Delete directory '/u01/app/oracle' on the remote nodes 'oracle11gnodo2' : Done

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 'oracle11gnodo1'
Clean install operation removing temporary directory '/tmp/install' on node 'oracle11gnodo2'

Oracle install clean END

Moved default properties file /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp as /home/oracle/instaladores/deinstall/response/deinstall_Ora11g_gridinfrahome2.rsp3

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

- Y muestra en esta sección lo más importante, el resumen :>>

####################### CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Oracle Clusterware is stopped and successfully de-configured on node "oracle11gnodo2"
Oracle Clusterware is stopped and successfully de-configured on node "oracle11gnodo1"
Oracle Clusterware is stopped and de-configured successfully.
Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node.
Successfully deleted directory '/u01/app/11.2.0/grid' on the local node.
Successfully deleted directory '/u01/app/oracle' on the local node.
Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'oracle11gnodo2'.
Successfully deleted directory '/u01/app/11.2.0/grid' on the remote nodes 'oracle11gnodo2'.
Successfully deleted directory '/u01/app/oracle' on the remote nodes 'oracle11gnodo2'.
Oracle Universal Installer cleanup was successful.

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

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

La herramienta desinstala absolutamente todo, es bastante poderosa, no se cae, pero... en las pruebas efectuadas, se demora bastante.

Más información del deinstall AQUÍ

Espero les sirva

by Ligarius
22.09.09. 14:31:06. 2537 words, 51889 views. Categories: Base de datos, Instalación, Oracle11gR2 ,