viernes, 14 de octubre de 2016

Mi Primer Oracle Open World

Este año tuve la oportunidad de asistir al Oracle Open World 2016 San Francisco https://www.oracle.com/openworld/index.html
Era mi primera vez en San Francisco, mi primera vez en el OOW y la primera vez que iba a dar una presentación en ingles!.
La experiencia fue super enriquecedora y quede maravillada. Me encantó!. 
El evento se organiza en el Moscone Center http://www.moscone.com/site/do/index un centro de eventos que esta compuesto por 3 edificios que se dedican totalmente a Oracle y se realizan durante todos los dias permanentemente sesiones en paralelo, alrededor de 2000 sesiones en total. Asisten miles de personas de todo el mundo.
Mi presentación fue el Domingo 19/9 a las 9:15, el tema fue "Improving SQL Performance with SQL Profiles without Changing SQL Code". Tuve una gran cantidad de asistentes, alrededor de 140 personas!!. Entre ellos gente a la que admiro mucho como Carlos SierraMauro PaganoArup Nanda y Kamran Agayev.  
Al finalizar OTN Latinoamerica me hizo una entrevista y ya la publicó editada con paneos de mi presentación https://www.youtube.com/watch?v=8wfuw60-x_o&app=desktop
Mi presentación la pueden bajar los que se registraron en el OOW16 desde https://oracle.rainfocus.com/scripts/catalog/oow16.jsp?search=UGF5266&search.event=oracleopenworld y en breve la voy a agregar publica en este blog.
Ese dia a la noche me invitaron a la cena Oracle ACE Dinner por ser Oracle ACE Associate. Es super interesante tener la oportunidad de conocer y dialogar con otros ACE de todo el mundo. 
Al horario de la cena, estaba la apertura con Larry Ellison que me lo perdi, por suerte se pueden ver los videos On Demand de Open World Keynotes, JavaOne Keynotes, Executive Solutions Sessions y General Sessions https://www.oracle.com/openworld/on-demand/index.html
Con el pase full se tiene de lunes a jueves el almuerzo incluido. El martes a la noche Oracle organizó una cena para los asistentes de Latinoamerica donde tuve oportunidad de conocer gente y de encontrarme con conocidos. El miércoles a la noche Oracle organizó un recital que lo llama Oracle Appreciation Event, este año fue en el AT&T Park Gwen Stefani y Sting. Estuvo buenisimo!!
Asisti a muchas sesiones y varias meetings entre otras de Accenture, Bloggers, etc. Tuve oportunidad de hablar y tener contacto con profesionales de todo el mundo y con Product Managers de Oracle, ademas de asistir al Oracle Application User Expirience, un Tour programado para conocer el lab en Oracle HQ (Nave Nodriza) y las tendencias. 
Además de participar en estas actividades aproveche a conocer San Francisco que es una ciudad espectacular!
Aprovecho este blog para agradecer a todos mis compañeros de AROUG y en especial a Gustavo Gonzalez que gracias a su apoyo pude llegar a ser speaker en este evento.
Si tenes alguna vez la oportunidad de asistir a un Open World, no lo dudes, es una experiencia inolvidable!

Moscone Center
Mi presentación


Mi presentación
Con Arup Nanda


En el Hall de Exposiciones
Oracle ACE Dinner

Con Alex Zabala, Mauro Pagano, Carlos Sierra y Mike Dietrich

Tour Oracle User Experience




martes, 11 de octubre de 2016

OTN Appreciation Day : SQL Profiles

Los SQL Profiles son objetos de la base de datos persistentes en el diccionario de datos. Estos objetos son diferentes a otros objetos de la base porque no se crean con la sentencia "CREATE" como "CREATE TABLE" o "CREATE INDEX", estos objetos tienen que ser generados.
El objetivo de los SQL Profiles es mejorar la performance de los SQL sin modificar el código, y son implementados usando HINTS. Si bien con la vista dba_sql_profiles podemos ver los SQL Profiles creados no hay ninguna vista para ver los HINTS que continen.
Los SQL Profiles una vez generados tienen que ser aceptados para su implementación.
Un SQL Profile se genera e implementa para una sentencia SQL especifica. Una vez implementado, cada vez que ejecuta esa sentencia SQL el optimizador usa el SQL Profile para dicha sentencia y genera un mejor plan de ejecución.
Inicialmente fueron creados por Oracle en 10g para que sean generados por el SQL Tuning Advisor. Luego Carlos Sierra desarrollo un script coe_xfr_sql_profile dentro de su herramienta SQLT que genera SQL Profiles.
Se usan para dos situaciones diferentes:
1 - Cuando tenemos un problema de un SQL con alto consumo de recursos y el plan de ejecución mejoraría con un ajuste de estadisticas, cuando invocamos al SQL Tuning Advisor va a generar un SQL Profile.
2 - Cuando tenemos una sentecia SQL que cambia el elapsed time de un dia para el otro pasando a aumentarlo dramaticamente, el script coe_xfr_sql_profile encuentra el mejor plan de ejecución anterior en el AWR y genera un SQL Profile.

Hay varias diferencias entre los SQL Profiles generados por el SQL Tuning Advisor y los generados por el script coe_xfr_sql_profile.

SQL Profiles generados por SQL Tuning Advisor 
- Son HINTS que ajustan las estadisticas para que el optimizador elija un mejor plan
- Son generados por el ATO (Automatic Tuning Optimizer) que es el optimizador en modo Tuning
- Tiene total dependencia con las estadisticas, si cambian las estadisticas ya quedan obsoletos estos ajustes y el optimizador puede elegir otro plan

SQL Profiles generados por el script coe_xfr_sql_profile
- Son Hints para reproducir un plan de ejecución específico
- Son generados por el script coe_xfr_sql_profile desde el mejor plan de ejecución para esa sentencia que encuentra en el AWR
- No tiene dependencia con las estadisticas, si cambian las estadisticas igual va a repodrocir el mismo plan

Para saber si un SQL esta usando un SQL Profile podemos verlo en su plan de ejecución en la sesion NOTE
Ejemplo:


SQL> select * from table(dbms_xplan.display_cursor);

PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------------------------------------------
SQL_ID g3wubsadyrt37, child number 1
-------------------------------------
select count(*) from plan_stability where owner='SYS'

Plan hash value: 363261562

-------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 2476 (100)| |
| 1 | SORT AGGREGATE | | 1 | 6 | | |
|* 2 | TABLE ACCESS FULL| PLAN_STABILITY | 23092 | 135K| 2476 (1)| 00:00:30 |
-------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

2 - filter("OWNER"='SYS')

Note
-----

- SQL profile coe_g3wubsadyrt37_363261562 used for this statement



El SQLT se puede bajar desde MOS
Using Sqltxplain to create a 'SQL Profile' to consistently reproduce a good plan (Doc ID 1487302.1)
o del Blog de Carlos Sierra
https://carlos-sierra.net/2012/04/09/custom-sql-profile-and-plan-stability-on-10g/


La otra forma de generar SQL Profiles manualmente no documentada por Oracle es importando los HINTS con el DBMS_SQLTUNE.IMPORT_SQL_PROFILE.

Este es mi post en agradecimiento a OTN, OTN Appreciation Day es una iniciativa de Tim Hall https://oracle-base.com/blog/2016/09/28/otn-appreciation-day/


domingo, 24 de julio de 2016

Data Guard. Como Verificar el Rol de la Base de Datos

En este ejemplo tengo una base de datos en cada Data Center (DC1 y DC2).
En el Datacenter 1 se encuentra la Base de Datos PRIMARIA que esta en el servidor srv_rrhh_dc1 y el nombre de la instancia es RRHH_DC1.
En el Datacenter 2 se encuentra la Base de Datos STANDBY que esta en el servidor srv_rrhh_dc2 y el nombre de la instancia es RRHH_DC2

Para verificar el rol en que esta la base de datos en ese momento, se puede ejecutar la siguiente consulta :

  • En servidor srv_rrhh_dc1:

$export ORACLE_SID=RRHH_DC1
$sqlplus / as sysdba
SQL> col db_unique_name format a15
SQL> col database_role format a25
SQL> select name, db_unique_name,database_role from v$database;

NAME                        DB_UNIQUE_NAME  DATABASE_ROLE
--------------------------- --------------- -------------------------
RRHH                        RRHH_DC1            PRIMARY


  • En servidor srv_rrhh_dc2:
$export ORACLE_SID=RRHH_DC2

$sqlplus / as sysdba

SQL> col db_unique_name format a15
SQL> col database_role format a25
SQL> select name, db_unique_name,database_role from v$database;

NAME                        DB_UNIQUE_NAME  DATABASE_ROLE
--------------------------- --------------- -------------------------
RRHH                        RRHH_DC2            PHYSICAL STANDBY

viernes, 24 de junio de 2016

Como crear una Base de Datos CDB vacia en 12c

Para crear una Base de Datos CDB usamos el utilitario dbca. En este caso la vamos a crear vacia, o sea sin ninguna PDB, excepto la PDB$SEED que se crea por default.

$dbca


Dejamos seleccionada la opción que aparece por default "Create Database".
Next->


Seleccionamos la opción "Advanced Mode". Next->


Seleccionamos el template que se adecue mejor al tipo de PDB's que posteriormente vamos a implementar, en este caso dejo seleccionada la opción default "General Purpose or Transaction Proccessing" que es la mejor para OLTP. 
Next-> 


Ingresamos el nombre de la CDB en "Global Database Name". Seleccionar "Create as Container Database" y la opción "Create an empty Container Database".  Next->


Dejamos el default que setea el port para el EM Express. En este punto podemos configurar otro port o no seleccionar esta opción. Si tenemos EM Cloud Control podemos seleccionar "Register with EM Cloud Control" e ingresamos los datos del OMS y del usuario Admin del OMS asi la registra. Next->


Ingresamos en esta pantalla la password para los usuarios privilegiados. Selecciono en este ejemplo la opción "Use the Same Administrative Password for all Accounts" e ingreso la password. Next->


En este caso dejo seleccionado el Listener Default que aparece, es el único que hay en este servidor. Si hay varios podemos elegir cual va a ser el Listener de este CBD o podemos crear un Listener nuevo desde esta pantalla. Next->


Ingresamos el path para los datafiles y el fast_recovery_area. Next->



Ingresamos si tenemos para configurar Database Vault y/o Label Security. En este caso lo dejo sin configurar. Next->


Modificamos si es necesario la cantidad de Memoria (PGA+SGA) en este caso dejo el default recomendado.Next->


Dejamos la opción default Create Database seleccionada.Next->


Revisamos la pantalla de Summary.  Finish->


Demora varios minutos la creación de la base de datos pero el tiempo va a depender de los recursos del servidor. Al finalizar aparece la siguiente pantalla con el resumen.  Close->


De esta forma quedo creada la base de datos CDB vacia sin ninguna PDB.

miércoles, 8 de junio de 2016

Como eliminar una Base de Datos 12c NON-CDB con DBCA

La forma más fácil para eliminar una base de datos es con el dbca (Database Configuration Assistant). Además de eliminar los datafiles, como podriamos hacerlo desde sistema operativo, nos asegura que no nos quede ningún archivo suelto ya que entre otras cosas la elimina del inventario.
Este ejemplo es en un servidor linux que tengo creadas 3 bases de datos Non-CDB en 12c.
Una recomendación es asegurarse de tener backup de la base de datos que se quiere eliminar, siempre puede aparecer alguien que necesitaba algo de esa base de datos.
Debido justamente a que es muy fácil eliminar una base de datos, les recomiendo cuando hagan esta tareas estar atentos y leer bien el nombre de la base de datos que se selecciona y verificarlo en el resumen. Sobre todo porque en muchas instalaciones por nomenclatura las bases tienen nombres muy similares con cambio de un solo digito o letra.
Ante la posibilidad de equivocación en la selección de la base de datos a eliminar, les recomiendo asegurarse de tener backup de todas las bases de datos que estan en el servidor antes de empezar.

1. $dbca

2. Nos va a aparecer la pantalla inicial "Operacion de Base de Datos" donde debemos seleccionar "Suprimir Base de Datos"
3. Presionar Siguiente y en la próxima pantalla eligir la base de datos a eliminar e ingresar un usuario sysdba y su password, en este caso ingrese el usuario sys


4. Presionar siguiente y en la próxima pantalla aparece la opción para eliminar el registro en Cloud Control, Si es que lo tenemos, en este momento ingresamos los datos del OMS y del Administrador del EM. En mi caso no lo tenia.

5. Presionar siguiente y aparece el resumen. Verificar el nombre de la base de datos, asegurarse que es la que se quiere eliminar y despliega los archivos que va a eliminar controlfiles y datafiles pertenecientes a la base de datos.
6. Presionar Terminar. Nos va a aparecer un cuadro de dialogo preguntando si estamos seguros. Tener en cuenta que esta operación no tiene un "deshacer" si nos equivocamos de base de datos hay que restaurarla de un backup.
7. Presionamos SI para continuar. Nos va a aparecer la "Pantalla de Progreso"

8. En mi caso demoro 1 minuto y apareció la pantalla "Terminar"


miércoles, 9 de marzo de 2016

Como Desinstalar Oracle Grid Infrastructure 12c

Para desintalar todo que implica deconfigurar los nodos, eliminar las instancias de ASM y deinstalar el software de grid se ejecuta un script :  $ORACLE_HOME/deinstall/deinstall con el usuario oracle dueño del $ORACLE_HOME del grid.
En este ejempo tengo un cluster de 2 nodos (rac1 y rac2) con Oracle Grid Infrastructure 12c instalado y levantado. En este ambiente el listener levantado es el default LISTENER y el objetivo es borrar todo incluido diskgroups. El usuario en este ejemplo es oracle porque se instalo el software de grid con oracle, pero podria ser grid si se instala con grid.
Mis comentarios estan en AZUL.

Me logueo con usuario oracle y verifico en rac1:
[oracle@rac1 grid]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online

Verifico en rac2:
[oracle@rac2 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online


Estan las instancias de ASM y la de -MGMTDB levantadas: 
[oracle@rac1 grid]$ ps -ef| grep pmon
oracle   11164     1  0 08:41 ?        00:00:00 asm_pmon_+ASM1
oracle   11816     1  0 08:43 ?        00:00:00 mdb_pmon_-MGMTDB
oracle   16438  6356  0 08:58 pts/0    00:00:00 grep pmon

[oracle@rac2 ~]$ ps -ef | grep pmon
oracle    3830     1  0 08:25 ?        00:00:00 asm_pmon_+ASM2
oracle   14916  5956  0 09:00 pts/0    00:00:00 grep pmon

Aclaracion : -MGMTDB levanta en uno solo de los nodos.

Para Desinstalar :
[oracle@rac1 grid]$ cd $ORACLE_HOME
[oracle@rac1 grid]$ cd deinstall
[oracle@rac1 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
--->> DEMORA VARIOS MINUTOS!

Location of logs /tmp/deinstall2016-03-09_09-04-36AM/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/12.1.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/12.1.0/grid
The following nodes are part of this cluster: rac1,rac2
Active Remote Nodes are rac2
Checking for sufficient temp space availability on node(s) : 'rac1,rac2'

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2016-03-09_09-04-36AM/logs//crsdc_2016-03-09_09-17-22AM.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2016-03-09_09-04-36AM/logs/netdc_check2016-03-09_09-17-29-AM.log

Specify all RAC listeners (do not include SCAN listener) that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:  ENTER
Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2016-03-09_09-04-36AM/logs/asmcadc_check2016-03-09_11-45-13-AM.log

Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/12.1.0/grid.
ASM Diagnostic Destination : /u01/app/oracle
ASM Diskgroups : +DATA
ASM diskstring : /dev/oracleasm/disks
Diskgroups will be dropped
De-configuring ASM will drop all the diskgroups and their contents at cleanup time. This will affect all of the databases and ACFS that use this ASM instance(s).

 If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'. Do you  want to modify above information (y|n) [n]:ENTER 
Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2016-03-09_08-12-04PM/logs/databasedc_check2016-03-09_08-31-37-PM.log

Oracle Grid Management database was found in this Grid Infrastructure home

Database Check Configuration END

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


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/12.1.0/grid
The following nodes are part of this cluster: rac1,rac2
Active Remote Nodes are rac2
The cluster node(s) on which the Oracle home deinstallation will be performed are:rac1,rac2
Oracle Home selected for deinstall is: /u01/app/12.1.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Following RAC listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Oracle Grid Management database was found in this Grid Infrastructure home
Oracle Grid Management database will be de-configured from this Grid Infrastructure home

Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2016-03-09_08-12-04PM/logs/deinstall_deconfig2016-03-09_08-22-59-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2016-03-09_08-12-04PM/logs/deinstall_deconfig2016-03-09_08-22-59-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2016-03-09_08-12-04PM/logs/databasedc_clean2016-03-09_08-33-09-PM.log

This operation may take few minutes.
--->> DEMORA VARIOS MINUTOS!
ASM de-configuration trace file location: /tmp/deinstall2016-03-09_08-12-04PM/logs/asmcadc_clean2016-03-09_08-42-54-PM.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2016-03-09_08-12-04PM/logs/netdc_clean2016-03-09_08-43-14-PM.log

De-configuring RAC listener(s): LISTENER

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

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

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

The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on  the local node after the execution completes on all the remote nodes.

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

/tmp/deinstall2016-03-09_08-12-04PM/perl/bin/perl -I/tmp/deinstall2016-03-09_08-12-04PM/perl/lib -I/tmp/deinstall2016-03-09_08-12-04PM/crs/install /tmp/deinstall2016-03-09_08-12-04PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-09_08-12-04PM/response/deinstall_OraGI12Home1.rsp"

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

/tmp/deinstall2016-03-09_08-12-04PM/perl/bin/perl -I/tmp/deinstall2016-03-09_08-12-04PM/perl/lib -I/tmp/deinstall2016-03-09_08-12-04PM/crs/install /tmp/deinstall2016-03-09_08-12-04PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-09_08-12-04PM/response/deinstall_OraGI12Home1.rsp" -lastnode

Press Enter after you finish running the above commands

<----------------------------------------


--->> SIN CERRAR ESTA TERMINAL, ABRIR OTRA TERMINAL y EJECUTAR EL SCRIPT QUE GENERO AUTOMATICAMENTE (MARCADO EN ROJO ARRIBA):
[oracle@rac1 ~]$ ssh root@rac2
root@rac2's password: 
Last login: Tue Feb 16 23:00:51 2016 from rac1.localdomain
[root@rac2 ~]# /tmp/deinstall2016-03-09_08-12-04PM/perl/bin/perl -I/tmp/deinstall2016-03-09_08-12-04PM/perl/lib -I/tmp/deinstall2016-03-09_08-12-04PM/crs/install /tmp/deinstall2016-03-09_08-12-04PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-09_08-12-04PM/response/deinstall_OraGI12Home1.rsp"


Using configuration parameter file: /tmp/deinstall2016-03-09_08-12-04PM/response/deinstall_OraGI12Home1.rsp
Network 1 exists
Subnet IPv4: 192.168.56.0/255.255.255.0/eth0, static
Subnet IPv6: 
Ping Targets: 
Network is enabled
Network is individually enabled on nodes: 
Network is individually disabled on nodes: 
VIP exists: network number 1, hosting node rac1
VIP Name: rac1-vip.localdomain
VIP IPv4 Address: 192.168.56.81
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
VIP exists: network number 1, hosting node rac2
VIP Name: rac2-vip.localdomain
VIP IPv4 Address: 192.168.56.82
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
ONS exists: Local port 6100, remote port 6200, EM port 2016, Uses SSL false
ONS is enabled
ONS is individually enabled on nodes: 
ONS is individually disabled on nodes: 
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac2'
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac2' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac2'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac2'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac2'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac2'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac2'
CRS-2677: Stop of 'ora.ctssd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac2'
CRS-2677: Stop of 'ora.cssd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'rac2'
CRS-2677: Stop of 'ora.crf' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac2'
CRS-2677: Stop of 'ora.gipcd' on 'rac2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2016/03/10 01:04:04 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.

2016/03/10 01:04:30 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.

2016/03/10 01:04:36 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

2016/03/10 01:04:43 CLSRSC-46: Error: '/u01/app/oracle/crsdata/rac2/crsconfig/cluutil2.log' does not exist

2016/03/10 01:04:43 CLSRSC-46: Error: '/u01/app/oracle/crsdata/rac2/crsconfig/cluutil2.log' does not exist

[root@rac2 ~]# 

--->Estos 2 Errores al tratar de escribir el log son un BUG que no afecta la desinstalacion. IGNORARLOS.
VOLVER A RAC1 EN ESA TERMINAL y EJECUTAR EL SCRIPT QUE GENERO AUTOMATICAMENTE  (MARCADO EN ROJO ARRIBA):
[root@rac2 ~]# exit
logout
Connection to rac2 closed.
[oracle@rac1 ~]$ su - root
Password: 
[root@rac1 ~]# /tmp/deinstall2016-03-09_08-12-04PM/perl/bin/perl -I/tmp/deinstall2016-03-09_08-12-04PM/perl/lib -I/tmp/deinstall2016-03-09_08-12-04PM/crs/install /tmp/deinstall2016-03-09_08-12-04PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-09_08-12-04PM/response/deinstall_OraGI12Home1.rsp" -lastnode
Using configuration parameter file: /tmp/deinstall2016-03-09_08-12-04PM/response/deinstall_OraGI12Home1.rsp
Network 1 exists
Subnet IPv4: 192.168.56.0/255.255.255.0/eth0, static
Subnet IPv6: 
Ping Targets: 
Network is enabled
Network is individually enabled on nodes: 
Network is individually disabled on nodes: 
VIP exists: network number 1, hosting node rac1
VIP Name: rac1-vip.localdomain
VIP IPv4 Address: 192.168.56.81
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
ONS exists: Local port 6100, remote port 6200, EM port 2016, Uses SSL false
ONS is enabled
ONS is individually enabled on nodes: 
ONS is individually disabled on nodes: 
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac1'
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac1' succeeded
CRS-2677: Stop of 'ora.MGMTLSNR' on 'rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2673: Attempting to stop 'ora.crf' on 'rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'rac1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2676: Start of 'ora.evmd' on 'rac1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
ASM de-configuration trace file location: /tmp/deinstall2016-03-09_08-12-04PM/logs/asmcadc_clean2016-03-10_01-14-42-AM.log
ASM Clean Configuration START
ASM Clean Configuration END

ASM with SID +ASM1 deleted successfully. Check /tmp/deinstall2016-03-09_08-12-04PM/logs/asmcadc_clean2016-03-10_01-14-42-AM.log for details.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac1' succeeded
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2016/03/10 01:19:23 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.

2016/03/10 01:19:44 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.

2016/03/10 01:19:48 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

2016/03/10 01:19:48 CLSRSC-559: Ensure that the GPnP profile data under the 'gpnp' directory in /u01/app/12.1.0/grid is deleted on each node before using the software in the current Grid Infrastructure home for reconfiguration.

2016/03/10 01:19:55 CLSRSC-46: Error: '/u01/app/oracle/crsdata/rac1/crsconfig/cluutil2.log' does not exist

2016/03/10 01:19:56 CLSRSC-46: Error: '/u01/app/oracle/crsdata/rac1/crsconfig/cluutil2.log' does not exist

[root@rac1 ~]# 

---> Estos 2 Errores al tratar de escribir el log son un BUG que no afecta la desinstalacion. IGNORARLOS.
VOLVER A LA TERMINAL DONDE SE EJECUTO EL ./deinstall
...................................
Press Enter after you finish running the above commands

<----------------------------------------
ENTER

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


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
Successfully de-configured Oracle Grid Management database
ASM instance was de-configured successfully from the Oracle home
Following RAC listener(s) were de-configured successfully: LISTENER
Oracle Clusterware is stopped and successfully de-configured on node "rac1"
Oracle Clusterware is stopped and successfully de-configured on node "rac2"
Oracle Clusterware is stopped and de-configured successfully.
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2016-03-09_08-12-04PM/response/deinstall_2016-03-09_08-22-59-PM.rsp
Location of logs /tmp/deinstall2016-03-09_08-12-04PM/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2016-03-09_08-12-04PM/logs/deinstall_deconfig2016-03-09_08-22-59-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2016-03-09_08-12-04PM/logs/deinstall_deconfig2016-03-09_08-22-59-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to rac1
Setting REMOTE_NODES to rac2
Setting CLUSTER_NODES to rac1,rac2
Setting CRS_HOME to true
Setting oracle.installer.invPtrLoc to /tmp/deinstall2016-03-09_08-12-04PM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START
Detach Oracle home '/u01/app/12.1.0/grid' from the central inventory on the local node : Done

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

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

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

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

Delete directory '/u01/app/12.1.0/grid' on the remote nodes 'rac2' : Done

Delete directory '/u01/app/oraInventory' on the remote nodes 'rac2' : Done

Successfully deleted directory '/u01/app/oracle' on the local node.
Successfully detached Oracle home '/u01/app/12.1.0/grid' from the central inventory on the remote nodes 'rac2'.
Successfully deleted directory '/u01/app/12.1.0/grid' on the remote nodes 'rac2'.
Successfully deleted directory '/u01/app/oraInventory' on the remote nodes 'rac2'.
Oracle Universal Installer cleanup was successful.


Run 'rm -r /etc/oraInst.loc' as root on node(s) 'rac1,rac2' at the end of the session.

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'rac1,rac2' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############
[oracle@rac1 deinstall]$

--->EN LA OTRA TERMINAL EJECUTAR LO QUE SOLICTA  (MARCADO EN ROJO ARRIBA):
[root@rac1 ~]# rm -r /etc/oraInst.loc
rm: remove regular file `/etc/oraInst.loc'? y

[root@rac1 ~]# rm -r /opt/ORCLfmap
rm: descend into directory `/opt/ORCLfmap'? y
rm: descend into directory `/opt/ORCLfmap/prot1_64'? y
rm: descend into directory `/opt/ORCLfmap/prot1_64/etc'? y
rm: remove regular file `/opt/ORCLfmap/prot1_64/etc/filemap.ora'? y
rm: remove directory `/opt/ORCLfmap/prot1_64/etc'? y
rm: descend into directory `/opt/ORCLfmap/prot1_64/bin'? y
rm: remove regular file `/opt/ORCLfmap/prot1_64/bin/fmputlhp'? y
rm: remove regular file `/opt/ORCLfmap/prot1_64/bin/fmputl'? y
rm: remove directory `/opt/ORCLfmap/prot1_64/bin'? y
rm: remove directory `/opt/ORCLfmap/prot1_64/log'? y
rm: remove directory `/opt/ORCLfmap/prot1_64'? y
rm: remove directory `/opt/ORCLfmap'? y


[root@rac1 ~]# ssh root@rac2
root@rac2's password: 
Last login: Thu Mar 10 01:01:19 2016 from rac1.localdomain
[root@rac2 ~]# rm -r /etc/oraInst.loc
rm: remove regular file `/etc/oraInst.loc'? y

[root@rac2 ~]# rm -r /opt/ORCLfmap
rm: descend into directory `/opt/ORCLfmap'? y
rm: descend into directory `/opt/ORCLfmap/prot1_64'? y
rm: descend into directory `/opt/ORCLfmap/prot1_64/etc'? y
rm: remove regular file `/opt/ORCLfmap/prot1_64/etc/filemap.ora'? y
rm: remove directory `/opt/ORCLfmap/prot1_64/etc'? y
rm: descend into directory `/opt/ORCLfmap/prot1_64/bin'? y
rm: remove regular file `/opt/ORCLfmap/prot1_64/bin/fmputlhp'? y
rm: remove regular file `/opt/ORCLfmap/prot1_64/bin/fmputl'? y
rm: remove directory `/opt/ORCLfmap/prot1_64/bin'? y
rm: remove directory `/opt/ORCLfmap/prot1_64/log'? y
rm: remove directory `/opt/ORCLfmap/prot1_64'? y
rm: remove directory `/opt/ORCLfmap'? y
[root@rac2 ~]# 


[oracle@rac1 deinstall]$ pwd
/u01/app/12.1.0/grid/deinstall
[oracle@rac1 deinstall]$ ls -l
total 0
[oracle@rac1 deinstall]$ cd ..
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
[oracle@rac1 ..]$ 

DESINTALACION FINALIZADA! 

Verificamos que desinstalo el soft en rac1:
[oracle@rac1 deinstall]$ pwd
/u01/app/12.1.0/grid/deinstall
[oracle@rac1 deinstall]$ ls -l
total 0
[oracle@rac1 deinstall]$ cd ..
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
[oracle@rac1 ..]$ cd /u01/app
[oracle@rac1 app]$ ls -l
total 4
drwxr-xr-x. 2 oracle oinstall 4096 Mar 10 01:25 12.1.0
[oracle@rac1 app]$ cd 12.1.0
[oracle@rac1 12.1.0]$ ls -l
total 0
[oracle@rac1 12.1.0]$ 


Verificamos que desinstalo el soft en rac2:
[oracle@rac1 ~]$ ssh rac2
Last login: Thu Mar 10 01:00:30 2016 from rac1.localdomain
[oracle@rac2 ~]$ cd /u01/app/12.1.0
[oracle@rac2 12.1.0]$ ls -l
total 0