Home > linux, oracle > Clone Oracle Internet Application Server IAS console 10gR2

Clone Oracle Internet Application Server IAS console 10gR2

I have a problem with the true type fonts used by some of our reports and I need to do some testing with the configuration files. As I need to restart several times the reports server, and I don’t want it to impact in my environment, I asked my sysadmin to clone the development machine to another one (we use VMWare). We use RedHat Enterprise Linux AS release 3, and our oracle iAS version is 10.1.2.3.0.

Once cloned, I cannot start the midtier in the new machine (my sysdamin has changed the IP and hostname), and I have problems accessing the source one, but I solved it by stopping and restarting againt the iasconsole:


$ emctl stop iasconsole

$ emctl start iasconsole

Instead of reconfiguring manually hostname in my destination machine across all config files (almost impossible to get it work), I found this document to clone the iAS console:
http://download.oracle.com/docs/cd/B14099_19/core.1012/b13995/cloning.htm#ASADM084

Hands on. I assume [SOURCE] as the source machine, and [DESTINATION] as the destination machine:

  • [SOURCE] Perl 5.6.1 or higher is required:

$ perl -v

  • [SOURCE] Before running the cloning Perl scripts, you must set the PERL5LIB environment variable to the path of the Perl directory in the Oracle home. This path must be the first one listed in the variable definition:

$ export PERL5LIB=$ORACLE_HOME/perl/lib/5.6.1:$ORACLE_HOME/perl/lib/site_perl/5.6.1:$PERL5LIB

  • [SOURCE] Run the perl script to prepare the source:
$ cd $ORACLE_HOME/clone/bin
$ perl prepare_clone.pl

Creating the log directory: /app/oracle/midtier10.1/clone/logs

Clone log file location: /app/oracle/midtier10.1/clone/logs/clone1307524376.log
Error log file location: /app/oracle/midtier10.1/clone/logs/error1307524376.log
[Wed Jun  8 11:12:56 2011  INFO] Starting with the Prepare Clone operation at the source
[Wed Jun  8 11:12:56 2011  INFO] The temp directory being used is /tmp
[Wed Jun  8 11:12:56 2011  INFO] The file /app/oracle/midtier10.1/inventory/Clone/clone.xml is clean. Repair operation not needed.
[Wed Jun  8 11:13:02 2011  INFO] The prepare clone operation completed successfully
  • [SOURCE] Once finished, archive and compress the ORACLE_HOME dir. You can ignore the file changed errors.
$ cd $ORACLE_HOME
$ tar cf - * | gzip > oracleas.tar.gz
ar: j2ee/OC4J_BI_Forms/log/OC4J_BI_Forms_default_island_1/server.log: file changed as we read it
tar: j2ee/OC4J_FORMS_DES/log/OC4J_FORMS_DES_default_island_1/server.log: file changed as we read it
tar: oracleas.tar.gz: file changed as we read it
tar: Error exit delayed from previous errors
  • [DESTINATION] Copy the archived file to the destination machine and uncompress it into the destination ORACLE_HOME dir. As my destination machine is a clone of the source machine, I rename the ORACLE_HOME to avoid problems:
$ mv /app/oracle/midtier10.1 /app/oracle/midtier10.1_bak
$ mkdir -p /app/oracle/midtier10.1
$ cd /app/oracle
$ gunzip < oracleas.tar.gz | tar xf -
  • Change to the directory ORACLE_HOME/clone/bin and run the clone script:
$ cd $ORACLE_HOME/clone/bin
$ perl clone.pl ORACLE_HOME=/app/oracle/midtier10.1 ORACLE_HOME_NAME=OAS10gclon -instance ias-clon
  • I’m getting this error:
[Wed Jun  8 12:51:53 2011  INFO] Error:*** Alert: Unable to create a new Oracle Home at /app/oracle/midtier10.1. Oracle Home already exists at this location. Select another location. ***
  • This is because I’ve clonned the machine also, and the same directory is already registered with different ORACLE_HOME_NAME. To fix it locate the oraInventory dir, and go to ContentsXML subdir. Backup the inventory.xml file and then delete the line corresponding to the ORACLE_HOME conflicting dir:
<HOME NAME="OAS_10g" LOC="/app/oracle/midtier10.1" TYPE="O" IDX="2"/>
  • Rerun again the perl script, and now it’s all ok:
[Wed Jun  8 13:11:03 2011  INFO] Final Status:
[Wed Jun  8 13:11:03 2011  INFO] ==============
[Wed Jun  8 13:11:03 2011  INFO] The clone operation completed successfully.

 

  • Check the log & error files generated at $ORACLE_HOME/clone/logs, just to be sure.
  • Finally, you need to run the script root.sh located at $ORACLE_HOME,
I need to reconfigure some files, as they are restored to it's original content:
  • $ORACLE_HOME/bin/reports.sh: I’ve to reconfigure REPORTS_PATH, NLS_LANG, and some other parameters that I had configured in the SOURCE machine.

I can access to the Enterprise Manager Console, and access my applications normally.

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: