Twitter

Lost entries in oratab after GI 12.2 upgrade or patch

I first faced this issue when upgrading a GI to 12.2. My ASM entries in /etc/oratab were gone after the upgrade, I have then added them back manually. I first thought of a bug but after many upgrades, I thought about a new feature and how Flex ASM works came back to my mind.
Indeed, as with Flex ASM any ASM instance may move to any other nodes of a cluster, it makes sense to not have it hardcoded in the /etc/oratab file. The drawback of this is that oraenv doesn't work any more and this is an issue (at least for me as I use it a lot -- a lot more than a Flex ASM instance moves to another node . . .).

Starting from 12.2, ASM is configured as Flex ASM , this is why we have to set the Flex ASM Cardinality to "ALL" when upgrading GI to 12.2 for example.

This lost entries in oratab behavior is a consequence of this and is officially documented in the MOS note "Applying 12.2.0.1.171017 RU (patch 26737266) To 12.2 Cluster Removes Oratab Entries (Doc ID 2329359.1)" where we can learn more on this:

  • This is an expected behavior starting from 12.2.0.1.171017 GI RU/PSU (patch 26737266) and 12.2.0.1.171017 OCW RU/PSU (patch 26729536).
  • As patches are cumulative, all subsequent patches will also remove your entries from oratab

This note also provides a detailed explanation on the exact behavior of this feature:
When an agent starts up, it removes 12.2 ASM and database entries from /etc/oratab that have comments "# line added by Agent" appended to the line.
Surprisingly, it removes the oratab entries based on the "# line added by Agent" comment !

This is good to know though as we can then easily work that around by removing or modifying this comment in the /etc/oratab file like shown below where all these lines would survive a GI 12.2 upgrade / patch:
[oracle@exadatadb01 ~]$ cat /etc/oratab
myprod:/u01/app/oracle/product/12.1.0.2/dbhome_13:N              # please don't remove me
anotherprod:/u01/app/oracle/product/12.1.0.2/dbhome_1:N
+ASM1:/u01/app/oracle/grid/12.2:N                                # I want to stay in oratab
[oracle@exadatadb01 ~]$

and continue to enjoy oraenv !


This trick saved me a lot of time, hope you'll like it !

No comments:

Post a Comment

CUDA: getting started on WSL

I have always preferred command line and vi finding it more efficient so after the CUDA: getting started on Windows , let's have a loo...