{"id":5040,"date":"2021-05-31T08:15:48","date_gmt":"2021-05-31T08:15:48","guid":{"rendered":"https:\/\/swiv.com.br\/patching-oci-db-home\/"},"modified":"2026-05-27T20:02:31","modified_gmt":"2026-05-27T19:02:31","slug":"patching-oci-db-home","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/05\/31\/patching-oci-db-home\/","title":{"rendered":"Patching OCI DB Home"},"content":{"rendered":"\n<p>Nos artigos anteriores, realizamos a atualiza\u00e7\u00e3o da camada de Sistema Operacional e GRID, e agora vamos avan\u00e7ar na camada de DB Home. <\/p>\n\n\n\n<p>Validando vers\u00e3o vigente pelo utilit\u00e1rio DB CLI e a sugerida para atualiza\u00e7\u00e3o (de modo que, se aplicada, o DB Home ficar\u00e1 up-to-date):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;opc@luxor ~]$ sudo su -\nLast login: Mon May 31 07:00:55 UTC 2021\n&#x5B;root@luxor ~]# dbcli describe-component\nSystem Version\n---------------\n21.1.3.3.0\n \nComponent                                Installed Version    Available Version\n---------------------------------------- -------------------- --------------------\nGI                                        19.11.0.0.0           up-to-date\nDB                                        12.2.0.1.201020       12.2.0.1.210420\n<\/pre><\/div>\n\n\n<p>Para garantir que o Data Patch ser\u00e1 aplicado ao nosso banco de dados, devemos garantir que o mesmo est\u00e1 up:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# exit\nlogout\n&#x5B;opc@luxor ~]$ sudo su - oracle\nLast login: Mon May 31 07:01:02 UTC 2021\n&#x5B;oracle@luxor ~]$ srvctl status database -db $ORACLE_UNQNAME\nInstance CORTEX is not running on node luxor\n&#x5B;oracle@luxor ~]$ srvctl start database -db $ORACLE_UNQNAME\n&#x5B;oracle@luxor ~]$ srvctl status database -db $ORACLE_UNQNAME\nInstance CORTEX is running on node luxor\n<\/pre><\/div>\n\n\n<p>Nessa etapa, precisamos coletar o DB Home ID conforme comando abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@luxor ~]$ exit\nlogout\n&#x5B;opc@luxor ~]$ sudo su -\nLast login: Mon May 31 07:01:15 UTC 2021 on pts\/0\n&#x5B;root@luxor ~]# dbcli list-databases\n \nID                                       DB Name    DB Type  DB Version           CDB        Class    Shape    Storage    Status        DbHomeID                 \n---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------- ------------ ----------------------------------------\n4c906765-68ea-4e05-ba3f-c54152f912cf     CORTEX     Si       12.2.0.1.201020      true       Oltp              ASM        Configured   8bc7f0a5-6230-4b99-b568-b73cf0038525\n<\/pre><\/div>\n\n\n<p>Caso queiramos nos certificar que todos os pr\u00e9-requisitos s\u00e3o atendidos e que o ambiente est\u00e1 apto para atualiza\u00e7\u00e3o, podemos rodar o pr\u00e9-check abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# dbcli update-dbhome --precheck\nMissing\/invalid Arguments\nPlease refer usage: dbcli update-dbhome -h\n&#x5B;root@luxor ~]# dbcli update-dbhome -i &quot;8bc7f0a5-6230-4b99-b568-b73cf0038525&quot; --precheck\n{\n  &quot;jobId&quot; : &quot;1e436ec5-136d-4760-80d0-d7cf62e4f2d2&quot;,\n  &quot;status&quot; : &quot;Created&quot;,\n  &quot;message&quot; : null,\n  &quot;reports&quot; : &#x5B; ],\n  &quot;createTimestamp&quot; : &quot;May 31, 2021 07:11:14 AM UTC&quot;,\n  &quot;resourceList&quot; : &#x5B; ],\n  &quot;description&quot; : &quot;DBHome Prechecks&quot;,\n  &quot;updatedTime&quot; : &quot;May 31, 2021 07:11:14 AM UTC&quot;,\n  &quot;percentageProgress&quot; : &quot;0%&quot;\n}\n<\/pre><\/div>\n\n\n<p>Acompanhando a evolu\u00e7\u00e3o do Job que foi criado:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;1e436ec5-136d-4760-80d0-d7cf62e4f2d2&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  1e436ec5-136d-4760-80d0-d7cf62e4f2d2\n            Description:  DBHome Prechecks\n                 Status:  Running\n                Created:  May 31, 2021 7:11:14 AM UTC\n               Progress:  50%\n                Message:\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nPre-operations for DBHome patching                                       May 31, 2021 7:11:15 AM UTC         May 31, 2021 7:12:28 AM UTC         Success\nDBHome patching                                                          May 31, 2021 7:12:28 AM UTC         May 31, 2021 7:12:28 AM UTC         Running\n<\/pre><\/div>\n\n\n<p>Job de verifica\u00e7\u00e3o finalizado com sucesso:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;1e436ec5-136d-4760-80d0-d7cf62e4f2d2&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  1e436ec5-136d-4760-80d0-d7cf62e4f2d2\n            Description:  DBHome Prechecks\n                 Status:  Success\n                Created:  May 31, 2021 7:11:14 AM UTC\n               Progress:  100%\n                Message:\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nPre-operations for DBHome patching                                       May 31, 2021 7:11:15 AM UTC         May 31, 2021 7:12:28 AM UTC         Success\nDBHome patching                                                          May 31, 2021 7:12:28 AM UTC         May 31, 2021 7:17:30 AM UTC         Success\nPost-operations for DBHome patching                                      May 31, 2021 7:17:30 AM UTC         May 31, 2021 7:17:35 AM UTC         Success\n<\/pre><\/div>\n\n\n<p>Disparando efetivamente o patching do DB Home:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# dbcli update-dbhome -i &quot;8bc7f0a5-6230-4b99-b568-b73cf0038525&quot;\n{\n  &quot;jobId&quot; : &quot;65e8f05e-fc9d-4df5-9363-b380317792ca&quot;,\n  &quot;status&quot; : &quot;Created&quot;,\n  &quot;message&quot; : null,\n  &quot;reports&quot; : &#x5B; ],\n  &quot;createTimestamp&quot; : &quot;May 31, 2021 07:19:42 AM UTC&quot;,\n  &quot;resourceList&quot; : &#x5B; ],\n  &quot;description&quot; : &quot;DBHome Patching: Home ID is 8bc7f0a5-6230-4b99-b568-b73cf0038525&quot;,\n  &quot;updatedTime&quot; : &quot;May 31, 2021 07:19:42 AM UTC&quot;,\n  &quot;percentageProgress&quot; : &quot;0%&quot;\n}\n<\/pre><\/div>\n\n\n<p>Acompanhando o Job:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;65e8f05e-fc9d-4df5-9363-b380317792ca&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  65e8f05e-fc9d-4df5-9363-b380317792ca\n            Description:  DBHome Patching: Home ID is 8bc7f0a5-6230-4b99-b568-b73cf0038525\n                 Status:  Running\n                Created:  May 31, 2021 7:19:42 AM UTC\n               Progress:  20%\n                Message:\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nPre-operations for DBHome patching                                       May 31, 2021 7:19:43 AM UTC         May 31, 2021 7:20:48 AM UTC         Success\nDBHome patching                                                          May 31, 2021 7:20:48 AM UTC         May 31, 2021 7:20:48 AM UTC         Running\n<\/pre><\/div>\n\n\n<p>Processo finalizado com \u00eaxito:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;65e8f05e-fc9d-4df5-9363-b380317792ca&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  65e8f05e-fc9d-4df5-9363-b380317792ca\n            Description:  DBHome Patching: Home ID is 8bc7f0a5-6230-4b99-b568-b73cf0038525\n                 Status:  Success\n                Created:  May 31, 2021 7:19:42 AM UTC\n               Progress:  100%\n                Message:\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nPre-operations for DBHome patching                                       May 31, 2021 7:19:43 AM UTC         May 31, 2021 7:20:48 AM UTC         Success\nDBHome patching                                                          May 31, 2021 7:20:48 AM UTC         May 31, 2021 8:03:07 AM UTC         Success\nPost-operations for DBHome patching                                      May 31, 2021 8:03:07 AM UTC         May 31, 2021 8:06:59 AM UTC         Success\n<\/pre><\/div>\n\n\n<p>Validando a vers\u00e3o atual do DB Home:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# dbcli describe-component\nSystem Version\n---------------\n21.1.3.3.0\n \nComponent                                Installed Version    Available Version\n---------------------------------------- -------------------- --------------------\nGI                                        19.11.0.0.0           up-to-date\nDB                                        12.2.0.1.210420       up-to-date\n<\/pre><\/div>\n\n\n<p>Atualiza\u00e7\u00e3o realizada com sucesso conforme evid\u00eancias:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# exit\nlogout\n&#x5B;opc@luxor ~]$ sudo su - oracle\nLast login: Mon May 31 08:06:53 UTC 2021\n&#x5B;oracle@luxor ~]$ cd $ORACLE_HOME\/OPatch\n&#x5B;oracle@luxor OPatch]$ ll\ntotal 200\n-rw-r----- 1 oracle oinstall  2980 Feb  1 10:40 README.txt\ndrwxr-x--- 6 oracle oinstall  4096 Apr 22  2020 auto\ndrwxr-x--- 2 oracle oinstall  4096 May 31 07:20 config\n-rwxr-x--- 1 oracle oinstall   589 Feb  1 10:40 datapatch\n-rwxr-x--- 1 oracle oinstall   627 Feb  1 10:40 datapatch.bat\ndrwxr-x--- 2 oracle oinstall  4096 May 31 07:20 docs\n-rwxr-x--- 1 oracle oinstall 23550 Feb  1 10:40 emdpatch.pl\ndrwxr-x--- 2 oracle oinstall  4096 May 31 07:20 jlib\ndrwxr-x--- 6 oracle oinstall  4096 May 31 07:20 jre\ndrwxr-x--- 9 oracle oinstall  4096 May 31 07:20 modules\ndrwxr-x--- 5 oracle oinstall  4096 May 31 07:20 ocm\n-rwxr-x--- 1 oracle oinstall 49564 Feb  1 10:40 opatch\n-rwxr-x--- 1 oracle oinstall 16458 Feb  1 10:40 opatch.bat\n-rw-r----- 1 oracle oinstall  2551 Feb  1 10:40 opatch.pl\n-rwxr-x--- 1 oracle oinstall  4290 Feb  1 10:40 opatch_env.sh\n-rwxr-x--- 1 oracle oinstall  1763 Feb  1 10:47 opatchauto\n-rwxr-x--- 1 oracle oinstall   393 Feb  1 10:47 opatchauto.cmd\ndrwxr-x--- 4 oracle oinstall  4096 May 31 07:20 opatchprereqs\n-rwxr-x--- 1 oracle oinstall  3159 Feb  1 10:40 operr\n-rwxr-x--- 1 oracle oinstall  4218 Feb  1 10:40 operr.bat\n-rw-r----- 1 oracle oinstall  3177 Feb  1 10:40 operr_readme.txt\ndrwxr-x--- 2 oracle oinstall  4096 May 31 07:20 oplan\ndrwxr-x--- 3 oracle oinstall  4096 Apr 22  2020 oracle_common\ndrwxr-x--- 3 oracle oinstall  4096 Apr 22  2020 plugins\ndrwxr-xr-x 2 oracle oinstall  4096 May 31 07:20 private\ndrwxr-x--- 2 oracle oinstall  4096 May 31 07:20 scripts\n-rw-r----- 1 oracle oinstall    27 Feb  1 10:40 version.txt\n&#x5B;oracle@luxor OPatch]$ .\/opatch lsinventory | grep escript\nARU platform description:: Linux x86-64\nPatch description:  &quot;UPDATE PERL IN 12.2.0.1 DATABASE ORACLE HOME TO V5.32&quot;\nPatch description:  &quot;JDK BUNDLE PATCH 12.2.0.1.210420&quot;\nPatch description:  &quot;Database Apr 2021 Release Update : 12.2.0.1.210420 (32507738)&quot;\nPatch description:  &quot;OJVM RELEASE UPDATE 12.2.0.1.201020 (31668898)&quot;\nPatch description:  &quot;OCW OCT 2020 RELEASE UPDATE 12.2.0.1.201020 (31802727)&quot;\n<\/pre><\/div>\n\n\n<p>Obs: Este procedimento foi criado pelo senhor Ahmed Baraka (www.ahmedbaraka.com) e foi apenas reproduzido por mim em um laborat\u00f3rio pessoal para fins de aprendizado.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nos artigos anteriores, realizamos a atualiza\u00e7\u00e3o da camada de Sistema Operacional e GRID, e agora vamos avan\u00e7ar na camada de DB Home. Validando vers\u00e3o vigente pelo utilit\u00e1rio DB CLI e a sugerida para atualiza\u00e7\u00e3o (de modo que, se aplicada, o DB Home ficar\u00e1 up-to-date): Para garantir que o Data Patch ser\u00e1 aplicado ao nosso banco [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-5040","post","type-post","status-publish","format-standard","hentry","category-oci"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=5040"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5040\/revisions"}],"predecessor-version":[{"id":9119,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5040\/revisions\/9119"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}