Showing posts with label oracle home cloning. Show all posts
Showing posts with label oracle home cloning. Show all posts

Wednesday, 10 October 2018

Cloning oracle home to new home.

Cloning oracle home to new home.

In this example we have taken already installed oracle home db_1 to create another home in the same server db_2.

Source home: /u01/app/oracle/product/12.1.0/db_1
Clone home: /u01/app/oracle/product/12.1.0/db_2

Use cp command to copy source home to new clone home as below.

[oracle@oratest ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0/db_1

[oracle@oratest ~]$ cd /u01/app/oracle/product/12.1.0
[oracle@orahost 11.2.0]$ cp -rp db_1 db_2
cp: cannot open `db_1/bin/nmhs' for reading: Permission denied
cp: cannot open `db_1/bin/nmb' for reading: Permission denied
cp: cannot open `db_1/bin/nmo' for reading: Permission denied


use the runInstaller command in the new Oracle Home as below:

[oracle@oratest 12.1.0]$ cd db_2/oui/bin
[oracle@oratest bin]$ ./runInstaller -silent -clone ORACLE_BASE="/u01/app/oracle" ORACLE_HOME="/u01/app/oracle/product/12.1.0/db_2" ORACLE_HOME_NAME="OraHome2"

Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 3960 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-03-12_09-46-15AM. Please wait ...[oracle@orahost bin]$ Oracle Universal Installer, Version 12.1.0.1.0 Production
Copyright (C) 1999, 2015, Oracle. All rights reserved.

You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2018-03-12_09-46-15AM.log
.................................................................................................... 100% Done.


Installation in progress (Tuesday, March 12, 2018 9:46:35 AM EDT)
.............................................................................                                                   77% Done.
Install successful

Linking in progress (Tuesday, March 12, 2018 9:46:43 AM EDT)
Link successful

Setup in progress (Tuesday, March 12, 2018 9:48:14 AM EDT)
Setup successful

End of install phases.(Tuesday, March 12, 2018 9:50:31 AM EDT)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/u01/app/oracle/product/12.1.0/db_2/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
    
The cloning of OraHome2 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2018-03-12_09-46-15AM.log' for more details.


We are ready with new home db_2