Table of contents
We are often creating copy of our production databases for QA/Development/Testing purposes. The procedure we apply is quite simple:
- Do a disk to disk copy of the production volume group including database files and all related Oracle files (Oracle home, spfile, init files,…).
- Make visible this copied volume group on QA/Development/Test server.
- Mount all filesystems using a new naming convention to clearly reflect a copy of production database. For example Oracle home moved from /u01/app/oracle/product/11.2.0/dbhome_1 to /u01/app/oracle/product/11.2.0/dbhome_re and Oracle files moved from /u01/app/oracle/oradata/prod to /u01/app/oracle/oradata/re.
- Relink of Oracle home and re-creation of control file to reflect new directory structure.
This procedure is working well but the relink step failed for one recently upgraded database to 11gR2 with below error message:
You do not have sufficient permissions to access the inventory ‘/oraInventory’. Installation cannot continue. It is required that the primary group of the install user is same as the inventory owner group. Make sure that the install user is part of the inventory owner group and restart the installer.: Permission denied
I had a look to relink shell script and discover that Oracle redesign it, moving from standard set of make commands (Oracle 10gR2 for example) to runInstaller one. Which is well explained in Oracle 11gR2 Relink New Feature [ID 883299.1] My Oracle support (MOS) note.
So error message is becoming quite self explaining as on our reporting server the oraInst.loc file does not contain any entry for the newly copied oraInventory directory. By the way if you are on a server that contains multiple copied database dynamic edition of the oraInst.loc file can become a nightmare to handle.
All previous relink options have also been removed and the remaining ones are all and as_installed.
I also noticed that if all is removed from oraInst.loc file i.e. something like:
Then relink all command works fine !
But if I create and empty directory and chown it by a different user than Oracle home owner (oracle:dba in my case, same Unix dba group):
[root@server1 /]# mkdir /oraInventory [root@server1 /]# chown yjaquier:dba /oraInventory
And set oraInst.loc file to:
#inventory_loc=/u01/app/oraInventory inventory_loc=/oraInventory inst_group=dba
Then relink all command fails with above error message for permission rights…
There are most probably multiple solutions to this problem, here is two simplistic ones to implement. For both you will need to modify relink shell script so save a copy first…
Dedicated oraInst.loc file
Modify the relink script for the below line. We have one distinct Oracle Unix account per Oracle home and one Oracle home per database. Yes we waste disk space but this provides maximum flexibility for patching and ease performance tuning with different Unix owner per database:
RUNINSTALLER="$ORACLE_HOME/oui/bin/runInstaller -invPtrLoc /home/oraiere/oraInst.loc"
And create your own oraInst.loc file putting required information, for example:
Overwrite oraInst.loc with variables
When displaying runInstaller help with:
[oracle@eserver1 ~]$ $ORACLE_HOME/oui/bin/runInstaller -help
I saw at the end:
Command Line Variables Usage Command line variables are specified using <name=value>; for example: [ session: | compName: | compName:version: ]variableName=" valueOfVariable"]
I was not able to find a clear documentation of potential variables to be put but found what I was looking for in EM 12c: How to Install Enterprise Manager 184.108.40.206 Using Silent Method [ID 1361643.1] MOS note.
So you can also replace:
$RUNINSTALLER $ARGS > $LOGFILE 2>&1
$RUNINSTALLER $ARGS UNIX_GROUP_NAME=dba INVENTORY_LOCATION=/u01/app/oraInventory > $LOGFILE 2>&1
This solution does not require creation of a dedicated oraInst.loc file…
- Oracle 11gR2 Relink New Feature [ID 883299.1]
- EM 12c: How to Install Enterprise Manager 220.127.116.11 Using Silent Method [ID 1361643.1]
- Is It Necessary To Relink Oracle Following OS Upgrade? [ID 444595.1]