Skip Headers

Oracle9i Application Server Certified Configuration Deployment and Cloning Guide
Release 2.0.6 for Linux x86
Part No. B10953-02
  Go To Table Of Contents
Contents
Go To Index
Index

Previous Next  

8 Cloning

This chapter describes concepts, features, and procedures for cloning Oracle9i Application Server Certified Configuration (Oracle9iAS CC).

This chapter contains the following sections:

Cloning Concepts

Cloning replicates existing configured Oracle9iAS CC instances onto different sets of machines, and reconfigures all the components that are involved to make the new (cloned) instances work.

Cloning of Oracle9iAS CC entails cloning the components and rewiring the links to each other to make them work in the cloned setup.


Note:

The Oracle9iAS CC cloning tool does not clone the Oracle9i release 2 customer database. Use the tools that come with Oracle9i Certified Configuration release 2 to clone the customer database.

The cloning tool allows users to clone Oracle9iAS CC. Cloning involves the following steps:

  1. Setting up source instance for cloning and create an image of the source instance.

  2. Extracting the image created in the previous step on a target system.

  3. Reconfiguring the copied image on a target system.

Cloning Types

The following are the two types of cloning:

With cold cloning, all the services on a source instance are shut down before the image is created. With hot cloning, no service is required to be shut down on a source instance. Images can be created even when the services are up and running. This cloning tool version supports both cold and hot cloning.

Cloning Considerations

The following are considerations when cloning Oracle9iAS CC.

Prerequisites for Cloning

Before cloning, ensure you meet the following prerequisites:

Cloning a Two-Tier Deployment

Cloning a two-tier deployment involves the following Oracle homes:


On the database-tier:

On the middle-tier:

You must complete the following steps to clone a two-tier deployment:

Preparing the Clone Stage Area on the Source Database-Tier

Perform the following on the source database-tier system to prepare an image for the Oracle9iAS Infrastructure Oracle home:

  1. Log in as the root user.

  2. Source the /etc/ora_cc_env environment using the following command:

    # . /etc/ora_cc_env
    
    
  3. Change directories to $ORACLE_CC_ROOT/clone/scripts by using the following command:

    # cd $ORACLE_CC_ROOT/clone/scripts
    
    
  4. Run the prepare_to_clone.sh script.

    • For cold cloning:

    1. Run the following command:

      # prepare_to_clone.sh

    2. Specify All to prepare the stage area for all the Oracle homes in the list returned by the above command.

    3. Specify the stage area location.


      Note:

      Cold cloning requires that you shut down the processes in the selected Oracle homes prior to image creation.

    • For hot cloning:

    1. Log in as the operating system user who owns the Oracle9iAS Infrastructure database Oracle home.

    2. Use the following command to set the environment for Oracle9iAS Infrastructure database Oracle home

      $. $HOME/profile.iascc_env

    3. Perform the redo-log switch and put the Oracle9iAS Infrastructure database in backup mode.

    4. Back up the control files to a trace file using the following command:

      $ /admin/mwcc/clone/scripts/bkupcontrol2trc.sh

      The script will generate the trace file, gen_controlfile_<ORACLE_SID>.trc file under /SID/oradata directory.

    5. Log in as the root user and source the /etc/ora_cc_env file using the following command:

      # ./etc/ora_cc_env

    6. Go to the $ORACLE_CC_ROOT/clone/scripts by using the following command:

      # cd $ORACLE_CC_ROOT/clone/scripts

    7. Run the following command to create an image of the Oracle9iAS Infrastructure database without the database related files:

      # prepare_to_clone.sh -hot

    8. Specify All to prepare the stage area for all the Oracle homes in the list returned by the above command.

    9. Specify the stage area.


      Note:

      The image of the data files of the Infrastructure database is NOT created in the case of hot cloning. You must perform the necessary steps to put the database in hot backup mode and perform the necessary log switch. You must also take an image of the data files, archive log files, and the trace file (gen_controlfile<ORACLE_SID>.trc). Extract or copy these files on the destination database system under the appropriate new SID directories, prior to starting the cloning of the infrastructure database Oracle home on the destination system.

  5. Copy the stage area from the source system to the destination system. Alternatively, use nfs export to make the stage area available on the destination system.

Preparing the Clone Stage Area on the Source Middle-Tier

Perform the following on the source middle-tier system:

  1. Log in as the root user.

  2. Source the /etc/ora_cc_env environment using the following command:

    # . /etc/ora_cc_env
    
    
  3. Change directories to $ORACLE_CC_ROOT/clone/scripts by using the following command:

    # cd $ORACLE_CC_ROOT/clone/scripts
    
    
  4. Run the prepare_to_clone.sh script.

    • For cold cloning, run the following command:

      prepare_to_clone.sh

    1. Specify All to prepare the stage area for all the Oracle homes in the list returned by the above command.

    2. Specify the stage area.


      Note:

      Cold cloning requires that you shut down the processes in the selected Oracle homes prior to image creation.

    • For hot cloning, run the following command:

      prepare_to_clone.sh -hot

    1. Specify All to prepare the stage area for all the Oracle homes in the list returned by the above command.

    2. Specify the stage area.

  5. Copy the stage area from the source system to the destination system. Alternatively, use nfs export to make the stage area available on the destination system.

After the clone stage area is prepared, you can restart services on the source system.


See Also:

See Appendix A, " Administering Oracle9i Application Server CC" on how to restart services.

Extracting the Clone Images on the Destination Database-Tier and Middle-Tier

Perform the following on the destination database-tier and middle-tier system:

  1. Log in as the root user.

  2. If the latest version of the Utility Pack is not installed on your system, use the following steps to install the Utility Pack:

    1. Mount the gold image export area as described in Chapter 2, " Installing and Configuring Oracle9iAS CC Using the Gold Image".

    2. Change directory to the stage area.

    3. Run the install.sh script as follows:

      # ./install.sh -cdzeroonly
      
      
  3. Source the /etc/ora_cc_env environment using the following command:

    # . /etc/ora_cc_env
    
    
  4. Remove temporary property files:

    # rm $ORACLE_CC_ROOT/clone/config/*.properties
    
    
  5. Change directories to $ORACLE_CC_ROOT/clone/scripts by using the following command:

    # cd $ORACLE_CC_ROOT/clone/scripts
    
    
  6. Run the clone_extract.sh script:

    1. Specify the stage area.

    2. Specify the instance type and customer ID.

  7. Confirm the Oracle home to which the stage area will be extracted.

    Access to the stage area is not needed once extraction is successful. However, Oracle advises you to preserve access in case of reconfiguration failure. In such a case, you would need to re-extract the component that failed, and re-run the clone_driver.sh script.

  8. For hot cloning, you must extract the database related files on the target system at the proper /<SID>/oradata location appropriately.


    Note:

    If you used prepare_to_clone.sh to create the hot image, ensure that you manually copy the Infrastructure database data files, archive log files, and the gen_controlfile_<ORACLE_SID>.trc trace file over to the proper directories on the target database-tier system. This is a pre-requisite for cloning of the Infrastructure database Oracle home.

Cloning Customer Database

While it is not necessary to clone the Oracle9i release 2 customer database first, it is required that you clone the database and make sure that all the processes are up and running before your clone the Oracle9i Application Server mid-tier components.

The customer database Oracle home will have a Oracle Net service (tns alias) entry created to connect to the Infrastructure database. Change this Net service entry appropriately, so that it connects to new the target Infrastructure database.


Note:

You must clone the Oracle9i release 2 customer database using the tools that come with Oracle9i Certified Configuration. For details, see Oracle9i Certified Configuration documentation at:

http://ptd.us.oracle.com/doc/completed-cc.htm#dbcc


Cloning Oracle9iAS CC in a Two-Tier Deployment

The cloning process requires that you clone in the following order:

  • Infrastructure database Oracle home on the database-tier

  • Infrastructure mid-tier Oracle home on the middle-tier

  • Oracle9i Application Server mid-tier components on the middle-tier

Use the following instructions to clone each of the items above:


Note:

If you have Oracle9iAS Portal or Oracle9iFS on the customer database, you must clone them before you start this procedure.

  1. Log in as the root user on the destination database-tier.

  2. Source the /etc/ora_cc_env environment by using the following command:

    # . /etc/ora_cc_env
    
    
  3. Change directories to $ORACLE_CC_ROOT/clone/scripts by using the following command:

    # cd $ORACLE_CC_ROOT/clone/scripts
    
    
  4. When cloning the Infrastructure Mid-Tier, set the DISPLAY environment variable.

  5. Run the clone_driver.sh script to start the cloning process.

  6. Select the Oracle home for one of the following:

    • Infrastructure database

    • Infrastructure mid-tier

    • Oracle9i Application Server mid-tier components

    The parameters for the cloned (new) instance can be specified as an input file or in interactive mode.


Cloning using interactive mode:

Use the following command to cold clone in interactive mode:

# ./clone_driver.sh

Use the following command to hot clone in interactive mode:

# ./clone_driver.sh -hot

Answer the questions and complete the reconfiguration process.


Cloning using an input file:

Use the following command to clone using an input file:

  1. Copy the $ORACLE_CC_ROOT/clone/config/clone_src.properties file to another file. Edit the file and specify the parameters (except passwords) relevant to this configuration.

  2. Run the clone_driver.sh script:

    # ./clone_driver.sh -propfile  <propfile name>
    
    

    The example above is for cold cloning. To hot clone, append -hot to the end of the code line above. After the clone_driver.sh script runs successfully, the new (cloned) Infrastructure database will be configured and running.

Use the configuration steps outlined in Chapter 2, " Installing and Configuring Oracle9iAS CC Using the Gold Image" to verify that the Infrastructure database is correctly configured and for ways to handle any configuration failures.

Cloning a Single-Tier Deployment

Cloning a single-tier deployment involves the following components:

You must complete the following steps to clone a single-tier deployment:

Preparing the Clone Stage Area on the Source Single-Tier

Perform the following on the source single-tier system:

  1. Log in as the root user.

  2. Source the /etc/ora_cc_env environment using the following command:

    # . /etc/ora_cc_env
    
    
  3. Change directories to $ORACLE_CC_ROOT/clone/scripts by using the following command:

    # cd $ORACLE_CC_ROOT/clone/scripts
    
    
  4. Remove temporary property files:

    # rm $ORACLE_CC_ROOT/clone/config/*.properties
    
    
  5. Run the prepare_to_clone.sh script.

    1. Specify All to prepare the stage area for all Oracle homes on the single-tier.

    2. Specify the stage area.

  6. Copy the stage area from the source system to the destination system. Alternatively, use nfs export to make the stage area available on the destination system.

Extracting the Clone Images on the Destination Single-Tier

Perform the following on the destination single-tier system:

  1. Log in as the root user on the destination single-tier.

  2. If the latest version of the Utility Pack is not installed on your system, use the following steps to install the Utility Pack:

    1. Mount the gold image export area as described in Chapter 2, " Installing and Configuring Oracle9iAS CC Using the Gold Image".

    2. Change directory to the stage area.

    3. Run the install.sh script as follows:

      # ./install.sh -cdzeroonly
      
      
  3. Source the /etc/ora_cc_env environment using the following command:

    # . /etc/ora_cc_env
    
    
  4. Change directories to $ORACLE_CC_ROOT/clone/scripts by using the following command:

    # cd $ORACLE_CC_ROOT/clone/scripts
    
    
  5. Run the clone_extract.sh script:

    1. Specify the stage area.

    2. Specify the instance type and customer ID.

  6. Confirm the Oracle home to which the stage area will be extracted.

    Access to the stage area is not needed once extraction is successful. However, the user is advised to preserve access in case of reconfiguration failure. In such a case, the user would need to re-extract the component that failed, and re-run the clone_driver.sh script.

Cloning Customer Database

While it is not necessary to clone the Oracle9i release 2 customer database first, it is necessary for you to clone the database and make sure that all the processes are up and running before your clone the Oracle9i Application Server mid-tier components.

The customer database Oracle home will have a Oracle Net service (tns alias) entry created to connect to the Infrastructure database. Change this Net service entry appropriately, so that it connects to new the target infrastructure database.


Note:

You must clone the Oracle9i release 2 customer database using the tools that come with Oracle9i Certified Configuration. For details, see Oracle9i Certified Configuration documentation at:

http://ptd.us.oracle.com/doc/completed-cc.htm#dbcc


Cloning Oracle9iAS CC on a Single-Tier

The cloning process requires that you clone in the following order:

  • Infrastructure

  • Oracle9i Application Server Mid-Tier Components on a Single-Tier

To clone the Infrastructure or Oracle9i Application Server mid-tier components on the single-tier, use the following instructions:

  1. Log in as the root user on the single-tier.

  2. Source the /etc/ora_cc_env environment by using the following command:

    # . /etc/ora_cc_env
    
    
  3. Change directories to $ORACLE_CC_ROOT/clone/scripts by using the following command:

    # cd $ORACLE_CC_ROOT/clone/scripts
    
    
  4. When cloning the Infrastructure, set the DISPLAY variable.

  5. Run the clone_driver.sh script to start the cloning process.

  6. Select the Oracle home for Infrastructure or Oracle9i Application Server mid-tier components.

    The parameters for the cloned (new) instance can be specified as an input file or in interactive mode.


Cloning using interactive mode:

Use the following command to cold clone in interactive mode:

# ./clone_driver.sh

Use the following command to hot clone in interactive mode:

# ./clone_driver.sh -hot

Cloning using an input file:

Use the following command to clone using a property file as an input:

  1. Copy the $ORACLE_CC_ROOT/clone/config/clone_src.properties file to another file. Edit the file and specify the parameters relevant to this configuration.

  2. Run the clone_driver.sh script:

    # ./clone_driver.sh -propfile  <propfile name>
    
    

    The code line above is for cold cloning. To hot clone, append -hot to the end of the code line. After the clone_driver.sh script runs successfully, the new (cloned) Infrastructure will be configured and running.

Use the configuration steps outlined in Chapter 2, " Installing and Configuring Oracle9iAS CC Using the Gold Image" to verify that the Infrastructure is correctly configured and for ways to handle any configuration failures.

Postcloning Steps

The following are postcloning steps.

Remove Old Partner Applications

Using the following procedure, remove the old partner application entries on the cloned system:

  1. Log into the Oracle Single Sign-On (SSO) server at:

    http:// host:port/pls/orasso

  2. Click SSO Server Administration.

  3. Click Administer Partner Applications.

  4. In the Edit/Delete Partner Application section, delete the following old partner applications:

    • Oracle Portal (portal schema name on customer database)

    • Oracle Portal (portal)

    • old ias infrastructure oid/sso instance name

    • old ias middle tier instance name

    • wireless_deviceportal


    Note:

    If there are two application entries with the same name (for example, wireless_deviceportal), then use the following procedure to identify the old application:
    1. Click on the Edit icon against the partner application.

    2. Note the ID of the application in the Edit Partner Application page.

    The application ID with the lesser value is the old partner application.


Oracle9iFS Cloning Setup

After reconfiguration is complete, perform the following steps to configure Oracle9iFS:

Modify Existing Credential Managers

You must modify four existing Credential Managers: SmallServiceConfiguration, MediumServiceConfiguration, LargeServiceConfiguration, and IfsDefault. Each time you run Oracle9iFS Credential Manager Configuration Assistant (ifsoidcm), you can only modify one existing Credential Manager. Run ifsoidcm four times, and complete the following procedure for each Credential Manager:

  1. Run Oracle9iFS Credential Manager Configuration Assistant ($ORACLE_HOME/9ifs/bin/ifsoidcm).

  2. The Welcome window opens. Click Next.

  3. The Oracle9iFS Database window opens. Enter the iFS schema name (normally ifssys), schema password, and the TNS connect string to the database on which iFS data resides, and click Next.

  4. If the Database Connection Information window opens, then enter the iFS database hostname, TCP/IP port number, and database service name or SID. Click Next.

  5. The Existing Credential Managers window opens, listing the following existing Credential Managers: SmallServiceConfiguration, MediumServiceConfiguration, LargeServiceConfiguration, and IfsDefault

  6. Select the entry OiD under the Configuration Manager, click Modify, and click Next.

  7. The OiD Login window opens. Ensure that the OiD Host Name, Port Number and password entries are correct, and click Next.

    The wizard connects before going on to the next screen to ensure that the information that you enter is valid.

  8. The Supported Functions window opens. Click Next.

  9. The Authentication Types window opens. Click Next.

  10. The Oracle9iFS Specific Passwords window opens. Click Next.

  11. The Subscribers window opens. Click Next.

  12. The Begin Configuration window opens. Click Configure.

    Configuration begins. A task completion window opens to inform you when configuration is complete, typically within 30 seconds.

    Repeat this procedure until you configure all four Credential Managers.

Modify Node Hostname Configuration

Complete the following procedure to update hostname configurations:

  1. Run Oracle9iFS Manager Console ($ORACLE_HOME/9ifs/bin/ifsmgr).

  2. Log in as the SYSTEM user, using the syntax SYSTEM/system password (Example: SYSTEM/manager9ifs), and give the ifssys schema password (for example, manager)

  3. From the console display, click Node Configuration. The node configuration tree expands. Note that the Locator text field is modified to indicate the correct node configuration, but the Name text field continues to list the previous host name.

  4. Without changing the host name, make a small change in the Locator text field.

    For example, click in the Locator text field, and add a space, and then delete the extra space you added.

    The activity in the Locator text field causes the Name text field to repopulate with the correct hostname.

  5. Click Apply to apply the changes to both Node Configuration entries (HTTP Node and Node).

  6. Quit ifsmgr.

When you complete the preceding postconfiguration procedures, start Oracle9iFS using Oracle Enterprise Manager. It should start up normally.

Cloning Oracle Application InterConnect

After reconfiguration is complete, you need to do the following to reset the Oracle Application InterConnect (OAI) schema password:

  1. Log in as the user who owns the Oracle9i Application Server mid-tier Oracle home.

  2. Set the environment variables by sourcing the following script:

    $ ~/
    $ . profile.iascc_env
    
    
  3. Reconfigure OAI hub.

    $ /admin/mwcc/oai/config_oai.sh -hub
    
    

If you configured OAI database adapters, you will see the following error messages after cloning:

Failed to connect to the hub database. Please check the hub database parameters Retrying after a 15 sec interval...
java.sql.SQLException: ORA-01017: invalid username/password; logon denied

You must kill all the database adapter processes, reset OAI schema password as mentioned above, and restart the database adapter.

Refreshing ONS Configuration

Perform the steps in this section only if you installed Oracle9iAS CC from a cloned image. Do not use these steps if you installed Oracle9iAS CC from Product CD-ROMs.

For Two-Tier Deployment

Use the following to refresh the ONS configuration for a two-tier deployment:

  1. In the Infrastructure database Oracle home on the database-tier, update the ias.properties file in the $ORACLE_HOME/config directory with the proper host name values for the following entries:

    • SSOhost

    • OIDhost

  2. Run the following command in the Infrastructure mid-tier Oracle home on the middle-tier system. This command updates the $ORACLE_HOME/opmn/conf/ons.conf file with the IP addresses of the database-tier and middle-tier systems.

    $ $ORACLE_HOME/dcm/bin/dcmctl listinstances
    
    

    Verify that the ons.conf file contains the IP addresses of the database-tier and middle-tier systems only.

  3. Run the following command in the Infrastructure database Oracle home on the database-tier system. This command updates the $ORACLE_HOME/opmn/conf/ons.conf file with the IP addresses of the database-tier and middle-tier systems.

    $ $ORACLE_HOME/dcm/bin/dcmctl listinstances
    
    

    Verify that the ons.conf file contains the IP addresses of the database-tier and middle-tier systems only.

You must now stop and start services in all Oracle homes. See "Restart Oracle9i Application Server Services" for details.

For Single-Tier Deployment

Use the following to refresh the ONS configuration for a single-tier deployment:

  1. Run the following command in the Infrastructure Oracle home.This command updates the $ORACLE_HOME/opmn/conf/ons.conf file with the IP addresses of the current system.

    $ $ORACLE_HOME/dcm/bin/dcmctl listinstances
    
    
  2. Verify that the ons.conf file contains the IP addresses of the current system.

You must now stop and start services in all Oracle homes. See "Restart Oracle9i Application Server Services" for details.

Restart Oracle9i Application Server Services

If you installed Oracle9iAS CC from the clone image, then running the OPMN processes may contain outdated information. You must restart Oracle9i Application Server services to ensure the information in the OPMN processes is up to date. See Appendix A, " Administering Oracle9i Application Server CC" for details on how to start or stop services in a specific Oracle home. You must restart the services in the following order:

You must restart the services in the sequence specified in Appendix A.