This short blog post will explain a change in the behaviour of how the /etc/oratab file is maintained by the oraagent.bin process in Oracle 12c Release 2 with an installed October 2017 Release Update.
Table of Contents
How is the /etc/oratab file maintained?
During the lifetime of an Oracle Cluster, new databases are created or old ones are deleted. Despite the databases created by a user, Oracle creates by default additional instances like +ASMx instances or the -MGMTDB instance for the Grid Infrastructure Management Repository. These instances are added to the /etc/oratab by the oraagent.bin process automatically.
Every entry added by this process is marked with the comment # line added by Agent.
$> vi /etc/oratab ... +ASM1:/app/grid/product/220.127.116.11:N # line added by Agent -MGMTDB:/app/grid/product/18.104.22.168:N TESTDB:/app/oracle/product/22.214.171.124:N # line added by Agent OWNDB:/app/oracle/product/126.96.36.199:N NEWDB:/app/oracle/product/188.8.131.52:N # line added by Agent
Of course you can add additional entries too.
Every action performed by the oraagent.bin is logged to a corresponding $ORACLE_BASE/diag/crs/<Hostname>/crs/trace/*_oraagent_*.trc file.
After applying the October 2017 Release Update, every /etc/oratab entry belonging to either the Grid Infrastructure 12c Release 2 or to instances running in an Oracle Database 12c Release 2 home are deleted. But only entries which include the comment # line added by Agent are considered for deletion.
Instances beloging to older releases are not deleted, even if the comment line is included in there definitions.
$> vi /etc/oratab ... -MGMTDB:/app/grid/product/184.108.40.206:N TESTDB:/app/oracle/product/220.127.116.11:N # line added by Agent OWNDB:/app/oracle/product/18.104.22.168:N
The +ASMx instance and the instance for the Oracle 12c Release 2 database are gone.
If you need these entries for your own scripts, you have two possibilies to avoid the automatic deletion.
- Remove the comment line before applying the Release Update
- Add a new oratab entry without the comment line manually
By the way, before the /etc/oratab file is updated, a backup is created under $ORACLE_HOME/srvm/admin/oratab.bak.<Hostname>. The Oracle Home can be either the Grid Infrastructure or an Oracle Database Home depending on what triggered the update – e.g. the Database Creation Assistant (DBCA).