Search
Close this search box.

Primer PSU ya está disponible, instalémoslo!

Para complementar el Post anterior, les aviso que ya está disponible desde ayer el primer Patch Set Update, lo pueden encontrar en My Oracle Support como el patch 8576156 DATABASE PSU 10.2.0.4.1 (INCLUDES CPUJUL2009). En este Post les indico cómo instalarlo, acompáñenme en esta aventura.

Este Patch Set Update está disponible para las siguientes plataformas:

  • Sun Solaris SPARC (64-bit) / 21M
  • Linux x86 / 11M
  • Linux x86-64 / 16M
  • HP-UX PA-RISC(64-bit) / 18M
  • HP-UX Itanium / 30M
  • IBM AIX on POWER Systems (64-bit) /13M

Aproveché a descargar la versión para Linux x86 y al revisar los requisitos encontré el primer problema: debo tener el OPatch 10.2.0.4.7 o superior y en mi instalación tenía la versión 10.2.0.4.2. Esto me obligó a descargar la última versión, disponible como el patch 6880880.

Con esto ya está superado el problema:
[oracle@urania ~]$ opatch version
Invoking OPatch 10.2.0.4.7

OPatch Version: 10.2.0.4.7

OPatch succeeded.
Todo listo para instalar el PSU, pero primero verificamos que no entre en conflicto con algún one-off patch previamente instalado.
[oracle@urania ~]$ cd 8576156
[oracle@urania 8576156]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir .
Invoking OPatch 10.2.0.4.7

Oracle Interim Patch Installer version 10.2.0.4.7
Copyright (c) 2009, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/10.2.0/db_4
Central Inventory : /u01/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.7
OUI version       : 10.2.0.4.0
OUI location      : /u01/app/oracle/product/10.2.0/db_4/oui
Log file location : /u01/app/oracle/product/10.2.0/db_4/cfgtoollogs/opatch/opatch2009-07-15_12-41-59PM.log

Patch history file: /u01/app/oracle/product/10.2.0/db_4/cfgtoollogs/opatch/opatch_history.txt

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
Ahora bajamos la base de datos y aplicamos el PSU.
oracle@urania 8576156]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Jul 15 12:37:56 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SYS@test> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@test> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@urania 8576156]$ opatch apply
Invoking OPatch 10.2.0.4.7

Oracle Interim Patch Installer version 10.2.0.4.7
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/10.2.0/db_4
Central Inventory : /u01/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.7
OUI version       : 10.2.0.4.0
OUI location      : /u01/app/oracle/product/10.2.0/db_4/oui
Log file location : /u01/app/oracle/product/10.2.0/db_4/cfgtoollogs/opatch/opatch2009-07-15_12-44-45PM.log

Patch history file: /u01/app/oracle/product/10.2.0/db_4/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '8576156' to OH '/u01/app/oracle/product/10.2.0/db_4'

Running prerequisite checks...
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/10.2.0/db_4')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '8576156' for restore. This might take a while...
Backing up files affected by the patch '8576156' for rollback. This might take a while...
Execution of 'sh /home/oracle/8576156/custom/scripts/pre -apply 8576156 ':


Return Code = 0

Patching component oracle.rdbms.rsf, 10.2.0.4.0...
Updating archive file "/u01/app/oracle/product/10.2.0/db_4/lib/libgeneric10.a"  with "lib/libgeneric10.a/qcodfdef.o"
Updating archive file "/u01/app/oracle/product/10.2.0/db_4/lib/libgeneric10.a"  with "lib/libgeneric10.a/qcdo.o"

. . .

Running make for target client_sharedlib
Running make for target idgmgrl
Running make for target ioracle
Running make for target client_sharedlib
Running make for target itnslsnr
ApplySession adding interim patch '8576156' to inventory

Verifying the update...
Inventory check OK: Patch ID 8576156 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8576156 are present in Oracle Home.

--------------------------------------------------------------------------------
********************************************************************************
********************************************************************************
**                                ATTENTION                                   **
**                                                                            **
** Please note that the Patch Set Update Installation (PSU Deinstallation)    **
** is not complete until all the Post Installation (Post Deinstallation)      **
** instructions noted in the Readme accompanying this PSU, have been          **
** successfully completed.                                                    **
**                                                                            **
********************************************************************************
********************************************************************************

--------------------------------------------------------------------------------

Execution of 'sh /home/oracle/8576156/custom/scripts/post -apply 8576156 ':


Return Code = 0

The local system has been patched and can be restarted.


OPatch succeeded.

Hasta ahora todo va bien pero falta un paso final, necesario para que el Scheduler funcione adecuadamente.

[oracle@urania 8576156]$ su root
Password:
[root@urania 8576156]# sh psu_root.sh
[root@urania 8576156]# exit

Proceso concluído, pero no hemos terminado, falta hacer la post instalación. Empezamos por ejecutar catbundle.sql, no olvidar revisar los logs para verificar que no hubieron errores.

[oracle@urania 8576156]$ cd $ORACLE_HOME/rdbms/admin
[oracle@urania admin]$ sqlplus / as sysdba
SYS@test> startup
SYS@test> @catbundle.sql psu apply
. . .
. . .
. . .
SYS@test> ALTER SESSION SET current_schema = SYS;

Session altered.

SYS@test> PROMPT Updating registry...
Updating registry...
SYS@test> INSERT INTO registry$history
  2    (action_time, action,
  3     namespace, version, id,
  4     bundle_series, comments)
  5  VALUES
  6    (SYSTIMESTAMP, 'APPLY',
  7     SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),
  8     '10.2.0.4',
  9     1,
 10     'PSU',
 11     'PSU 10.2.0.4.1');

1 row created.

SYS@test> COMMIT;

Commit complete.

SYS@test> SPOOL off
SYS@test> SET echo off
Check the following log file for errors:
/u01/app/oracle/product/10.2.0/db_4/cfgtoollogs/catbundle/catbundle_PSU_TEST_APPLY_2009Jul15_13_13_44.log

SYS@test> exit
El paso final es recompilar las vistas de la base de datos, ojo que puede tomar bastantes minutos. Primero verificamos cuántos objetos se compilarán y luego ejecutamos la compilación en sí.
[oracle@urania admin]$ cd $ORACLE_HOME/cpu/view_recompile
[oracle@urania view_recompile]$ sqlplus / as sysdba
SYS@test> @recompile_precheck_jan2008cpu.sql

Running precheck.sql...


Number of views to be recompiled :2081
-----------------------------------------------------------------------

Number of objects to be recompiled :4171
Please follow the README.txt instructions for running viewrecomp.sql

PL/SQL procedure successfully completed.

SYS@test> exit
[oracle@urania ~]$ cd $ORACLE_HOME/cpu/view_recompile
[oracle@urania view_recompile]$ sqlplus / as sysdba
SYS@test> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@test> startup upgrade
ORACLE instance started.

Total System Global Area  247463936 bytes
Fixed Size                  1266848 bytes
Variable Size              96471904 bytes
Database Buffers          146800640 bytes
Redo Buffers                2924544 bytes
Database mounted.
Database opened.
SYS@test> @view_recompile_jan2008cpu.sql

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

1 row created.

Commit complete.

No. of Invalid Objects is :1595
Please refer to README.html to for instructions on validating these objects

PL/SQL procedure successfully completed.

Logfile for the current viewrecomp.sql session is : vcomp_TEST_15Jul2009_13_23_16.log
SYS@test> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@test> startup
ORACLE instance started.

Total System Global Area  247463936 bytes
Fixed Size                  1266848 bytes
Variable Size             109054816 bytes
Database Buffers          134217728 bytes
Redo Buffers                2924544 bytes
Database mounted.
Database opened.
SYS@test> exit
Algunos objetos quedaron descompilados por lo que debemos ejecutar utlrp.sql para compilarlos.
oracle@urania ~]$ cd $ORACLE_HOME/rdbms/admin
[oracle@urania admin]$ sqlplus / as sysdba
SYS@test> @utlrp.sql

TIMESTAMP
----------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2009-07-15 13:29:22

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
----------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2009-07-15 13:31:06


PL/SQL procedure successfully completed.

DOC> The following query reports the number of objects that have compiled
DOC> with errors (objects that compile with errors have status set to 3 in
DOC> obj$). If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


PL/SQL procedure successfully completed.
De ser necesario habría que recompilar manualmente los objetos que hubiesen quedado descompilados. Con esto se ha concluído satisfactoriamente la instalación del primer PSU, contamos ahora con Oracle 10.2.0.4.1.
SYS@test> select version, comments from registry$history;

VERSION              COMMENTS
-------------------- --------------------
10.2.0.4             PSU 10.2.0.4.1
Si bien les he mostrado los pasos a seguir, esto no debe ser considerado un reemplazo del procedimiento formal indicado en el archivo Readme.html que acompaña a este PSU, hay procedimientos especiales para RAC por ejemplo, así que a ir leyendo la documentación y haciendo las pruebas del caso para que finalmente lo apliquen en sus ambientes de producción, suerte!
¿Te pareció interesante este artículo?, ¿te quedaron algunas dudas?, ¿quieres sugerirme un tema a tratar?, pues déjame tus comentarios o ¡contáctame ahora mismo!

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.

Posts Relacionados

Aprenda a resolver y evitar el error ORA-01017 cuando tenga implementado Oracle Data Guard con wallet.
Aprenda a identificar la fila involucrada en la ocurrencia del evento de espera "enq: TX - row lock contention"
Aprenda a resolver el error CRS-2304 GPnP profile signature verification failed al iniciar una base de datos 11.2 en un cluster 19c.

¿Necesitas Ayuda?

Completa estos datos y estaré en contacto a la brevedad.