Amazon books

Wednesday, April 28, 2010

Cloning Oracle Home and Changing User and Group Installation Owner

"If you are cloning your Oracle Home and need to change the user and/or group owner execute the following steps:

1-First, tar your source ORACLE_HOME:
tar cvhf OH_Source.tar $ORACLE_HOME

2-Then, move the tar to the new host and untar it.
cd ORACLE_HOME
tax xvf OH_Source.tar

3-Use the command below to change the owner of files. (login as root)

find . -user ora10g -exec chown oraprd {} \; --where ora10g is the old user and oraprd is the new user

4-Change the group owner using the following command: (login as root)
find . -group dba10g -exec dba11g {} \; --where the old group is dba10g and new is dba11g

5-Now, change information on config.o file that controls which user is the installation owner.
5.1- For Linux
cd $ORACLE_HOME/rdbms/lib
cp config.o config.o_backup
vi config.c
--Find and replace the old group name (in our case is dba10g) to the new value (dba11g)
--Old value
#define SS_DBA_GRP "dba10g"
#define SS_OPER_GRP "dba10g"
--New value
#define SS_DBA_GRP "dba11g"
#define SS_OPER_GRP "dba11g"

5.2- For AIX
cd $ORACLE_HOME/rdbms/lib
mv config.o config.o_backup
vi config.c
--Old value
.csect H.12.NO_SYMBOL{RO}, 3
.string "dba10g"
:
.csect H.14.NO_SYMBOL{RO}, 3
.string "dba10g"
--Old value
.csect H.12.NO_SYMBOL{RO}, 3
.string "dba11g"
:
.csect H.14.NO_SYMBOL{RO}, 3
.string "dba11g"

6-Finally, execute the clone.pl script to clone the database or use the runInstaller as follows:
--Using clone.pl script
cd $ORACLE_HOME/clone/bin
perl clone.pl ORACLE_HOME="/u01/app/oracle/product/11.2.0/db11g" ORACLE_HOME_NAME="OraDB11g"
--Or runInstaller
./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/u01/app/oracle/product/11.2.0/db11g" ORACLE_HOME_NAME="OraDB11g"

7-Run the root.sh script (loged in as root user)
$ORACLE_HOME/root.sh

8-Run ChangePerm script
$ORACLE_HOME/install/changePerm.sh


Your clone is done. Just check environment variables and start database and listener.


"

No comments:

Post a Comment