Erro “Re-link fails on target “client_sharedlib”” durante aplicação do Patch 12419392

Este artigo tem como objetivo explicar o erro ocorrido “Re-link fails on target “client_sharedlib”.” durante aplicaçao do Patch PSU 10.2.0.5.4 para o Banco de Dados Oracle 10.2.0.5.0 e como corrigir o mesmo.
Estou usando um Banco de Dados Single Instance com ASM, ou seja, non-RAC.
OBS: Sempre faz backup do produto Oracle antes aplicar qualquer Patch da Oracle para voltar o mesmo caso a aplicação do Patch não ocorra com Sucesso.
OBS: Para aplicar o Patch, deve-se certificar que todos os serviços do Banco de Dados esteja baixados (Listener, Banco de Dados, Enterprise Manager, ISQLPlus).


Vamos checar a versão do OPatch e verificar se nosso Banco de Dados está baixado.

[oracle@serveroracle 12419392]$ /oraprd01/app/oracle/product/10.2.0/db_1/OPatch/opatch version
Invoking OPatch 10.2.0.5.1

OPatch Version: 10.2.0.5.1

OPatch succeeded.
[oracle@serveroracle 12419392]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 15-MAR-2012 16:46:18

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.104)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory
[oracle@serveroracle 12419392]$ ps -ef | grep pmon
oracle    8371  3654  0 16:46 pts/1    00:00:00 grep pmon
[oracle@serveroracle 12419392]$

Conforme checado a versão do OPatch e o status dos serviços do Banco de Dados Oracle, vamos aplicar o Patch 12419392.

[oracle@serveroracle 12419392]$ /oraprd01/app/oracle/product/10.2.0/db_1/OPatch/opatch apply
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /oraprd01/app/oracle/product/10.2.0/db_1
Central Inventory : /oraprd01/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /oraprd01/app/oracle/product/10.2.0/db_1/oui
Log file location : /oraprd01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2012-03-15_17-02-08PM.log

Patch history file: /oraprd01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '12419392' to OH '/oraprd01/app/oracle/product/10.2.0/db_1'
Interim patch 12419392 is a superset of the patch(es) [  12419392 ] in the Oracle Home
OPatch will rollback the subset patches and apply the given patch.

Running prerequisite checks...
Patch 12419392: Optional component(s) missing : [ oracle.rdbms.dv, 10.2.0.5.0 ] , [ oracle.rdbms.dv.oc4j, 10.2.0.5.0 ]
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 = '/oraprd01/app/oracle/product/10.2.0/db_1')


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 '12419392' for restore. This might take a while...
Backing up files affected by the patch '12419392' for restore. This might take a while...
ApplySession rolling back interim patch '12419392' from OH '/oraprd01/app/oracle/product/10.2.0/db_1'
Execution of 'sh /oraprd01/app/oracle/product/10.2.0/db_1/.patch_storage/12419392_May_25_2011_01_06_08/original_patch/custom/scripts/pre -rollback 12419392 ':


Return Code = 0

Patching component oracle.rdbms, 10.2.0.5.0...
Updating archive file "/oraprd01/app/oracle/product/10.2.0/db_1/lib/libserver10.a"  with "lib/libserver10.a/kcbl.o"
.
.
.
Patching component oracle.precomp.common, 10.2.0.5.0...

Patching component oracle.rdbms.rman, 10.2.0.5.0...
Running make for target ioracle
Running make for target iwrap
Running make for target client_sharedlib
Make failed to invoke "/usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/oraprd01/app/oracle/product/10.2.0/db_1"....'genclntsh: genclntsh: Could not locate  /oraprd01/app/oracle/product/10.2.0/db_1/network/admin/shrept.lst
make: *** [client_sharedlib] Error 1
'
Running make for target proc
Running make for target irman
Running make for target client_sharedlib
Make failed to invoke "/usr/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/oraprd01/app/oracle/product/10.2.0/db_1"....'genclntsh: genclntsh: Could not locate  /oraprd01/app/oracle/product/10.2.0/db_1/network/admin/shrept.lst
make: *** [client_sharedlib] Error 1
'

The following make actions have failed :

Re-link fails on target "client_sharedlib".
Re-link fails on target "client_sharedlib".


Do you want to proceed? [y|n]
y
User Responded with: Y
ApplySession adding interim patch '12419392' to inventory

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

The local system has been patched and can be restarted.

--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67620:Interim patch 12419392 is a superset of the patch(es) [  12419392 ] in the Oracle Home
2) OUI-67200:Make failed to invoke "/usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/oraprd01/app/oracle/product/10.2.0/db_1"....'genclntsh: genclntsh: Could not locate  /oraprd01/app/oracle/product/10.2.0/db_1/network/admin/shrept.lst
make: *** [client_sharedlib] Error 1
'
3) OUI-67200:Make failed to invoke "/usr/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/oraprd01/app/oracle/product/10.2.0/db_1"....'genclntsh: genclntsh: Could not locate  /oraprd01/app/oracle/product/10.2.0/db_1/network/admin/shrept.lst
make: *** [client_sharedlib] Error 1
'
4) OUI-67124:Re-link fails on target "client_sharedlib".
Re-link fails on target "client_sharedlib".

--------------------------------------------------------------------------------
OPatch Session completed with warnings.

OPatch completed with warnings.
[oracle@serveroracle 12419392]$

Durante o processo de aplicação do Patch, ocorreu os erros acima ao invocar o “make” para o “client_sharedlib” que não conseguiu encontrar o arquivo “shrept.lst” no diretório “/oraprd01/app/oracle/product/10.2.0/db_1/network/admin/”.
Vamos verificar se existe o arquivo.

[oracle@serveroracle 12419392]$ ls -l /oraprd01/app/oracle/product/10.2.0/db_1/network/admin/shrept.lst
ls: /oraprd01/app/oracle/product/10.2.0/db_1/network/admin/shrept.lst: No such file or directory
[oracle@serveroracle 12419392]$

Conforme acima, o arquivo não existe.
Com o usuário “oracle” realizei uma cópia do arquivo “shrept.lst” de um outro servidor de Banco de Dados e fiz uma cópia do mesmo no meu servidor de Banco de Dados no diretório “/oraprd01/app/oracle/product/10.2.0/db_1/network/admin/”.
Segue o arquivo abaixo:

[oracle@serveroracle admin]$ cat shrept.lst
# function entry points for genclntsh.sh

network : snaumihi_inithostinfo
network : snaumbg_gmt
network : naedpwd_encrypt
network : naumbsb_bld_singlebyte
network : ztapis
[oracle@serveroracle admin]$

Vamos entrar novamente no diretório do Patch e aplicar o mesmo.

[oracle@serveroracle 12419392]$ /oraprd01/app/oracle/product/10.2.0/db_1/OPatch/opatch apply
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /oraprd01/app/oracle/product/10.2.0/db_1
Central Inventory : /oraprd01/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /oraprd01/app/oracle/product/10.2.0/db_1/oui
Log file location : /oraprd01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2012-03-15_17-44-00PM.log

Patch history file: /oraprd01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '12419392' to OH '/oraprd01/app/oracle/product/10.2.0/db_1'
Interim patch 12419392 is a superset of the patch(es) [  12419392 ] in the Oracle Home
OPatch will rollback the subset patches and apply the given patch.

Running prerequisite checks...
Patch 12419392: Optional component(s) missing : [ oracle.rdbms.dv, 10.2.0.5.0 ] , [ oracle.rdbms.dv.oc4j, 10.2.0.5.0 ]
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 = '/oraprd01/app/oracle/product/10.2.0/db_1')


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 '12419392' for restore. This might take a while...
Backing up files affected by the patch '12419392' for restore. This might take a while...
ApplySession rolling back interim patch '12419392' from OH '/oraprd01/app/oracle/product/10.2.0/db_1'
Execution of 'sh /oraprd01/app/oracle/product/10.2.0/db_1/.patch_storage/12419392_May_25_2011_01_06_08/original_patch/custom/scripts/pre -rollback 12419392 ':


Return Code = 0

Patching component oracle.rdbms, 10.2.0.5.0...
Updating archive file "/oraprd01/app/oracle/product/10.2.0/db_1/lib/libserver10.a"  with "lib/libserver10.a/kcbl.o"
.
.
.
Patching component oracle.rdbms.rman, 10.2.0.5.0...
Running make for target ioracle
Running make for target iwrap
Running make for target client_sharedlib
Running make for target proc
Running make for target irman
Running make for target client_sharedlib
ApplySession adding interim patch '12419392' to inventory

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

The local system has been patched and can be restarted.

--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67620:Interim patch 12419392 is a superset of the patch(es) [  12419392 ] in the Oracle Home
--------------------------------------------------------------------------------
OPatch Session completed with warnings.

OPatch completed with warnings.
[oracle@serveroracle 12419392]$

Pronto corrigimos o problema basta terminar o processo de aplicação do Patch 12419392 PSU 10.2.0.5.4 para o Banco de Dados Oracle 10.2.0.5.
Mais informações sobre aplicação do Patch acompanhar o arquivo README que vem junto no pacote do Patch 12419392.
Veja o artigo da Aplicação do Patch 12419392 acessando Aplicando Patch PSU 10.2.0.5.4 no Banco de Dados Oracle 10.2.0.5.0 non-RAC.

%name Erro Re link fails on target client sharedlib durante aplicação do Patch 12419392

Autor: Maycon Tomiasi

Formado em Tecnologia da Informação na FIPP (Faculdade de Informática de Presidente Prudente), Analista DBA Oracle pela Teiko Soluções em Tecnologia da Informação, residente em Blumenau/ SC, Certificado OCP 10g/11g/12c, OCS 11g Implementation, OCE 11g Performance Tuning, OCE 11g RAC & GRID e OPN Specialist. Conhecimentos em PHP.