Monday 2 June 2014

FDPSTP failed due to ORA-20100

FDPSTP failed due to ORA-20100: Error: FND_FILE failure. Unable to create file, oXXXXXXXX.tmp in the directory, /usr/tmp


A TEST instance was already up and running and I created another production clone on the same server/machine. Once the services of both the instances  

The concurrent programs were completing in error and when checked the log files, the following error message was there:

ORACLE error 20100 in FDPSTP

Cause: FDPSTP failed due to ORA-20100: Error: FND_FILE failure. Unable to create file, o0031866.tmp in the directory, /usr/tmp.

You will find more information in the request log.
ORA-06512: at "APPS.FND_FILE", line 417

When investigated, I found that both the instnaces were creating .tmp files in /usr/tmp directory with the same name. This error was being thrown when one instance was trying to create .tmp file and a file with the same name was already created by the other instance.

  • To resolve the issue I shutdown both the apps and db services of one instance.
  • Created a directory 'temp' in '/usr/tmp' and changed the ownership of this dir to user owner of this instance 
  • Logon to database as sysdba
  • Create pfile from spfile
  • modified UTL_FILE_DIR parameter's first entry from '/usr/tmp' to '/usr/tmp/temp'
  • Created spfile from pfile
  • Brought up the db and listener
  • Now modified the $APPLPTMP variable in TEST_oratest.xml file from '/usr/tmp' to '/usr/tmp/temp'
  • Run the autoconfig on apps tier/node
  • Brought up the apps services
  • Retested the issue and it was resolved 

Sunday 25 May 2014

Post Clone Steps In Oracle Applications

Post Clone Steps In Oracle Applications

The cloning process has traditionally been a manual process performed by DBAs. This process involves copying over the database files – preferably using RMAN DB duplicate, the tech stack, and the application tier to the non-production servers, converting them to DEV or TEST, and then performing a number of post clone steps such as disabling workflow emails from going to end users, scrambling financial information, updating the clone date and the instance name within the apps heading, editing the custom top, changing passwords, and others.  Depending upon the size and configuration the cloning process can take from 12 hours to 48 hours on average.

The number of post clone steps can get to be quite numerous and even with the best of documented procedures; one or two steps can easily be missed.

Note:-  the following is a list of steps in one particular cloning environment, It may vary based on environment.


1. Once the cloned database is renamed, add all the temp datafiles to the TEMP tablespace.

2. All key passwords need to be updated from their production values to the appropriate values for the DEV environment. (ie: sys,system, sysadmin,apps)

3. Custom database directories need to be re-created with the correct paths for the DEV server.

4. Specific Profile options need to be re-defined – like the apps heading naming the instance and the date stamp of the clone.

5. End-dating specific users so that only the desired developers have access to the instance.

6. Removing/scrambling specific private HR data.

7. Nulling out specific email addresses to prevent workflow from emailing end-users from the DEV instance.

8. Putting a hold on all regularly scheduled production concurrent requests in the DEV instance.

9. Updating all profile option values, swapping out the prod instance name for the DEV instance name. Additional updates for the server names also run.

10. Updates for all custom environment code paths and settings.


11. Updates for any and all printer setting changes.

Retrieve complete INST_TOP in Oracle Applications when lost

When complete INST_TOP is lost in Oracle Applications R12 we can retrieve it using below steps.


As context file also resides in INST_TOP first we have to regenerate Context file using adclonectx.pl under $COMMON_TOP/clone/bin.

1)First create necessary directory structure  for context file

$ mkdir -p /u01/applmgr/inst/Context_Name/appl/admin

2)Move your directory to $COMMON_TOP/clone/bin


$ cd $COMMON_TOP/clone/bin

3)Run adclonectx.pl script to regenerate contextfile

$ perl adclonectx.pl retrieve

Respond to Prompts as required

4)Check your Context file.

5)Now run adconfig.pl under $AD_TOP/bin

$ cd $AD_TOP/bin
$ perl adconfig.pl contextfile <Full path of contextfile>

6)Check whether all files are created under INST_TOP.



Note:- When we run adclonectx.pl script which resides under $AD_TOP/bin, this script may through an error "Please ensure that Classpath is set properly"

Monday 19 May 2014

Differences between EXP,IMP and EXPDP,IMPDP

Differences between EXP,IMP and EXPDP,IMPDP

1)Impdp/Expdp has self-tuning utilities. Tuning parameters that were used in original Export and Import, such as BUFFER and RECORDLENGTH, are neither required nor supported by Data Pump Export and Import.

2)Data Pump represent metadata in the dump file set as XML documents rather than as DDL commands.
3)Impdp/Expdp use parallel execution rather than a single stream of execution, for improved performance.

4)In Data Pump expdp full=y and then impdp schemas=prod is same as of expdp schemas=prod and then impdp full=y where in original export/import does not always exhibit this behavior.

5)Expdp/Impdp access files on the server rather than on the client.

6)Expdp/Impdp operate on a group of files called a dump file set rather than on a single sequential dump file.

7)Sequential media, such as tapes and pipes, are not supported in oracle data pump.But in original export/import we could directly compress the dump by using pipes.

8)The Data Pump method for moving data between different database versions is different than the method used by original Export/Import.

9)When you are importing data into an existing table using either APPEND or TRUNCATE, if any row violates an active constraint, the load is discontinued and no data is loaded. This is different from original Import, which logs any rows that are in violation and continues with the load.

10)Expdp/Impdp consume more undo tablespace than original Export and Import.

11)If a table has compression enabled, Data Pump Import attempts to compress the data being loaded. Whereas, the original Import utility loaded data in such a way that if a even table had compression enabled, the data was not compressed upon import.

12)Data Pump supports character set conversion for both direct path and external tables. Most of the restrictions that exist for character set conversions in the original Import utility do not apply to Data Pump. The one case in which character set conversions are not supported under the Data Pump is when using transportable tablespaces.


13)There is no option to merge extents when you re-create tables. In original Import, this was provided by the COMPRESS parameter. Instead, extents are reallocated according to storage parameters for the target table.Di

Friday 9 May 2014

Integrating Oracle E Business Suite with Oracle Access manager(OAM) and Oracle Identity Management(OID)

Integrating Oracle E Business Suite with Oracle Access manager(OAM) and Oracle Identity Management(OID)


Requirements:- 2 local machines

Machine 1:-ebs.learnapps.com                                                 Machine 2:-fmw.learnapps.com


Steps to Integrate EBS with OAM and OID(Only high Level Steps are Given)

1)Install Oracle E Business Suite R12.1.3 in one machine(Here in our case  ebs.learnapps.com)

Note:-Before Installing perform all prerequisite tasks specific to linux bit version. For example setting kernel parameters, installing required rpms...

2)Install Oracle Database Software in another machine (Here in our case fmw.learnapps.com) and Create Database using DBCA.
Here I used database name as OIDDB.

Note:-Before Installing perform all prerequisite tasks specific to linux bit version. For example setting kernel parameters, installing required rpms...

3)Create Listener for OIDDB database and name listener as OIDDB.

4)Download latest RCU(Repository Creation Utility) and copy it to server 2(fmw.learnapps.com) 
Here I have downloaded Oracle Fusion Middleware 11g RCU which comes via patch 16471709.

5)Unzip RCU patch and Invoke RCU and load required schemas to OIDDB database (fmw.learnapps.com)
While selecting schemas make sure you have only selected ODS schema. Dont select any other schema.

6)Create one user in server 2 and Install Weblogic Server in server2(fmw.learnapps.com)

7)Install OID software in server 2(fmw.learnapps.com) 

8)Configure OID software to run OID on managed server.

9)Integrate OID software with EBS using following syntax.
$FND_TOP/bin/txkrun.pl -script=SetSSOReg -registerinstance=yes
Execute this  command in server1(ebs.learnapps.com)

10)Create one more user in server 2 and Install Weblogic Server in server2(fmw.learnapps.com)

11)Install OAM software in server 2(fmw.learnapps.com) 

12)Configure OAM software to run OAM on managed server.


Not yet completed......


Wednesday 23 April 2014

RMAN backup skip tablespace using EXCLUDE feature

RMAN backup skip tablespace using EXCLUDE feature

To Skip the tablespace during backup database
export ORACLE_SID=PROD
sqlplus / as sysdba

SQL> select * from v$tablespace;
TS# NAME INC BIG FLA ENC
———- —————————— — — — —
0 SYSTEM YES NO YES
1 SYSAUX YES NO YES
2 UNDOTBS1 YES NO YES
3 TEMP NO NO YES
4 USERS YES NO YES
5 PROD_DATA YES NO YES
6 PROD_INDX YES NO YES
10 rows selected.
sql exit

rman target /

rman>show exclude;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PROD are:
RMAN configuration has no stored or default parameters
RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_DATA;

Tablespace PROD_DATA will be excluded from future whole database backups
new RMAN configuration parameters are successfully stored

RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_INDX;
Tablespace PROD_INDX will be excluded from future whole database backups
new RMAN configuration parameters are successfully stored

RMAN> show exclude;
RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_DATA’;
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_INDX’;

RMAN> BACKUP DATABASE;
Starting backup at 08-JUNE-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=129 device type=DISK
file 5 is excluded from whole database backup
file 6 is excluded from whole database backup
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/oradata/SYSTEM01.DBF
…….
We can override the exclude feature explicitly during database backup.
RMAN> show exclude;
RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_DATA’;
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_INDX’;
RMAN> BACKUP DATABASE NOEXCLUDE;

To Clear the EXCLUDE feature:
RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_DATA CLEAR;
Tablespace PROD_DATA will be included in future whole database backups
old RMAN configuration parameters are successfully deleted

RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_INDX CLEAR;
Tablespace PROD_INDX will be included in future whole database backups
old RMAN configuration parameters are successfully deleted

RMAN> show EXCLUDE;
RMAN configuration parameters for database with db_unique_name PROD are:
RMAN configuration has no stored or default parameters
Note:- This will only work while taking backups with RMAN. While cloning or while duplicating we can use :skip tablespace tba_name" to skip particular database.

thanks for blogging  learnappsdbaskills.blogspot.com


Monday 17 March 2014

Oracle Applications Cloning

Oracle Applications Cloning

àWhat is Cloning

Cloning is creating an identical copy of an existing Oracle E-Business Suite system. The system to be cloned is referred to as the source system, and the newly created system is referred to as the target system.

àWhy do we need to clone

We should not do any changes directly on production databases (Ex:- Patching). First we have to test those changes on non-production databases (Stress, Dev, Test, UAT, Prod), if the changes we made were successful on non-prod databases then we can perform the same activities on production database. For this we should have some other database which should be identical in data as of production database. Therefore, we clone from production to non-production databases.

àFrequency of cloning

Frequency of cloning depends up on customer requirement. In general, for every one week or for once in 10 days we will do clone from production to non-production databases.

àAdvantages of cloning

ü  Creating a copy of a production system for patch testing
ü  Creating a staging area to reduce the downtime required for patching
ü  Refreshing a test system from a production system
ü  Moving an existing system to a different machine or platform
ü  cloning is used to add a node to an existing installation

àCloning tools and related information

ü  Rapid Clone is a tool using which  we will clone Oracle Applications
ü  Rapid Clone was introduced from oracle applications version 11.5.8 onwards
ü  Rapid Clone completely  supports Cold Backup
ü  Rapid clone does not support hot backup and RMAN backup cloning completely, It supports only partially.s
ü  If we use  Rapid Clone to add a node, a new row is inserted into FND_NODES, whereas when creating a new installation, FND_NODES is purged and a completely new set of rows inserted
ü   If your environment is Autoconfig enabled then you can confirm that rapid clone is enabled

àCloning options

Rapid clone supports different options for cloning :-

ü  Single node to Single node
ü  Multi-node to Multi-node
ü  Single node to Multi-node
ü  Multi-node to Single node

   
àCloning across platforms

ü  Most of the times cloning takes place between same operating system versions with same binary compatible. (Ex 32 bit to 32 bit).
ü  Rapid clone also supports cloning between different  bit versions of same operating system(Ex: 32 bit to 64 bit)
ü  Rapid Clone also supports if  the source system is running an earlier version of the same operating system that is being used on the target system
ü  Rapid Clone does not support  cloning  from a highest  version of an operating system to an lowest one

àHigh level steps for cloning

ü  Perform Pre  Health Checks
ü  Prepare Source System
Ø  Prepare Database Tier by running adpreclone.pl
Ø  Prepare Application Tier by running adpreclone.pl
ü  Copy Source System to Target System
Ø  Copy APPL_TOP,COMMON_TOP,INST_TOP,10.1.2 and 10.1.3 ORACLE_HOMES
Ø  Copy RDBMS_ORACLE_HOME and CRD files to target system
Note:-In case of cold backup we need to shut down and copy, In case of Hot backup                                       keep database in begin backup mode and copy.
ü  Prepare Target  System
Ø  Configure Database Tier by running adcfgclone.pl
Ø  Configure Application Tier by running adcfgclone.pl
ü  Perform Post Health Checks in Target System

àWhat is adpreclone.pl

When we run adpreclone.pl in database tier, It will collect all information about database tier and perform below actions.

ü  Creates staged cloned area at $ORACLE_HOME/appsutil/clone
ü  Creates template files at $ORACLE_HOME/appsutil/template
ü  Creates driver files at  $ORACLE_HOME/appsutil/drivers
ü  Converts inventory from binary to xml
ü  Create database control file script
ü  Generates database creation driver file
ü  Copy JDBC Libraries

When we run adpreclone.pl in application tier, It will collect  all information about application tier and perform below actions

ü  Create stage cloned area at $COMMON_TOP/clone
ü  It will create template files and driver files for 10.1.2  ORACLE_HOME
ü  It will create template files and driver files for 10.1.3   ORACLE_HOME
ü  Copy JDBC libraries
ü  In addition, there are a number of associated actions relating to the database.

Note:- We can run the preclone script when applications are up and running and also  in down time, It will not modify any files under db and applications . It only collects the information from db and application and we can run preclone script in any priority on db and apps.

àWhat is adcfgclone.pl

ü  This script will perform the clone configuration in the target machine.
ü  During this configuration phase adcfgclone will reconfigure the copied instance after gathering the required information.
ü  First run this script on database tier only, then after successful completion, run this script on application tier.
ü  When we run adcfgclone.pl script it will ask for some questions , based on the answers given to this script it will configure target system by  performing  below actions in db tier and application tier.

On Database Tier :-

ü  Creates the Database context file
ü  Registers the ORACLE_HOME in the Global Inventory
ü  Relinks  the ORACLE_HOME
ü  Configures the ORACLE_HOME
ü  Recreates the database control files
ü  Starts the database
ü  Configures the database
ü  Starts the database listener

On Applications Tier :-

ü  Creates the Applications context file
ü  Registers the OracleAS 10.1.2 and OracleAS 10.1.3 ORACLE_HOMEs in the Global Inventory
ü  Relinks the OracleAS ORACLE_HOMEs
ü  Configures the OracleAS ORACLE_HOMEs
ü  Configures the APPL_TOP
ü  Creates the INST_TOP by running Autoconfig
ü  Starts application tier server processes

àVarious Methods for cloning

1) Cold cloning
 2) Hot Cloning
 3) Rman cloning

1) COLD CLONING

SOURCE MACHINE:-                                                            TARGET  MACHINE:-

Hostname:-fed01.redshoretech.com                              Hostname:-fed03.redshoretech.com
DB_NAME: PSHORE                                                             DB_NAME: PSHORE
ORACLE_SID: PSHORE                                                         ORACLE_SID: PSHORE
PORT POOL:-20                                                                    PORT POOL:-40


Perform below steps on source machine.

Step 1:- Verify OS requirements on target system

ü  Before cloning to a new server, ensure the target system meets all the requirements for Oracle Applications.
ü  Verify source and target system software components and versions
In addition to the Oracle Applications software requirements, the following software component versions must exist on the source or target nodes as applicable. The 'Location' column indicates the node where the software component must reside.

Note:- If any component version is not satisfying the minimum required versions then upgrade the component and then continue with other steps.

Software Component
Minimum Version
Required Location
                            Comments
Zip
2.3 (or higher)
All source system nodes
Download from Info Zip. Zip must be in your $PATH. If using files bigger than 2Gb, you should use Info Zip 3.0 or higher.
Unzip
5.52 (or higher)
All source system nodes
Download from Info Zip. Unzip must be in your $PATH. If using files bigger than 2Gb, you should use Info Zip UNZIP 5.52 or higher.
Operating System Utilities
N/A
All target system nodes
The required operating system utilities for your platform must be in your $PATH when running adcfgclone.pl. For example, make, ld, and ar on UNIX. 
Perl
5.x
All target system nodes
Uses the Perl shipped with OracleAS 10.1.3 and Database 10g, or download it from Perl.com. Perl must be in your $PATH, and $PERL5LIB must be set correctly before cloning.

Apply the latest Rapid Clone patches

We need to apply the following patches on the source instance (For Release 12.1) before performing cloning.

2. 9171651
3. 9833058
4. 12404574
5. 12598630

ü  Above patches include AD patch, Autoconfig Patches and Rapid Clone Patches
ü  When we apply AD patch it will bring latest maintenance tools and utilities to oracle applications which will enhance the performance of rapid clone.
ü  After applying all the above patches, update current view snapshot for the complete APPL_TOP.

Perform the below steps in Target Machine:-

Step 1:-Check for the required rpm’s, kernel parameters and open file descriptors required for R12.1 (Follow R12.1 Installation document). As cloning is the identical copy of existing oracle applications , the target machine also requires all configurations and requirements  which we performed while installing applications in source machine.

Create required group, users and the directories to clone.

# groupadd clone
# useradd -g clone  -d  /u01/applmgr  applmgr
# useradd -g clone   -d  /u02/oracle  oracle
# chmod –R  777 /u01/applmgr
# chmod   -R  777 /u02/oracle
# su – oracle
$ mkdir –p /u02/oracle/db
# su – applmgr
$ mkdir –p /u01/applmgr/apps/apps_st
$ mkdir –p /u01/applmgr/apps/tech_st

Step 2:- Prepare the Source system for cloning

2. (a) Run preclone on DB Tier

Login to database user from putty.
$ cd $ORACLE_HOME/appsutil/scripts
$ perl adpreclone.pl dbTier

ü  This will create staging area in $ORACLE_HOME/appsutil/clone

2. (b) Run preclone on Apps Tier

Login to application user from putty.
$ cd $INST_TOP/admin/scripts
$ perl adpreclone.pl appsTier

ü  This will create staging area in $COMMON_TOP/clone
ü  We can perform these pre-clone steps parallel or we can first run pre-clone on database tier and then on application tier and vice-versa.
ü  The above two scripts does not modify anything in database tier and application tier, they will only collect information about database tier and application tier. So, while running these scripts no need to shut down database and application tier.

Step 3:- Copy source instance file system to destination file system.

Note: Ensure that database and applications were down.

3. (a) Copy source system application file system to destination system

$ scp –r inst applmgr@192.168.3.16:/u01/applmgr
$ cd   /u01/applmgr/apps/apps_st
$ scp –r appl applmgr@192.168.3.16: /u01/applmgr/apps/apps_st
$ scp –r comn applmgr@192.168.3.16: /u01/applmgr/apps/apps_st
$ cd   /u01/applmgr/apps/tech_st
$ scp  –r  10.1.2 applmgr@192.168.3.16: /u01/applmgr/apps/tech_st
$ scp   –r  10.1.3 applmgr@192.168.3.16: /u01/applmgr/apps/tech_st

3. (b) Copy source system database file system to destination system

$ cd   /u02/oracle/db
$ scp –r apps_st oracle@192.168.3.16:/u02/oracle/db
$ scp –r tech_st oracle@192.168.3.16:/u02/oracle/db

Once we finished copying source file system to target machine, then we can start database and application services.

Step 4:-Configuring destination server

On destination server first we need to configure database and then configure applications.

4. (a) Configure database tier

$ cd db/tech_st/11.1.0/appsutil/clone/bin
$ perl adcfgclone.pl dbTier

This script will ask the following questions.

Target System Hostname (virtual or normal) [fed03] : fed03
Target Instance is RAC (y/n) [n] : n
Target System Database SID : RSHORE
Target System Base Directory : /u02/oracle
Target System utl_file_dir Directory List : /tmp
Number of DATA_TOP's on the Target System [1] : 1
Target System DATA_TOP Directory 1 [/u02/oracle/db/apps_st/data] : /u02/oracle/db/apps_st/data
Target System RDBMS ORACLE_HOME Directory [/u02/oracle/db/tech_st/11.1.0] : /u02/oracle/db/tech_st/11.1.0
Do you want to preserve the Display [fed03.redshoretech.com :0.0] (y/n) : n
Target System Display [fed01:0.0] fed03.redshoretech.com:0.0
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99]: 18

Based on the answers, it will

ü  Build new <Context name>.xml file
ü  Clone Oracle home
ü  Brings database to no mount state
ü  Recreate control file
ü  Bring database to mount state
ü  Perform recovery
ü  Bring up the database to open state
ü  Runs Autoconfig on db tier
ü  Registers Oracle home in central inventory
ü  Starts the database and listener.

4. (b) Configure Application tier

$ cd $COMMON_TOP/clone/bin
$ perl adcfgclone.pl appsTier

This script will ask the following questions.

Target System Hostname (virtual or normal) [fed03] : fed03
Target System Database SID: RSHORE
Target System Database Server Node [fed03]: fed03
Target System Database Domain Name [redshoretech.com]: redshoretech.com
Target System Base Directory: /u01/applmgr
Target System Tools ORACLE_HOME Directory [/u01/applmgr/apps/tech_st/10.1.2]: /u01/applmgr/apps/tech_st/10.1.2
Target System Web ORACLE_HOME Directory [/u01/applmgr/apps/tech_st/10.1.3]: /u01/applmgr/apps/tech_st/10.1.3
Target System APPL_TOP Directory [/u01/applmgr/apps/apps_st/appl]: /u01/applmgr/apps/apps_st/appl
Target System COMMON_TOP Directory [/u01/applmgr/apps/apps_st/comn]: /u01/applmgr/apps/apps_st/comn
Target System Instance Home Directory [/u01/applmgr/inst]: /u01/applmgr/inst
Target System Root Service [enabled]: enabled
Target System Web Entry Point Services [enabled]: enabled
Target System Web Application Services [enabled]: enabled
Target System Batch Processing Services [enabled]: enabled
Target System Other Services [disabled]: enabled
Do you want to preserve the Display [vmrshoret3fusiondb:0.0] (y/n): n
Target System Display [fed03:0.0]: fed03:0.0
Do you want the target system to have the same port values as the source system (y/n) [y]? : n
Target System Port Pool [0-99]: 18

Based on the answers the above script will

ü  Build new .xml file
ü  Clone 10.1.2 and 10.1.3 Oracle Homes
ü  Runs Autoconfig
ü  Starts all the application services.


2) HOT CLONING

For Step 1 and Step 2 perform same steps as mentioned in cold cloning.

Step 3:- Copy source instance file system to destination file system.

3. (a) Copy source system application file system to destination system

$ scp –r inst applmgr@192.168.3.16:/u01/applmgr
$ cd   /u01/applmgr/apps/apps_st
$ scp –r appl applmgr@192.168.3.16: /u01/applmgr/apps/apps_st
$ scp –r comn applmgr@192.168.3.16: /u01/applmgr/apps/apps_st
$ cd   /u01/applmgr/apps/tech_st
$ scp  –r  10.1.2 applmgr@192.168.3.16: /u01/applmgr/apps/tech_st
$ scp   –r  10.1.3 applmgr@192.168.3.16: /u01/applmgr/apps/tech_st

3. (b) Copy source system database file system to destination system
   
     (1) Take the archive log sequence number.
     SQL> archive log list

     (2) Keep the database in begin backup mode.
     SQL> alter database begin backup;

     (3) Copy datafiles to target server.
     $ cd /u02/oracle/db/apps_st/data
     $ scp *.dbf oracle@192.168.3.16: /u02/oracle/db/apps_st/data

     (4) Keep the database in end backup mode.
     SQL> alter database end backup;

     (5) Perform log switch.
     SQL> alter system switch logfile;

     (6) Take ASCII format controlfile backup.
     SQL> alter  database backup controlfile to /tmp/control.ctl;
     Modify the ASCII format controlfile as per the target system specifications.    

     (7) Copy ASCII format controlfile to the target server.
     $ scp /tmp/control.ctl oracle@192.168.3.16:/u02/oracle/db/apps_st/data/cntrl01.dbf
     $ scp /tmp/control.ctl oracle@192.168.3.16:/u02/oracle/db/apps_st/data/cntrl02.dbf
  
     (8) Copy generated archivelogs to target server.

     (9) Copy Oracle Home to target machine
     $ /u02/oracle/db/tech_st    
     $ scp –r  11.1.0 oracle@192.168.3.16: /u02/oracle/db/tech_st

Step 4 :- Configuring destination server

On destination server first we need to configure database and then configure applications.

4. (a) Configure database tier

(1)$ cd db/tech_st/11.1.0/appsutil/clone/bin
     $ perl adcfgclone.pl dbTechStack

This script will ask the following questions.

Target System Hostname (virtual or normal) [fed03] : fed03
Target Instance is RAC (y/n) [n] : n
Target System Database SID : RSHORE
Target System Base Directory : /u02/oracle
Target System utl_file_dir Directory List : /tmp
Number of DATA_TOP's on the Target System [1] : 1
Target System DATA_TOP Directory 1 [/u02/oracle/db/apps_st/data] : /u02/oracle/db/apps_st/data
Target System RDBMS ORACLE_HOME Directory [/u02/oracle/db/tech_st/11.1.0] : /u02/oracle/db/tech_st/11.1.0
Do you want to preserve the Display [fed03:0.0] (y/n) : n
Target System Display [fed03:0.0] :  fed03:0.0
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99]: 18

(1)This will build new <context_name>.xml and clone Oracle home.
(2) Startup database in no mount state.
(3) Recreate Controlfile by using modified trace file.
(4) Perform Recovery.
(5) Open the database with reset logs option.
(6)  $ cd db/tech_st/11.1.0/appsutil/clone/bin
       $ perl adcfgclone.pl dbconfig  <Path of XML file>

Note: Before running this script, make sure that database and listener are up and running.

The above script will run Autoconfig and registers Oracle home with OraInventory.

4. (b) Configure Application tier

$ cd $COMMON_TOP/clone/bin
$ perl adcfgclone.pl appsTier

This script will ask the following questions.

Target System Hostname (virtual or normal) [fed03] : fed03
Target System Database SID: RSHORE
Target System Database Server Node [fed03]: fed03
Target System Database Domain Name [redshoretech.com]: redshoretech.com
Target System Base Directory: /u01/applmgr
Target System Tools ORACLE_HOME Directory [/u01/applmgr/apps/tech_st/10.1.2]: /u01/applmgr/apps/tech_st/10.1.2
Target System Web ORACLE_HOME Directory [/u01/applmgr/apps/tech_st/10.1.3]: /u01/applmgr/apps/tech_st/10.1.3
Target System APPL_TOP Directory [/u01/applmgr/apps/apps_st/appl]: /u01/applmgr/apps/apps_st/appl
Target System COMMON_TOP Directory [/u01/applmgr/apps/apps_st/comn]: /u01/applmgr/apps/apps_st/comn
Target System Instance Home Directory [/u01/applmgr/inst]: /u01/applmgr/inst
Target System Root Service [enabled]: enabled
Target System Web Entry Point Services [enabled]: enabled
Target System Web Application Services [enabled]: enabled
Target System Batch Processing Services [enabled]: enabled
Target System Other Services [disabled]: enabled
Do you want to preserve the Display [vmrshoret3fusiondb:0.0] (y/n): n
Target System Display [fed03:0.0]: fed03:0.0
Do you want the target system to have the same port values as the source system (y/n) [y]? : n
Target System Port Pool [0-99]: 18

The above script will

1. Build new .xml file
2. Clone 10.1.2 and 10.1.3 Oracle Homes
3. Runs Autoconfig
4. Starts all the application services.

3) RMAN Cloning using Active Duplicate Method

For Step 1 and Step 2 perform same steps as mentioned in cold cloning.
                     
Step 3:- Copy source instance file system to destination file system.

3. (a) Copy source system application file system to destination system

$ scp –r inst applmgr@192.168.3.16:/u01/applmgr
$ cd /u01/applmgr/apps/apps_st
$ scp –r appl applmgr@192.168.3.16: /u01/applmgr/apps/apps_st
$ scp –r comn applmgr@192.168.3.16: /u01/applmgr/apps/apps_st
$ cd /u01/applmgr/apps/tech_st
$ scp  –r  10.1.2 applmgr@192.168.3.16: /u01/applmgr/apps/tech_st
$ scp   –r  10.1.3 applmgr@192.168.3.16: /u01/applmgr/apps/tech_st

3. (b) Copy source system database file system to destination system   

Copy only tech_st  from source machine to target machine

scp -r  tech_st oracle@192.168.3.16:/u02/oracle/db

Step 4:- 4.(a) Configure database tier

(1) cd db/tech_st/11.1.0/appsutil/clone/bin

$ perl adcfgclone.pl dbTechStack

This will only clone oracle home not the entire database.

This script will ask the following questions

Target System Hostname (virtual or normal) [fed03] : fed03
Target Instance is RAC (y/n) [n] : n
Target System Database SID : RSHORE
Target System Base Directory : /u02/oracle
Target System utl_file_dir Directory List : /tmp
Number of DATA_TOP's on the Target System [1] : 1
Target System DATA_TOP Directory 1 [/u02/oracle/db/apps_st/data] : /u02/oracle/db/apps_st/data
Target System RDBMS ORACLE_HOME Directory [/u02/oracle/db/tech_st/11.1.0] : /u02/oracle/db/tech_st/11.1.0
Do you want to preserve the Display [vmrshoret3fusiondb:0.0] (y/n) : n
Target System Display [fed03:0.0] :  fed03:0.0
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99]: 18


(2) Configure Networking between source and target instances.

Configure Listener on source machine.
Configure tns on source machine to connect to target machine.
Configure listener on target machine.
Configure tns on target machine to connect to source machine and one more tns to connect to itself.

(3) Perform  RMAN Active duplication.

Start the target database in nomount state.

[oracle@fed03 ~]$ rman  target sys/sys@to_source auxiliary sys/sys@to_target

Recovery Manager: Release 11.1.0.7.0 - Production on Mon Mar 11 18:59:03 2013
Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: REDSHORE (DBID=1475563812)
connected to auxiliary database: RSHORE (not mounted)

RMAN> duplicate target database to ‘RSHORE’ from active database;

Finished Duplicate Db at 12-MAR-13

RMAN> exit
Recovery Manager complete.

(4) Run adcfgclone.pl with argument dbconfig

$ cd db/tech_st/11.1.0/appsutil/clone/bin
$ perl adcfclone.pl dbconfig

The above script runs Autoconfig and registers Oracle Home in OraInventory.

4.(b)  Configure Application tier

$ cd $COMMON_TOP/clone/bin
$ perl adcfgclone.pl appsTier

This script will ask the following questions.

Target System Hostname (virtual or normal) [fed03] : fed03
Target System Database SID: RSHORE
Target System Database Server Node [fed03]: fed03
Target System Database Domain Name [redshoretech.com]: redshoretech.com
Target System Base Directory: /u01/applmgr
Target System Tools ORACLE_HOME Directory [/u01/applmgr/apps/tech_st/10.1.2]: /u01/applmgr/apps/tech_st/10.1.2
Target System Web ORACLE_HOME Directory [/u01/applmgr/apps/tech_st/10.1.3]: /u01/applmgr/apps/tech_st/10.1.3
Target System APPL_TOP Directory [/u01/applmgr/apps/apps_st/appl]: /u01/applmgr/apps/apps_st/appl
Target System COMMON_TOP Directory [/u01/applmgr/apps/apps_st/comn]: /u01/applmgr/apps/apps_st/comn
Target System Instance Home Directory [/u01/applmgr/inst]: /u01/applmgr/inst
Target System Root Service [enabled]: enabled
Target System Web Entry Point Services [enabled]: enabled
Target System Web Application Services [enabled]: enabled
Target System Batch Processing Services [enabled]: enabled
Target System Other Services [disabled]: enabled
Do you want to preserve the Display [vmrshoret3fusiondb:0.0] (y/n): n
Target System Display [fed03:0.0]: fed03:0.0
Do you want the target system to have the same port values as the source system (y/n) [y]? : n
Target System Port Pool [0-99]: 18

The above script will

1. Build new .xml file
2. Clone 10.1.2 and 10.1.3 Oracle Homes
3. Runs Autoconfig
4. Starts all the application services.