Aplicando patch ExaCC DomU

Sempre leiam as notas técnicas da Oracle antes de aplicar qualquer patch.

Referências Técnicas
Upgrades de DomU e cloud tooling

Iremos aplicar o patch em um ambiente RAC.

Realizando o backup do Oracle Home dos nós do RAC.

[oracle@srv01 ~]$ echo $ORACLE_HOME
/u02/app/oracle/product/11.2.0/dbhome_2
ShellScript
[oracle@srv02 ~]$ echo $ORACLE_HOME
/u02/app/oracle/product/11.2.0/dbhome_2
ShellScript

Node 1:

[root@srv01 ~]$ tar -pcvf /backup/cesar_update/oracle_home_srv01.tar dbhome_2
[root@srv01 ~]$ cd /u01/app/
[root@srv01 ~]$ tar -pcvf /backup/cesar_update/srv01_oraInventory.tar oraInventory
ShellScript

Node 2:

[root@srv02 ~]$ tar -pcvf /backup/cesar_update/oracle_home_srv02.tar dbhome_2
[root@srv02 ~]$ cd /u01/app/
[root@srv02 ~]$ tar -pcvf /backup/cesar_update/srv02_oraInventory.tar oraInventory
ShellScript

Verificando status dos databases do RAC:

[oracle@srv01 ~]$ srvctl status database -d DBPROD
Instance DBPROD1 is running on node srv01
Instance DBPROD2 is running on node srv02
ShellScript

Verificando versão do dbaastools instalado node 1:

[root@srv01 11.2.0]# rpm -qa|grep -i dbaastools
dbaastools_exa-1.0-1+19.1.1.1.0_211221.1316.x86_64
 
[root@srv01 11.2.0]# dbaascli patch tools list
DBAAS CLI version 19.1.1.1.0
Executing command patch tools list
ShellScript

Verificando versão do dbaastools instalado node 2:

[root@srv02 11.2.0]# rpm -qa|grep -i dbaastools
dbaastools_exa-1.0-1+19.1.1.1.0_211221.1316.x86_64
 
[root@srv02 11.2.0]# dbaascli patch tools list
DBAAS CLI version 19.1.1.1.0
Executing command patch tools list
ShellScript

Verificar se a url para download do patch estão iguais em todos os nós:

[root@srv01 exapatch]# cat /var/opt/oracle/exapatch/exadbcpatch.cfg |grep oss_container_url
[root@srv02 exapatch]# cat /var/opt/oracle/exapatch/exadbcpatch.cfg |grep oss_container_url
ShellScript

Verificar se a url esta acessível:

[root@srv01 exapatch]# curl -v -O  URL GERADA ACIMA
[root@srv02 exapatch]# curl -v -O  URL GERADA ACIMA
ShellScript

Exportar variáveis de ambiente:

export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_2
export PATH=${ORACLE_HOME}/bin:$PATH
export ORACLE_SID=DBPROD1
echo $ORACLE_SID
 
ShellScript
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_2
export PATH=${ORACLE_HOME}/bin:$PATH
export ORACLE_SID=DBPROD2
echo $ORACLE_SID
ShellScript

Verificar os patchs disponíveis para serem aplicados node 1:

[root@srv01 ~]# dbaascli patch db list --oh srv01:/u02/app/oracle/product/11.2.0/dbhome_2
DBAAS CLI version 19.1.1.1.0
Executing command patch db list --oh srv01:/u02/app/oracle/product/11.2.0/dbhome_2
INFO : EXACS patching
 
Available Patches
patchid :26610265 (DB 11.2.0.4.170814 QUARTERLY DATABASE PATCH FOR EXADATA - Aug 2017)
patchid :26635694 (DB 11.2.0.4.171017 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2017)
patchid :27011043 (DB 11.2.0.4.180116 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2018)
patchid :27475722 (DB 11.2.0.4.180417 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2018)
patchid :27980213 (DB 11.2.0.4.180717 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2018)
patchid :28462975 (DB 11.2.0.4.181016 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2018)
patchid :28833571 (DB 11.2.0.4.190115 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2019)
patchid :29257245 (DB 11.2.0.4.190416 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2019)
patchid :29698813 (DB 11.2.0.4.190716 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2019)
patchid :30070157 (DB 11.2.0.4.191015 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2019)
patchid :30501894 (DB 11.2.0.4.200114 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2020)
patchid :30805507 (DB 11.2.0.4.200414 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2020)
patchid :31220011 (DB 11.2.0.4.200714 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2020)
patchid :31718644 (DB 11.2.0.4.201020 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2020) 
patchid :32131241 (DB 11.2.0.4.210119 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2021)
patchid :32537095 (DB 11.2.0.4.210420 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2021)
patchid :32917411 (DB 11.2.0.4.210720 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2021)
patchid :33248386 (DB 11.2.0.4.211019 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2021)
patchid :33575241 (DB 11.2.0.4.220118 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2022) 
Install database patch using
dbaascli patch db apply --patchid 33575241 --dbnames <>
ShellScript

Verificar os patchs disponíveis para serem aplicados node 2:

[root@srv02 ~]# dbaascli patch db list --oh srv02:/u02/app/oracle/product/11.2.0/dbhome_2
DBAAS CLI version 19.1.1.1.0
Executing command patch db list --oh srv02:/u02/app/oracle/product/11.2.0/dbhome_2
INFO : EXACS patching
 
Available Patches
patchid :26610265 (DB 11.2.0.4.170814 QUARTERLY DATABASE PATCH FOR EXADATA - Aug 2017)
patchid :26635694 (DB 11.2.0.4.171017 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2017)
patchid :27011043 (DB 11.2.0.4.180116 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2018)
patchid :27475722 (DB 11.2.0.4.180417 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2018)
patchid :27980213 (DB 11.2.0.4.180717 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2018)
patchid :28462975 (DB 11.2.0.4.181016 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2018)
patchid :28833571 (DB 11.2.0.4.190115 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2019)
patchid :29257245 (DB 11.2.0.4.190416 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2019)
patchid :29698813 (DB 11.2.0.4.190716 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2019)
patchid :30070157 (DB 11.2.0.4.191015 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2019)
patchid :30501894 (DB 11.2.0.4.200114 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2020)
patchid :30805507 (DB 11.2.0.4.200414 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2020)
patchid :31220011 (DB 11.2.0.4.200714 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2020)
patchid :31718644 (DB 11.2.0.4.201020 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2020) 
patchid :32131241 (DB 11.2.0.4.210119 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2021)
patchid :32537095 (DB 11.2.0.4.210420 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2021)
patchid :32917411 (DB 11.2.0.4.210720 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2021)
patchid :33248386 (DB 11.2.0.4.211019 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2021)
patchid :33575241 (DB 11.2.0.4.220118 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2022) 
Install database patch using
dbaascli patch db apply --patchid 33575241 --dbnames <>
ShellScript

Executar o precheck em todos os nós antes de aplicar o patchid 33575241 node 1:

[root@srv01 ~]$ dbaascli patch db prereq --patchid 33575241 --instance1 srv01:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD -alldbs
ShellScript

Executar o precheck em todos os nós antes de aplicar o patchid 33575241 node 2:

[root@srv02 ~]$ dbaascli patch db prereq --patchid 33575241 --instance1 srv02:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD -alldbs
ShellScript

Ultimas linhas do log informando que foi executado com sucesso:

INFO: status of slave txn###: Precheck completed on srv01
INFO: -precheck_async completed on srv01:/u02/app/oracle/product/11.2.0/dbhome_2
INFO: Successfully released ohome lock. Proceeding to release local provisioning lock
INFO: Successfully released local provisioning lock
INFO: -precheck_async completed on all nodes
 
INFO: status of slave txn###: Precheck completed on srv02
INFO: -precheck_async completed on srv02:/u02/app/oracle/product/11.2.0/dbhome_2
INFO: Successfully released ohome lock. Proceeding to release local provisioning lock
INFO: Successfully released local provisioning lock
INFO: -precheck_async completed on all nodes
ShellScript

Aplicar o patchid 33575241 no node srv02:

[root@srv02 ~]$ nohup dbaascli patch db apply --patchid 33575241 --instance1 srv02:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD --run_datasql 0 &
ShellScript

Acompanhando os logs da aplicação do patch:

[root@srv02 ~]$ tail -f /var/opt/oracle/log/exadbcpatch/exadbcpatch.log
2022-05-19 18:07:00.950618 - Instance check cleared for node srv02 w.r.t nodelist
2022-05-19 18:07:00.950760 - INFO: deleting patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-19 18:07:00.958084 - INFO: deleted patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-19 18:07:00.958209 -
INFO: initpatch being run for post ecs patching
2022-05-19 18:07:00.958467 - Output from cmd /var/opt/oracle/misc/initpatch.pl ecsbppost run on localhost  is:
INFO : No patch needed
2022-05-19 18:07:01.510654 - cmd took 0.551481008529663 seconds
2022-05-19 18:07:01.510964 - ##### INFO: Exadbcpatch completed successfully #####
ShellScript

Aplicar o patchid 33575241 no node srv01:

[root@srv02 ~]$ nohup dbaascli patch db apply --patchid 33575241 --instance1 srv01:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD --run_datasql 1 &
ShellScript

Acompanhando os logs da aplicação do patch:

[root@srv01 ~]$ tail -f /var/opt/oracle/log/exadbcpatch/exadbcpatch.log
 
2022-05-20 09:47:27.879789 - Instance check cleared for node srv01 w.r.t nodelist
2022-05-20 09:47:27.880011 - INFO: deleting patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-20 09:47:27.891809 - INFO: deleted patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-20 09:47:27.892030 -
INFO: initpatch being run for post ecs patching
2022-05-20 09:47:27.893285 - Output from cmd /var/opt/oracle/misc/initpatch.pl ecsbppost run on localhost  is:
INFO : No patch needed
2022-05-20 09:47:28.447038 - cmd took 0.553269147872925 seconds
2022-05-20 09:47:28.447205 - ##### INFO: Exadbcpatch completed successfully #####
ShellScript

Leave a Reply

Your email address will not be published. Required fields are marked *

search previous next tag category expand menu location phone mail time cart zoom edit close