Read-Only-Oracle-Home: the follow-up post

After my recent post on read-only ORACLE_HOME I received some feedback and had some discussions with some colleagues on this topic.

So I decided that another post may be helpful.

In the documentation ( Oracle advises you to move the demo directories out of the ORACLE_HOME directory to work properly.

This principle can be applied to some other directories, too.

As mentioned in my previous post, the $ORACLE_HOME/sqlpatch directory is a candidate for this procedure and I think $ORACLE_HOME/rdbms/audit is another one.

So the following shell commands can be helpful. It will move the directories to the $ORACLE_BASE/homes/<HOMENAME> directory and will replace the directories in $ORACLE_HOME with symbolic links:

 for DIR in `echo jdbc/demo odbc/demo ord/http/demo precomp/demo rdbms/demo sqlj/demo sqlplus/demo xdk/demo rdbms/audit sqlpatch`; do 
 if [ -e $ORACLE_HOME/$DIR ]
 echo Directory $DIR exists and will be moved to $(orabasehome)
 mkdir -p $(orabasehome)/$DIR
 cp -r $ORACLE_HOME/$DIR.backup/* $(orabasehome)/$DIR 2>/dev/null
 ln -s $(orabasehome)/$DIR $ORACLE_HOME/$DIR
 echo Directory $DIR does not exist. No action required.

Please note that not all directories are available in a pure RDBMS installation. Some of these directories are created when installation the “Database Examples”.

Of course, when installing new components (like the “Examples”) and when patching the software, the filesystem with $ORACLE_HOME must be read-write, but with the changes described above, I was able to patch a database (datapatch) with the software in a read-only-filesystem.

Taking these result when testing the read-only-ORACLE_HOME-feature, some questions arise:

  • Why doesn’t Oracle offer to make an ORACLE_HOME read-only in the installer?
  • Why doesn’t Oracle do the changes mentioned above (replacing directories in $ORACLE_HOME with symbolic links) automatically when making an ORACLE_HOME read-only with “roohctl -enable”?

But hopefully, there are improvements with this feature in the next releases.

This entry was posted in Common. Bookmark the permalink.

Leave a Reply

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