際際滷

際際滷Share a Scribd company logo
Cloning an Oracle Home or Oracle Install
Satishbabu Gunukula, Oracle ACE
 18+ Years of Experience in Database Technologies and
specialized in high availability solutions.
 Masters Degree in Computer Applications
 Written articles for major publications
 Oracle Certified Professional Oracle 8i,9i,10g
 Oracle Certified Expert Oracle 10g RAC
http://www.oracleracexpert.com
Program Agenda
 Overview of Cloning
 When Cloning useful
 Methods of Cloning
 How is Cloning done
 Copy source Oracle Installation
 Clone Oracle Installation
 Summary
 Q& A
Overview of Cloning
 Starting from 10g onwards, Oracle supports cloning and users can
easily clone existing Oracle installations
 Cloning is a process of copying an existing installation to a different
server or location. Cloning is similar to an Oracle installation except
Oracle universal installation performs the actions in a special mode
called clone mode.
 The source and destination servers should have same configuration
and packages installed in order Oracle cloning to work
 The cloning process works by copying all files from the source Oracle
home to the destination Oracle home, and files which are not part of
the source instance will not be copied to the destination location
When Cloning useful
When it comes to a server upgrade or migration, database
administrators will have to question whether to clone or
install the Oracle binaries
 If you need to create a new installation with many patches, then
cloning enables you to create a new installation with all patches
applied to it in one step and eliminate manual installation.
 To create an installation that is the same as Production for
Development/Testing purpose
 If you need to create Oracle home and deploy it to many hosts
 If you need to quickly deploy an instance and the applications
Methods of Cloning
Below methods available to clone the Oracle installation
 Clone using perl clone.pl : In this method you need to install DB
Console so that the required Perl files will be installed in
$ORACLE_HOME/clone/bin.
 Clone using runInstaller : In this method you need to install DB
Console
 Clone using runInstaller in silent mode: In this method you will
be using same runInstaller in non-interactive mode
How is Cloning done
Cloning is a two-step process, in the first step you will copy
Oracle installation from source to destination and in second
step you will run Oracle Universal Installer to clone the
installation on the destination.
Step 1: Copy source Oracle Installation
Step 2: Clone Oracle Installation
Copy source Oracle Installation
 Before you make a copy of the existing installation, the databases,
listeners and agents, etc running on the server should be shut down
on the source installation.
 The source Oracle home will have configuration/trace/log files related
to the environment such as udump, bdump, alert.log , init.ora,
listener.ora, tnsnames.ora, etc.
 When you clone the Oracle home, the destination will have all source
configuration files. If your destination will have different
database/instances then your need to exclude those files during copy
or remove the files after copy.
 If your requirement is server migration and then no need to exclude
those files.
Copy source Oracle Installation
Below are the lists of few files that may need to exclude
during the cloning process, in case your destination will be
different.
 Database related files (Data/tmp files, log files, Control filesetc)
 SQL*Net Files
 $ORACLE_HOME/listener.ora
 $ORACLE_HOME/tnsnames.ora
 $ORACLE_HOME/sqlnet.ora
 DB related directories $ORACLE_HOME/dbs ( init.ora,spfile.ora,orapwd)
 $ORACLE_HOME/admin (trace, alert, core filesetc)
 $ORACLE_BASE/diag (trace, alert, core, incident filesetc)
 $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole__ (Enterprise manager/db console)
 $ORACLE_HOME/hs/admin/ (Heterogeneous files)
Copy source Oracle Installation
Things to note during the copy
 Oracle 11g has permissions are more restrictive files and exclude
the below files during the copy or tar
 $ORACLE_HOME/bin/nmo
 $ORACLE_HOME/bin/nmb
 $ORACLE_HOME/bin/nmhs
 From 11g and higher, add these files to the exclusion list, theyll be
created by root.sh script later in the cloning process.
 If any other products are installed/configured but not required at
destination, then you need to exclude those files as well.
Copy source Oracle Installation
On Source Server : Copy Oracle Installation using tar
Note: You can also use cp, scp or any other copy tools.
 Create a exclude list
 Create a tar file by excluding files or directories which are not
required using below command
Copy source Oracle Installation
On Destination Server:
 Create directory structure and set the environment variables such
as ORACLE_HOME, ORACLE_BASE, etc.
 Copy the tar file to destination server and unpack.
Clone Oracle Installation
On Destination Server: Pre-requisites
 Make sure that ORACLE_HOME and ORACLE_BASE environment
variables are set
 The /etc/oraInst.loc file must exists and if not exists create
manually
 If you have copied oracle Inventory, then you will receive a
message that the inventory already exists. Either exclude the
Oracle Inventory during the copy of detach the Oracle home
Clone using perl clone.pl
Here is the syntax
Clone using runInstaller
Here is the Syntax
Clone using runInstaller in silent
Here is the Syntax
Clone Oracle Installation
On Destination Server: Post-clone tasks
 To complete the cone you should log in as root and run
$ORACLE_HOME/root.sh
 # /home/oracle/product/11.2.0.4/dbhome_1/root.sh
 In Unix & Linux platforms run changePerm.sh for version
10g and older
 #/home/oracle/product/10.2.0/db_1/install/changePerm.sh
 o /home/oracle/product/10.2.0/db_1
Summary
 Benefits of Cloning
 Methods available to Clone
 Known Common Issues
Questions & Answers

More Related Content

Cloning an Oracle Home or Oracle Install.pptx

  • 1. Cloning an Oracle Home or Oracle Install Satishbabu Gunukula, Oracle ACE 18+ Years of Experience in Database Technologies and specialized in high availability solutions. Masters Degree in Computer Applications Written articles for major publications Oracle Certified Professional Oracle 8i,9i,10g Oracle Certified Expert Oracle 10g RAC http://www.oracleracexpert.com
  • 2. Program Agenda Overview of Cloning When Cloning useful Methods of Cloning How is Cloning done Copy source Oracle Installation Clone Oracle Installation Summary Q& A
  • 3. Overview of Cloning Starting from 10g onwards, Oracle supports cloning and users can easily clone existing Oracle installations Cloning is a process of copying an existing installation to a different server or location. Cloning is similar to an Oracle installation except Oracle universal installation performs the actions in a special mode called clone mode. The source and destination servers should have same configuration and packages installed in order Oracle cloning to work The cloning process works by copying all files from the source Oracle home to the destination Oracle home, and files which are not part of the source instance will not be copied to the destination location
  • 4. When Cloning useful When it comes to a server upgrade or migration, database administrators will have to question whether to clone or install the Oracle binaries If you need to create a new installation with many patches, then cloning enables you to create a new installation with all patches applied to it in one step and eliminate manual installation. To create an installation that is the same as Production for Development/Testing purpose If you need to create Oracle home and deploy it to many hosts If you need to quickly deploy an instance and the applications
  • 5. Methods of Cloning Below methods available to clone the Oracle installation Clone using perl clone.pl : In this method you need to install DB Console so that the required Perl files will be installed in $ORACLE_HOME/clone/bin. Clone using runInstaller : In this method you need to install DB Console Clone using runInstaller in silent mode: In this method you will be using same runInstaller in non-interactive mode
  • 6. How is Cloning done Cloning is a two-step process, in the first step you will copy Oracle installation from source to destination and in second step you will run Oracle Universal Installer to clone the installation on the destination. Step 1: Copy source Oracle Installation Step 2: Clone Oracle Installation
  • 7. Copy source Oracle Installation Before you make a copy of the existing installation, the databases, listeners and agents, etc running on the server should be shut down on the source installation. The source Oracle home will have configuration/trace/log files related to the environment such as udump, bdump, alert.log , init.ora, listener.ora, tnsnames.ora, etc. When you clone the Oracle home, the destination will have all source configuration files. If your destination will have different database/instances then your need to exclude those files during copy or remove the files after copy. If your requirement is server migration and then no need to exclude those files.
  • 8. Copy source Oracle Installation Below are the lists of few files that may need to exclude during the cloning process, in case your destination will be different. Database related files (Data/tmp files, log files, Control filesetc) SQL*Net Files $ORACLE_HOME/listener.ora $ORACLE_HOME/tnsnames.ora $ORACLE_HOME/sqlnet.ora DB related directories $ORACLE_HOME/dbs ( init.ora,spfile.ora,orapwd) $ORACLE_HOME/admin (trace, alert, core filesetc) $ORACLE_BASE/diag (trace, alert, core, incident filesetc) $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole__ (Enterprise manager/db console) $ORACLE_HOME/hs/admin/ (Heterogeneous files)
  • 9. Copy source Oracle Installation Things to note during the copy Oracle 11g has permissions are more restrictive files and exclude the below files during the copy or tar $ORACLE_HOME/bin/nmo $ORACLE_HOME/bin/nmb $ORACLE_HOME/bin/nmhs From 11g and higher, add these files to the exclusion list, theyll be created by root.sh script later in the cloning process. If any other products are installed/configured but not required at destination, then you need to exclude those files as well.
  • 10. Copy source Oracle Installation On Source Server : Copy Oracle Installation using tar Note: You can also use cp, scp or any other copy tools. Create a exclude list Create a tar file by excluding files or directories which are not required using below command
  • 11. Copy source Oracle Installation On Destination Server: Create directory structure and set the environment variables such as ORACLE_HOME, ORACLE_BASE, etc. Copy the tar file to destination server and unpack.
  • 12. Clone Oracle Installation On Destination Server: Pre-requisites Make sure that ORACLE_HOME and ORACLE_BASE environment variables are set The /etc/oraInst.loc file must exists and if not exists create manually If you have copied oracle Inventory, then you will receive a message that the inventory already exists. Either exclude the Oracle Inventory during the copy of detach the Oracle home
  • 13. Clone using perl clone.pl Here is the syntax
  • 15. Clone using runInstaller in silent Here is the Syntax
  • 16. Clone Oracle Installation On Destination Server: Post-clone tasks To complete the cone you should log in as root and run $ORACLE_HOME/root.sh # /home/oracle/product/11.2.0.4/dbhome_1/root.sh In Unix & Linux platforms run changePerm.sh for version 10g and older #/home/oracle/product/10.2.0/db_1/install/changePerm.sh o /home/oracle/product/10.2.0/db_1
  • 17. Summary Benefits of Cloning Methods available to Clone Known Common Issues

Editor's Notes