Wednesday, 19 February 2014

Troubleshooting RapidClone issues with Oracle Applications 11i (Doc ID 364565.1)
Modified: 23-Mar-2013 Type: HOWTO
In this Document
Goal
Fix
Section 1. Before starting to clone
Section 2. Preparing Source System
Section 3. Copy the files to the Target system
Section 4. Configure Target system
Appendix A: Common Issues when cloning the Database Tier
How to prevent DB recovery issues when running adcfgclone
Troubleshooting DB recovery issues while running adcfgclone
References
APPLIES TO:
Oracle Applications Manager - Version 11.5.2 to 11.5.10.2 [Release 11.5 to 11.5.10]
Information in this document applies to any platform.
Checked for relevance on 23-MAR-2013
GOAL
This Note is NOT a replacement for Note:230672.1.
Note:230672.1 must be followed when performing a clone of Oracle Applications 11i.
This troubleshooting note is intended as a guide to help determine the cause of some problems that may arise during a Rapid Clone.
The idea is to provide a detailed explanation into what each step is trying to achieve making it easier to identify which part of the clone has failed and why.
Locations of log files are listed, which should be uploaded when reporting a cloning issue to Oracle Support.
FIX
Section 1. Before starting to clone
The list of pre-requisite patches can be found on Note:230672.1
The first thing to do is check is that all pre-requisite patches have been applied.
Once this is done, ensure the latest code and templates is being used by applying latest Rapid Clone patch.
Check Note 230672.1 for the latest Rapid Clone patch.
Important: There are several steps to applying a rapid clone patch. Checking the recently applied patch list, or querying the AD_BUGS table, is not sufficient in
verifying that the latest cloning code exists.
Important: When applying a Rapid Clone patch using adpatch, ensure all of the following steps are performed:-
Apply the RapidClone patch using adpatch to Apps Tier nodes.
Run AutoConfig on all Apps Tier nodes
This will ensure the new templates supplied by the patch are instantiated.
Rapid Clone scripts, such as adpreclone.pl, are also instantiated using the latest templates
> $COMMON_TOP/admin/scripts/$CONTEXT_NAME/adautocfg.sh appspass=<appspwd>
Copy the new templates and code from the patch to the DB Tier
Applying the Rapid Clone using adpatch will only deliver the templates and java code to the Apps Tiers, not the DB Tier, so this step is to collect
the required files and copy them to the DB Tier:-
> perl $AD_TOP/bin/admkappsutil.pl
This will collect the required templates and code,used by AutoConfig on the DB tier, and compress them into the
$APPL_TOP/admin/out/appsutil.zip file.
Copy and extract the appsutil.zip to the RDBMS ORACLE_HOME
> unzip -o appsutil.zip
Run AutoConfig on the DB Tier
2/7/2014 Document Display
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4vbvzgz0b_120 2/7
The new templates,scripts and java code are delivered by appsutil.zip to the DB Tier.
However, these still need to instantiated into the configuration files and scripts.
To do this, run AutoConfig on the DB Tier.
RapidClone scripts such as adpreclone.pl are also instantiated using the latest templates.
> $ORACLE_HOME/appsutil/bin/adconfig.sh contextfile=$CONTEXT_FILE appspass=apps
Once this step has been completed successfully, all the java .class files under
RDBMS $ORACLE_HOME/appsutil/java/oracle
should be identical to those under
$JAVA_TOP/oracle.
Important: If it is not immediately evident that the appsutil.zip steps above have been followed, after applying a new AutoConfig or Rapid Clone patch,
then do the steps again.
Failure to do this may result in issues that have been resolved in a later version of the software.
Section 2. Preparing Source System
Rapid Clone Commands:
DB Tier :
> perl adpreclone.pl dbTier
Apps Tier(s) :
> perl adpreclone.pl appsTier
The preparation phase collects information about the source system, creates a cloning stage area, and generates templates and drivers. All of these
are to reconfigure the instance on a Target machine.
Preclone will do the following:
Convert Symbolic links
All symbolic links pointing to a static path will be converted into relative paths
Create templates
Any files under the $ORACLE_HOME that contain system specific information, will be replicated and converted into a template. These templates
are placed into the $ORACLE_HOME/appsutil/template directory.
Create driver(s)
A driver file, relating to these new templates is created called instconf.drv. This contains a list of all the templates and their locations, and the
destination configuration files that these templates will create.
This driver file is called instconf.drv and is placed into directory
$ORACLE_HOME/appsutil/driver
For the appsTier, both the 8.0.6 and iAS ORACLE_HOMES will have the appsutil/template and appsutil/driver directories once the preclone
stage is completed
For the dbTier, these directories will already exist, but new templates and the new instconf.drv will be added
For more information on the instconf.drv and potential problems, please refer to Document 1339094.1 - Troubleshooting "instconf.drv"
Failures in 11i Rapid Clone
Create Stage area
A clone stage is created containing the required java code and scripts to reconfigure the instace on the Target machine
Rapid Clone stage area:
dbTier : $ORACLE_HOME/appsutil/clone
appsTier(s) - $COMMON_TOP/clone
The stage area(s) consist of the following directories:-
jre used to run the java code on the Target machine.
bincontains the RapidClone scripts that can be run on the Target machine:-
adclone.pl is the main cloning script
adcfgclone.pl is used to configure the Target system, this calls adclone.pl
adclonectx.pl is used to clone a Source XML file manually
adaddnode.pl is used to add a new node to the Patch History tables
adchkutl.sh checks for existence of require O/S utils, cc, make, ar and ld
jlib contains all the Rapid Clone java code, jdbc libraries etc
context contains templates used for a Target XML file
data(Database Tier only) contains the driver file, and templates used to generate the control file SQL script
adcrdb.zip contains the template and list of datafiles on the Source
addbhomsrc.xml contains information on the datafile mount points of the Source
2/7/2014 Document Display
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4vbvzgz0b_120 3/7
appl (Applications Tier only) this is used when merging appltops, i.e Multi-node to Single node cloning
Important: The information in the stage area is only updated when running adpreclone.pl.
Whenever an AutoConfig or Rapid Clone patch is applied, and AutoConfig executed, it will not automatically update the stage area. Only
adpreclone.pl will do this. The script adpreclone.pl must be run (after running AutoConfig) to ensure new code, templates and scripts are copied
into the stage area before performing a clone.
If this is not done, then the code used to configure the Target system will not be the code from the latest patches applied. This must be done on
all nodes, db and appsTier(s).
Executing adpreclone.pl will create a log file:-
Rapid Clone:
dbTier : $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/StageDBTier_xxxxxx.log
appsTier : $APPL_TOP/admin/$CONTEXT_NAME/log/StageAppsTier_xxxxxx.log
Important: These log files will contain the $Header version of the class file used.
Ensure this is the version delivered via the latest Rapid Clone patch.
If it is not the latest version, ask customer to follow "Section 1: Before starting to clone" above, and rerun adpreclone.pl steps.
Once this adpreclone.pl step has been completed successfully, all the java .class files under the following directories should be identical to those under
$JAVA_TOP/oracle :
RDBMS $ORACLE_HOME/appsutil/java/oracle
RDBMS $ORACLE_HOME/appsutil/clone/jlib/java/oracle
$COMMON_TOP/clone/jlib/java/oracle
If they are not, ensure to follow the pre-req AutoConfig steps, and rerun adpreclone on all DB and Apps Tier nodes.
Highly recommended: It is highly recommended customers rename any existing clone stage area, and allow RapidClone to create a new one. This
should avoid any known issues that are caused by old redundant files from a previous clone.
On the DB Tier:-
Rename RDBMS $ORACLE_HOME/appsutil to $ORACLE_HOME/appsutil_old
On the Apps Tier, run "perl $AD_TOP/bin/admkappsutil.pl"
Copy the appsutil.zip to the RDBMS $ORACLE_HOME and unzip
Copy the Context file from RDBMS $ORACLE_HOME/appsutil_old to the new $ORACLE_HOME/appsutil
Run AutoConfig on the DB Tier
Do the "Prepare Source system" steps i.e "perl adpreclone.pl dbTier"
On the Apps Tier:-
Rename $COMMON_TOP/clone to $COMMON_TOP/clone_old
Rename 8.0.6 $ORACLE_HOME/appsutil to $ORACLE_HOME/appsutil_old
Rename iAS $ORACLE_HOME/appsutil to $ORACLE_HOME/appsutil_old
Do the "Prepare Source system" steps i.e "perl adpreclone.pl appsTier"
Section 3. Copy the files to the Target system
When copying files to the Target, ensure the application tier files copied to the target system are owned by the target APPLMGR user, and that the
database tier files are owned by the ORACLE user.
When copying the datafiles, ensure the DB is shutdown cleanly prior to the copy.
If there is any DB activity while the datafiles are copied, the clone will fail to recreate the control files with error:-
ORA-01194: file <filename> needs more recovery to be consistent
For more potential recovery errors, refer to Appendix A of this document
If a clone must be performed using a hot backup, then follow the alternative cloning steps in Appendix B of Note:230672.1.
Section 4. Configure Target system
Rapid Clone Commands:
DB Tier :
> perl adcfgclone.pl dbTier
Apps Tier:
> perl adcfgclone.pl appsTier
The configuration phase will reconfigure the copied instance after gathering the required information.
2/7/2014 Document Display
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4vbvzgz0b_120 4/7
adchkutl.sh
The first step performed is the OS utility check (adchkutl.sh).
This ensures make, cc, ld and ar executables are available in the PATH.
CloneContext.class
This will create the Target Context file from the values entered on the screen.
For a full list of the questions, see Note:216664.1
All the questions, values entered, results of the port availability check etc will be logged in a log file located in same location as the
adcfgclone.pl script:-
dbTier : $ORACLE_HOME/appsutil/clone/bin
appsTier(s) : $COMMON_TOP/clone/bin
Log files for this phase:-
dbTier: $TMP/CloneContext_xxxxxx.log
appsTier(s): $TMP/CloneContext_xxxxxx.log
Both Tiers: $TMP/adclonectx.err
Note: With earlier RapidClone code, the logs were generated as follows:-
dbTier: $ORACLE_HOME/appsutil/clone/bin/CloneContext_xxxxxx.log
appsTier(s): $COMMON_TOP/clone/bin/CloneContext_xxxxxx.log
Both Tiers: $TMP/adclonectx.err
If any of the variables in the Target system Context file appear to be incorrect, then check this log file to see how the incorrect value arose.
ApplyDBTier.class/ApplyAppsTier.class
Once the XML is created, or passed as a parameter on the command line, then the configuration phase begins.
This part will instantiate all the templates created during the preparation phase under:
$ORACLE_HOME/appsutil/template.
Templates to instantiate are located in driver file
$ORACLE_HOME/appsutil/driver/instconf.drv
Log files for this phase:-
dbTier: $ORACLE_HOME/appsutil/log/<Target Context Name>/ApplyDBTier_xxxxxx.log
appsTier(s): $APPL_TOP/admin/<Target Context Name>/log/ApplyAppsTier_xxxxxx.log
Relink the ORACLE_HOME(s)
The executables in the ORACLE_HOME(s) will be relinked during the configuration phase.
The commands used, and results of the relinking will displayed in log file :
$ORACLE_HOME/install/make.log
Create the Control files (DB Tier only)
Once the templates are instantiated, and the ORACLE_HOME is relinked, then the control files can be recreated.
The templates used here are located in
$ORACLE_HOME/appsutil/clone/data/stage/adcrdb.zip
The files in this zip file are used to create a SQL file called
adcrdbclone.sql
This above SQL script is called from a shell script
adcrdb.sh.
Both of the above scripts can be found under
$ORACLE_HOME/appsutil/install/$CONTEXT_NAME
If there are any problems creating the control files, then check the log files :
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/adcrdb_<SID>.txt
2/7/2014 Document Display
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4vbvzgz0b_120 5/7
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTier_xxxxxx.log
If this error is encountered:-
ORA-01194: file <filename> needs more recovery to be consistent
refer to "Section 3 - Copy the files to the Target system" above on why this problem occurs.
AutoConfig
The next phase will run AutoConfig using use the usual templates and drivers associated with AutoConfig on db or appsTier.
The following log files will contain the information on the results of running AutoConfig
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTier_xxxxxx.log
$APPL_TOP/admin/$CONTEXT_NAME/log/ApplyAppsTier_xxxxxx.log
Update the oraInventory (OracleHomeCloner.class)
Once the Target instance is configured, it will update the Global Inventory will the locations of the new ORACLE_HOMES
The global inventory is found by checking the Inventory Pointer file.
This can be found as follows :
AIX and LINUX under : /etc/oraInst.loc
Other UNIX machines : /vat/opt/oracle/oraInst.loc
WINDOWS (Registry): HKEY_LOCAL_MACHINE\Software\Oracle\INST_LOC
This Inventory pointer points to the location of the Global Inventory.
The global inventory will be updated with the locations of the new iAS and RDBMS ORACLE_HOMES
Any problems with this step will be detailed in the log files:-
<path to oraInventory>/logs/OracleHomeCloner_<MMDDHHMM>.log
<path to oraInventory>/logs/appsapps<Year>-<Mon>-<Day>-<Hour>-<Min>-<Sec>-<AM/PM>.log
If there are problems with the Global Inventory refer to Note 295185.1

Appendix A: Common Issues when cloning the Database Tier
How to prevent DB recovery issues when running adcfgclone
These errors can be prevented using the following steps
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: <file>.dbf
ORA-01503: CREATE CONTROLFILE failed
ORA-01159: file is not from same database as previous files - wrong database id
Note: The steps in this section apply to cold backups only. To perform Cloning using HOT Backup, refer the following Document 760772.1 Cloning Oracle
Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database
To perform Cloning using Cold Backup, make sure these steps are followed to avoid any recovery issues while performing cloning at Target:
Follow the "Prepare the source system database tier for cloning" steps in the cloning notes Note 230672.1(11i) or Note 406982.1(R12) . These are as
follows:
Run autoconfig
Run adpreclone on dbTier
Stop DB and its listener processes
Shutdown the Database with (Normal, Immediate ) Mode
Bring down the application services
Crosscheck with alert log whether DB has been shutdown completely
Run the following OS command to confirm/crosscheck that no DB process running , if any DB processes running , terminate them manually
ps -ef | grep pmon
Copy all the datafiles from Source to Target
On Target System, at mount stage on Database, run the following SQL :
2/7/2014 Document Display
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4vbvzgz0b_120 6/7
set pagesize 20000
set linesize 180
set pause off
set serveroutput on
set feedback on
set echo on
set numformat 999999999999999
Spool recovery_info.txt
select substr(name, 1, 50), status from v$datafile;
select substr(name,1,40), recover, fuzzy, checkpoint_change# from v$datafile_header;
select GROUP#,substr(member,1,60) from v$logfile;
select * from v$recover_file;
select distinct status from v$backup;
select hxfil FILENUMBER,fhsta STATUS,fhscn SCN,fhrba_Seq SEQUENCE from x$kcvfh;
select distinct (fuzzy) from v$datafile_header;
select HXFIL File_num,substr(HXFNM,1,40) File_name,FHTYP Type,HXERR Validity, FHSCN SCN, FHTNM
TABLESPACE_NAME,FHSTA status ,FHRBA_SEQ Sequence from X$KCVFH;
spool off
exit
Points to consider:
All Datafiles STATUS should be showing ONLINE , if any datafile is showing RECOVER, then you need to recover at source and redo the
copy again
The column checkpoint_change# of each datafiles different from the checkpoint_change# of all the other datafiles. For a cold backup,
all the checkpoint_change# of the datafiles should be the same
v$recover_file should not show any datafiles need to be recovered
Check each datafile status and make sure that none of datafiles shows "RECOVER" Make sure that the FHSTA column does not show
status "4", if so, status 4 means the datafile is online fuzzy, i.e, the datafile was backed when the database was open.
Run the clone configuration command:
cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
perl adcfgclone.pl dbTier
Troubleshooting DB recovery issues while running adcfgclone
This section shows how to troubleshoot the following error:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '<file>.dbf'
Run the following to verify the backup
In target system, mount the database and run the following SQL :
set pagesize 20000
set linesize 180
set pause off
set serveroutput on
set feedback on
set echo on
set numformat 999999999999999
Spool recovery_info.txt
select substr(name, 1, 50), status from v$datafile;
select substr(name,1,40), recover, fuzzy, checkpoint_change# from v$datafile_header;
select GROUP#,substr(member,1,60) from v$logfile;
select * from v$recover_file;
select distinct status from v$backup;
select hxfil FILENUMBER,fhsta STATUS,fhscn SCN,fhrba_Seq SEQUENCE from x$kcvfh;
select distinct (fuzzy) from v$datafile_header;
select HXFIL File_num,substr(HXFNM,1,40) File_name,FHTYP Type,HXERR Validity, FHSCN SCN, FHTNM
TABLESPACE_NAME,FHSTA status ,FHRBA_SEQ Sequence from X$KCVFH;
spool off
exit
For a cold backup, all the checkpoint_change# of the datafiles should be the same.
If there are any differences in checkpoint_change# on any of the datafiles, the datafile needs to be recovered at source, the database
shutdown and the files the copied again to the Target.
2/7/2014 Document Display
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4vbvzgz0b_120 7/7
If the checkpoint_change# of each datafile is the same, then try the following option:
SQL> startup mount;
SQL> recover database using backup controlfile until cancel;
-- type CANCEL
SQL> alter database open resetlogs;
If this is fails, then files will need to be recopied from the source.
If the select from X$KCVFH shows status as "4" for any of the datafiles, this indicates the datafile is "online fuzzy", i.e, the datafile was
backed up when the database was open.
For example:
SQL> select HXFIL File_num,substr(HXFNM,1,40) File_name,FHTYP Type,HXERR Validity, FHSCN
2 SCN, FHTNM
3 TABLESPACE_NAME,FHSTA status ,FHRBA_SEQ Sequence from X$KCVFH;
FILE_NUM FILE_NAME TYPE VALIDITY
SCN TABLESPACE_NAME STATUS SEQUENCE
---------------- ---------------------------------------- ---------------- -------------
---
---------------- ------------------------------ ---------------- ----------------
1 <DATA_TOP>/system01.dbf
3 0
2371803541 SYSTEM 4 124273
2 <DATA_TOP>/system02.dbf
3 0
2371803541 SYSTEM 4 124273
3 <DATA_TOP>/system03.dbf
3 0
2371803541 SYSTEM 4 124273
4 <DATA_TOP>/system04.dbf
3 0
2371803541 SYSTEM 4 124273
In this case the datafiles need to be recopied from the source again, making sure the database was shutdown cleanly prior to the
copy.
REFERENCES
NOTE:1339094.1 - Troubleshooting "instconf.drv" Failures in 11i Rapid Clone
NOTE:216664.1 - FAQ: Cloning Oracle Applications Release 11i
NOTE:230672.1 - Cloning Oracle Applications Release 11i with Rapid Clone
NOTE:295185.1 - How to Recreate the Global oraInventory
NOTE:364565.1 - Troubleshooting RapidClone issues with Oracle Applications 11i
NOTE:406982.1 - Cloning Oracle Applications Release 12 with Rapid Clone
NOTE:760772.1 - Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database
ORACLE APPLICATION CLONING METHODS :
******************************************

Hello all, As per the request and with experience I am again returing to Cloning of Oracle Application. I know most of them know what exactly happens in cloning but still here I am trying to touch the depths.

Before starting I want to ask question. Why you need to do cloning ? Why we need to duplicate Oracle Application.

We need cloning for various of reasons. suppose I have got production instance and want to test some application. Now here I want to test the application, need to apply some product specific patches which might affect whole application then I have to give downtime which will affect business. So if I had the same this on whic hI can play and test my application or code or say I can apply some patches and at the same time business also run then nothing like it. This can be achieved by cloning or duplicating the application.

Duplicating the application is not easy or its just not simply copy the application, it wont work in any case. Logically it sounds fine just to copy the filesystem and relink it and start the application but its not that easy.

Basically for cloning Oracle Application it can be categorised into three major categories.

-Preparing the Source System
-Copy the file System
-Preparing or say Configuring the Target System

You can achive first and third steps using a Rapid Clone utility which Oracle provides for cloning

There can be many ways and methods to clone Oracle Application which many organisations follows but the only supported method provided by Oracle is using Rapid clone.

Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install.

Basically there are two cloning methodology using Autoconfig and without using autoconfig. First one that is using autoconfig is completely replaced by Rapidclone.

Non-autocofig cloning methodology was generally used before 11.5.5 that is non autoconfig enabled system.

Here I will discuss Rapid Clone method of cloning and also throw some light on cloning 11.0.3 oracle application as some users are still using that.

So first about the Rapid clone method.

In Category 1 that is first you need to make source for clone. You need to dress up Source system so that only configuration files and not the whole file system is copied.

Pre-requiste Steps

To start with cloning you need to first check about some pre-requisites some utilities should be of required version

Here are they,

Oracle Universal Installer should be of 2.2.0.19 version
Perl should be of 5.005 version minimum
JRE 1.1.8 and 1.3.1
JDK 1.3.1
Zip utility of version 2.3 minimum
Latest Autoconfig Templates patches are applied. TXK-O is the latest till date.
Latest Rapid Clone patches should be applied. Latest is ADX.F till date.

After check ing the pre-requisites now your system is ready to clone.

Preparing the Source system:

After checking the above mentioned pre-requisites now you have to prepare the source system which need to be cloned.

In a broad way what this step will do is this will create the staged clone directory which will be having the driver files and configuration file of the source.

So what exactly is going to happen in this step. Lets get in more details

Basically you have to run the adpreclone.pl script once for Application tier and one for the datbase (even if you are on single node ! )

Lets first check for the Database tier

On Source system, run following as ORACLE user

cd RDBMS Oracle_Home/appsutil/scripts/_perl ./adpreclone.pl dbTier

After running this it goes in two stages

dbTechstack and Database

What exactly it will do is
It will create stage cloned area at $ORACLE_HOME/appsutil/clone This clone directory has got following main directories
data,jre,bin,db,html,context

It will prepare datbase techstack at dbTechStack stage. Major activities it will take care of at this stage.

-Creates template files at $ORACLE_HOME/appsutil/template
-Creates driver files at $ORACLE_HOME/appsutil/driver/instconf.drv
-Converts inventory from binary to xml

It will prepare datbase at the database stage. Major activities includes

-Create datbase control file script
$Oracle_Home/appsutil/clone/context/data/stage/addbhomsrc.xml
$Oracle_Home/appsutil/clone/context/data/stage/adcrdb.zip
adcrdbclone.sql

-Generates database creation driver file
$Oracle_Home/appsutil/clone/context/data/driver/data.drv

-Copy JDBC Libraries
$Oracle_Home/appsutil/clone /clone/jlib/classes111.zip

So all this happens on database side

Now lets concentrate on Application tier side. Again it goes almost in the same way that is in two stages.

As a APPLMGR user on application tier this script is run
cd $COMMON_TOP/admin/scripts/_perl ./adpreclone.pl appsTier

It will also create the staged clone directory at $COMMON_TOP/clone
It goes in two stages. Lets see one by one

atTechStack that is Application tier techstack.

- Creates template files for
Oracle_iAS_Home/appsutil/template
Oracle_806_Home/appsutil/template

-Creates Techstack driver files for
Oracle_iAS_Home/appsutil/driver/instconf.drv
Oracle_806_Home/appsutil/driver/instconf.drv

appltop preparation

-It will create application top driver file
$COMMON_TOP/clone/appl/driver/appl.drv

-Copy JDBC libraries
$COMMON_TOP/clone/jlib/classes111.zip

So this all happens in dressing the source system

After then we need to copy the files.

Copy following files

APPL_TOP
OA_HTML ($COMMON_TOP/html)
JAVA_TOP
COMMON_TOP/util
COMMON_TOP/clone
8.0.6 ORACLE_HOME
iAS ORACLE_HOME
DB ORACLE_HOME
dbf files

After this stage now you need to configure the Target node. Basically you will run adcfgclone.pl same for databse tier and for application tier.
Let go in bit more detail:

First we will see for the database tier

On the target node you will run
ORACLE_DB_HOME/appsutil/clone/bin/perl adcfgclone.pl dbTier

Again there are two stages :

First will look at dbTechstack
It will use the driver files and templates which were created at source and has been copied to target.

Following scripts are run
-adchkutl.sh
-adclonectx.pl
-runInstallConfigDriver รข€”- located in $Oracle_Home/appsutil/driver/instconf.drv
-Relinking $Oracle_Home/appsutil/install/adlnkoh.sh

Now for database
-Driver file
$Oracle_Home/appsutil/clone/context/data/driver/data.drv
-Create database adcrdb.zip
-Autoconfig is run
-Control file creation adcrdbclone.sql

Now on application tier
from COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier

Stage at TechStack
-Creates context file for target adclonectx.pl
-Run driver files
$Oracle_806_Home/appsutil/driver/instconf.drv
$Oracle_iAS_Home/appsutil/driver/instconf.drv

Relinking of Oracle Home
$Oracle_806_Home/bin/adlnk806.sh
$Oracle_iAS_Home/bin/adlnkiAS.sh

at the end for ApplTop stage
It runs driver and then autoconfig

So this will totally configure your application which has been copied.

At the end you have to some finishing tasks

-Update Printer settings
-Update Workflow Configuration settings
-Update Profile options

This completes you application cloning completely.

So Happy reading folks !!!!


Ref : http://onlineappsdba.com/index.php/2008/04/10/back-to-basics-of-cloning/

Hot Backup Cloning in 9i database :
***********************************

High Level Steps :
******************

1. Run preclone on both db as well apps Tier
2. Make a note of the current archive log change number using following command
SQL> select max(first_change#) chng from v$archived_log;
3. Make a note on db size and datafiles location and count(tablespace) using dba_data_files
4. Prepare the begin/end backup scripts
SQL> spool begin_backup.sql

select 'alter tablespace ' || tablespace_name || ' begin backup;' tsbb
from dba_tablespaces
where contents != 'TEMPORARY'
order by tablespace_name
/
SQL> spool off

SQL>spool end_backup.sql

select 'alter tablespace ' || tablespace_name || ' end backup;' tseb
from dba_tablespaces
where contents != 'TEMPORARY'
order by tablespace_name
/
SQL>spool off
5. Run begin_backup.sql script
6. Copy Datafiles,DB Home,Apps files from production to test server 
7. Run end_backup.sql script
8. Copy archive logs
It is only necessary to copy archive logs created during the time the source database was in backup mode. Begin by archiving the current redo:
SQL> alter system archive log current;
Then, identify which archive log files are required. When run, the following query will ask for a change number. This is the number noted in step 2.

SQL> select name from v$archived_log where first_change# >= &change_no order by name;

Create an archive directory in the clone database and copy all of the identified logs into it.
9. Create Controlfile trace on production and copy it to test.
SQL> alter database backup controlfile to trace as '/oracle/ctl.sql';
Edit ctl.sql file as follows,
a. The word 'REUSE' needs to be changed to 'SET'
b. The database name needs setting to the new database name
c. Decide whether the database will be put into archivelog mode or not
d. If the file paths are being changed, alter the file to reflect the changes
e. Make a copy of the 'ALTER TABLESPACE TEMP...' lines, and then remove them from the file. Make sure that you hang onto the command, it will be used later
10. Run adcfgclone.pl dbTechStack
  SQL> startup nomount pfile
  SQL> @ctl.sql
  SQL> recover database using backup controlfile until cancel
Apply all the archive logs which are required and apply current log file of production
SQL> alter database open resetlogs;
SQL> alter tablespace temp add tempfile '/oradata/temp01.dbf' size 50m reuse autoextend on next 1m maxsize 500m;
SQL> EXEC FND_CONC_CLONE.SETUP.CLEAN;
11. Run autoconfig on dbtier
12. Run adcfgclone.pl appsTier

RMAN CLONING USING MANUAL METHOD :
**********************************

High Level Steps :
******************
 
1. Run adpreclone on both tiers.
2. Take rman full backup with archivelogs and controlfile.
3. Copy rman backup pieces,db home,application files
4. Run adcfgclone.pl dbTechstack
5. Edit pfile only----db_name = source db name
6. startup nomount pfile
7. rman target /
8. restore controlfile from '/u01/backup/ctl/c-4423-20140116-00';
9. alter database mount; 
10. Prepare restore.rcv for restoration process
11. Run restore script
12. exit
13. sqlplus '/as sysdba'
14. Use the below command for 3 of the logfiles. If we are using same logfile location for both source and target database, no need to rename the logfiles.
    alter database rename file 'old logfile location' to 'newlogfile location';
15. alter database open resetlogs;
16. recreate controlfile file using following command and edit the db_name in ctl.sql and pfile 
    alter database backup controlfile to trace as '/u01/ctl.sql';
17. shut immediate
18. startup nomount pfile
19. Run ctl.sql
20. alter database open resetlogs;
21. alter tablespace TEMP add tempfile 'LOCATON' size 1024m autoextend on;
22. conn apps/apps
23. exec fnd_conc_clone.setup_clean;
24. commit;
25. Run autoconfig on db tier.
26. Run adcfgclone.pl on apps tier.


Friday, 13 September 2013



WEBCENTER DOCUMENT


WEBCENTER INSTALLATION IN 11.1.1.5.0

putty you have to enable x11 forward option
Then use xhost + in root user , xauth list , xauth add(If u have doubt refer webcenter installation in this document.)

RCU 11.1.1.5.0 ( Before start installation Up the running 11.1.0.7.0 database (ie) following steps)

  1. Download RCU from the following link.
Give 777 permission and orajr12:dba ownership to all the files.
Su - orajr12
    1. orapwd file='$ORACLE_HOME/dbs/orapwjr12' password=Webcenter entries=5 force=y;
    2. Add entry to parameter file -> remote_login_passwordfile=exclusive
    3. startup pfile='Edited pfile'
    4. create user Webcenter identified by Webcenter;
    5. grant sysdba to Webcenter;
    6. unzip the rcu zip file.
    7. Cd /Webcenter/rcuhome/bin
    8. ./rcu
    9. Then follow the following link full installation of RCU as well as Web Logic server
http://yonaweb.be/installing_webcenter_11g_ps3_scratch
and also refer pdf "wcp-ecminstall-453589.pdf" This pdf mainly for 11.1.1.5.0 Webcenter installation
Oracle Weblogic Server 10.3.5
  1. Download weblogic server from the following link
Download wls1035_linux32.bin
    1. ./wls1035_linux32.bin
    2. Refer this link http://yonaweb.be/installing_webcenter_11g_ps3_scratch
Oracle Webcenter 11.1.1.5.0
  1. Download webcenter from the following link
    1. Unzip the zip file.
    2. While running runinstaller from Disk1

[orajr12@server1 Disk1]$ ./runInstaller
Starting Oracle Universal Installer...

Checking if CPU speed is above 300 MHz. Actual 2992 MHz Passed
Checking Temp space: must be greater than 150 MB. Actual 3237 MB Passed
Checking swap space: must be greater than 512 MB. Actual 79910 MB Passed
Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] y


>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-06-22_06-54-16PM. Please wait ...
Please specify JRE/JDK location ( Ex. /home/jre ), <location>/bin/java should exist :/usr/java/jdk1.6.0_26
[orajr12@server1 Disk1]$ Log: /home/oraddev/oraInventory/logs/install2012-06-22_06-54-16PM.log
Xlib: connection to "localhost:15.0" refused by server
Xlib: PuTTY X11 proxy: wrong authorisation protocol attempted
X-Server access is denied on host
[Fatal Error] DISPLAY variable set incorrectly: localhost:15.0
[Resolution] Verify that your DISPLAY environment variable is set correctly,and that there is an X11 server on the system. If you are
running the Oracle Installer as a different user or on a different host,
you may need to use the xhost command to ensure that host/user
has permission to write to your display.


[orajr12@server1 Disk1]$
    1. [orajr12@server1 Disk1]$ exit
    2. [root@server1 ] # xhost +
access control disabled, clients can connect from any host
    1. [root@server1 ~]# xauth list
    2. server1.yantro.com:1 MIT-MAGIC-COOKIE-1 d5c72923acb237b966fee53033f4ff67
    3. [root@server1 ~]# su - orajr12
    4. [orajr12@server1 ~]$ xauth add server1.yantro.com/unix:12 MIT-MAGIC-COOKIE-1 43d00e3dc0cbbc333ad8f6b49efafe56
    5. [orajr12@server1 ~]$ cd /UCM/Webcenter/Disk1
[orajr12@server1 Disk1]$ ./runInstaller
    1. Give jdk location like this when it prompts
/usr/java/jdk1.6.0_26/jre
It shows error message as shown in below
Checking for hardnofiles=4096; hardnofiles=1024. Failed <<<< Checking for softnofiles=4096; softnofiles=1024. Failed <<<<
SOLUTION :
1. Add the line below to /etc/pam.d/login and /etc/pam.d/sshd (if its not there, of course):
session    required     pam_limits.so
2. Edit /etc/security/limits.conf
oracle soft nofile 4096
oracle hard nofile 4096
3. Restart your machine
    1. Give 777 permission to middleware_home folder(ie) in my case /UCM/Middleware
[root@server1 UCM ] # chmod -R 777 Middleware

ORACLE WEBLOGIC SERVER DOMAIN CREATION

Ref : Same Oracle URL and Blogspot.com

[orajr12@server1 Disk1]$ cd /UCM/Middleware/wlserver_10.3\common\bin

[orajr12@server1 bin]$ ./config.sh


ORACLE ECM INSTALLATION


  1. Unzip the ECM installation zip file
  2. Run ./runinstaller -jreLoc /usr/java/jdk1.6.0_26/jre
  3. Give the correct Middleware home and ECM oracle home.
  4. Thats all..........

CONFIGURING ECM WITH ORACLE WEBLOGIC SERVER

[orajr12@server1 Disk1]$ cd /UCM/Middleware/Oracle_ECM1/common/bin

[orajr12@server1 bin]$ ./config.sh

INSTALL AND CONFIGURE SOA suite as ECM installation & configuration

DOWNLOAD from : www.oracle.edelivery.com

WEBLOGIC SERVER STARTUP AND SHUTDOWN PROCESS

oradr12@server1 # cd /Webcenter/Middleware/user_projects/domains/Webcenter_domain/bin

oradr12@server1 # ./startWeblogic.sh
give weblogic username : weblogic
password : Welcome123

oradr12@server1 # ./stopWeblogic.sh

MANAGED SERVER STARTUP AND SHUTDOWN PROCESS

oradr12@server1 # cd /Webcenter/Middleware/user_projects/domains/Webcenter_domain/bin

oradr12@server1 # ./startManagedWeblogic.sh UCM_server1 http://server1.yantro.com:7001
give weblogic username : weblogic
password : Welcome123
eg oradr12@server1 # ./startManagedWeblogic.sh WC_Spaces http://server1.yantro.com:7001

oradr12@server1 # ./stopManagedWeblogic.sh UCM_server1


ORACLE ECM 11G DEINSTALLATION

cd /Webcenter/rcuHome/bin
./rcu
Remove the schemas related to ecm
cd /Webcenter/Middleware/Oracle_ECM1/oui/bin
./runInstaller -deinstall -jreLoc /usr/java/jdk1.6.0_26/jre


UNINSTALL WEBLOGIC SERVER and EVERYTHING as we did before.

  1. Remove all the enabled schemas using rcu.
  2. [oracle@host uninstall]$ cd $SOA_ORACLE_HOME/Middleware/utils/uninstall/
    [oracle@host uninstall]$ ./uninstall.sh 
  3. [oracle@host /]$rm -rf /u01/app/oracle/product/Middleware
  4. --Schemas:

  1. SQL> drop user "DEV_MDS" cascade;

  1. SQL> drop user "DEV_ORABAM" cascade;

  1. SQL> drop user "DEV_ORASDPM" cascade;

  1. SQL> drop user "DEV_SOAINFRA" cascade;

  1. SQL> delete from SCHEMA_VERSION_REGISTRY where OWNER like 'DEV%';

  1. SQL> commit;


  1. --Tablespaces and datafiles:

  1. SQL>DROP TABLESPACE DEV_IAS_ORASDPM INCLUDING CONTENTS AND DATAFILES;

  1. SQL>DROP TABLESPACE DEV_IAS_TEMP INCLUDING CONTENTS AND DATAFILES;

  1. SQL>DROP TABLESPACE DEV_MDS INCLUDING CONTENTS AND DATAFILES;

  1. SQL>DROP TABLESPACE DEV_ORABAM INCLUDING CONTENTS AND DATAFILES;

  1. SQL>DROP TABLESPACE DEV_SOAINFRA INCLUDING CONTENTS AND DATAFILES;


DEINSTALL EVERYTHING

1. Remove all the enabled schemas using rcu. Before remove make a note on the schema owners and tablespaces by executing rcu.

[oradr12@server1 ~]$ cd /Webcenter/rcuHome/bin/
[oradr12@server1 bin]$ ./rcu

    1. Remove ECM oracle home.

[oradr12@server1 bin]$ cd /Webcenter/Middleware/Oracle_ECM1/oui/bin/
[oradr12@server1 bin]$ ./runInstaller -deinstall -jreLoc /usr/java/jdk1.6.0_26/jre

    1. Remove Webcenter oracle home.

[oradr12@server1 bin]$ cd /Webcenter/Middleware/Oracle_WC1/oui/bin/
[oradr12@server1 bin]$ ./runInstaller -deinstall -jreLoc /usr/java/jdk1.6.0_26/jre

    1. Remove Weblogic server domain.

[oradr12@server1 bin]$ cd /Webcenter/Middleware/utils/uninstall/
[oradr12@server1 uninstall]$ ./uninstall.sh
    1. Remove Middleware home directory

[oradr12@server1 Webcenter]$ rm -rf Middleware

Now everything successfully uninstalled. The above oracle home removal process will automatically remove the relevant tablespaces and schemas. So no need to drop schemas and tablespaces seperately.


ISSUE :

While startup weblogic server it shows following error message.

<BEA-000286> Failed to invoke startup class "DMS-Startup", java.lang.NoClassDefFoundError: Could not initialize class oracle.dfw.impl.common.TempFileManager

java.lang.NoClassDefFoundError: Could not initialize class oracle.dfw.impl.common.TempFileManager

SOLUTION :

Clear /tmp files as root user.Before remove take proper backup of tmp files.


IDM INSTALLATION :

Download the following file ofm_iam_generic_11.1.1.5.0 from oracle website.

Using RCU create schema for IDM.
Install IDM using runinstaller like webcenter installation
Configure IDM using config.sh like webcenter configuration.

ACCESSING THE WEBCLIENT USING THE FOLLOWING URL :

http://localhost:7001/console
(or)
  1. http://localhost:8001/integration/worklistapp
BAM (must use IE browser): http://localhost:9001/OracleBAM

Oracle� Transportation Management
Installation Readme
Version: 6.3.1

Copyright � 2006, 2013, Oracle and/or its affiliates. All rights reserved.
==================================================================================
IMPORTANT: The latest notes and updates on installing Oracle Transportation Management 6.3.1 can be found on My Oracle Support, under Document ID 1188334.1 (My Oracle Support account required). Please check there before proceeding.

Other useful notes on My Oracle Support:
* See 1533374.1 for the 6.3.1 release announcement.
* See 1506523.1 for installation notes and updates.
* See 796594.1 for links to documentation and training resources.
* See 790603.1 for the Release Content Documents.