Wednesday, December 31, 2008

A New Begining

Probably this will be my last post in this year 2008...
The countdown begins.
The excitement rises.
A joyous New Year dawns.
Time to share the joy and excitement with loved ones and special friends...


May The Year 2009, Bring for You Happiness,Success and filled with Peace,Hope & Togetherness of your Family & Friends....
Wishing You a...*HAPPY NEW YEAR*

Thursday, December 18, 2008

Oracle Applications R12 Migration from Solaris to Linux Platform

Abstract

This Document is intended to describe the steps we followed to migrate the existing Oracle Applications Release 12 both Application & Database Tiers from Solaris Sparc Platform to Redhat Linux Platform. This process provides us a way to quickly and easily move an existing Oracle Applications Release 12 from Solaris Sparc to Redhat Linux Platform, allowing us to utilize different hardware.

 

Document History

Author : Srinivas Ramineni

Title: Assistant Manger-ERP

Date Created : 05-Dec-2008

Company : Aurobindo Pharma ltd.,Hyderabad.

Migration of Oracle Applications Release 12 from Solaris to Linux Platform

This Document provides detailed steps on how we migrated our existing Oracle Applications Release 12 both Application & Database Tiers from Solaris Sparc Platform to Redhat Linux Platform.

This Process consists of Eight discrete steps. Each Step Covered in a Separate Section in this Document.

· Section-1: Prerequisites

· Section-2: Prepare the Source System

· Section-3: Prepare a target Release 12 database instance

· Section-4: Export the source Release 12 database instance

· Section-5: Import the Release 12 database instance

· Section-6: Update the imported Release 12 database instance

· Section-7: Prepare the Target Application Tier

· Section-8: Prepare The target Instance

Section-1: Prerequisites:

1. Apply the Applications consolidated export/import utility patch

Apply patch 6924477 to the source administration server node.

2. Apply latest Applications database preparation scripts patch

Apply patch 6342289 to every application tier server node in the source system.

3. Apply Platform Migration Patches
6903505 : QRMP:NOT ABLE TO APPLY R12 PLATFORM SPECIFIC PATCH DURING PLATFORM MIGRATION

6156498 : MIGRATION: CHANGES NEEDED TO ADCLONECTX.PL SCRIPT

4. Apply Additional Patches (Conditional)
6767273 : INSTALLING R12.AD.A.DELTA.4 FAILS FOR OFF-CYCLE PRODUCTS  (AD)

5. Run AutoConfig on the Source System

cd $ADMIN_SCRIPTS_HOME

adautocfg.sh apps/apps

6. Run adpreclone on the Source System

Log on to the source system as the APPLMGR user, and run the following commands on each node that contains an APPL_TOP:
cd <INST_TOP>/admin/scripts
perl adpreclone.pl appsTier

7. Maintain Snapshot Information
Run adadmin à Maintain Application Files à Maintain snapshot information àupdate current view snapshot.

8. Identify Technology Stack Updates

To find the applied patches on the Oracle Applications technology stack run this script

Note:Ensure "APPLRGF" variable is set in environment. If not, set it to the same value as "APPLTMP".

Cd $FND_TOP/patch/115/bin

Run the utility as follows:

perl $FND_TOP/patch/115/bin/TXKScript.pl 
-script=$FND_TOP/patch/115/bin/txkInventory.pl 
-txktop=$APPLTMP  - contextfile=$CONTEXT_FILE 
-appspass=apps 
-outfile=$APPLTMP/Report_Inventory.txt
-reporttype=text

Section-2: Prepare the Source System:

 
1. Create a working directory
$ mkdir /xxx/xxxx/expimp
 

2. Generate and upload the manifest of customer-specific files

1.      Generate customer-specific manifest file

Note: Log in to your Source System Applications Node as the APPLMGR user and Source the APPL_TOP environment file

cd <AD_TOP>/bin

perl adgenpsf.pl

above script generate the file adgenpsf.txt under <APPL_TOP>/admin/<TWO_TASK>/out.

2. Upload Manifest File for generation to target Linux/Unix platforms

Go to http://updates.oracle.com/PlatformMigration

3. Copy the Source System to the Target System

Copy the Application Tier file system from the Source Applications System to the Target Node by executing the following steps in the order listed.  

·        <APPL_TOP>

·        <COMMON_TOP>/clone

·        <COMMON_TOP>/java

·        <COMMON_TOP>/_pages

·        <COMMON_TOP>/webapps

·        <COMMON_TOP>/util

Ex: scp -r /UATtlsvol01/oracle/UAT/apps/apps_st/ tlsdev:/appldev/oracle/DEV/apps/

Note: Change Owner ship

4. Generate target database instance creation script aucrdb.sql

$ sqlplus system/<system password> \

@$AU_TOP/patch/115/sql/auclondb.sql 10

It creates aucrdb.sql in the current directory.

5. Record Advanced Queue settings

Copy the auque1.sql script from the $AU_TOP/patch/115/sql directory on the source administration server node to the working directory in the source database server node

Run as Database Owner

$ sqlplus /nolog

SQL> connect / as sysdba;

SQL> @auque1.sql

It generates auque2.sql.

6. Create parameter file for tables with long columns

Copy the aulong.sql script from the $AU_TOP/patch/115/sql directory on the source administration server node to the working directory in the source database server node

Run as Database Owner

$ sqlplus /nolog

SQL> connect system/<system password>;

SQL> @aulong.sql

It generates aulongexp.dat.

7. Remove rebuild index parameter in spatial indexes

SQL> select * from dba_indexes where index_type='DOMAIN' and

upper(parameters) like '%REBUILD%';

To remove the rebuild index parameter, use SQL*Plus to connect to the source database as the owner of the index and run the following command:

SQL> alter index <index name> rebuild parameters <parameters>

where <parameters> is the original parameter set without the rebuild_index parameter.

Ex: ALTER INDEX MST.MST_MD_ADM_BNDS_N1 rebuild parameters ('sdo_indx_dims=2 sdo_rtr_pctfree=10 TABLESPACE=APPS_TS_TX_IDX');

 


Section-3: Prepare a target Release 12 database instance:


1. Create target Oracle 10g Oracle home

If you choose to use Rapid Install, you must use Rapid Install Release 12.0.0. As the owner of the Oracle RDBMS file system, start the Rapid Install wizard by typing:

$ rapidwiz -techstack

Choose the "10gR2 RDBMS" option in the techstack components window and provide the details for the new Oracle home.

Ex: /oradev/oracle/DEV

2. Create the target initialization parameter file and CBO parameter file

Copy the backup copy of InitDEV.ora file to the $ORACLE_HOME/dbs directory

Note: 1. Ensure that the undo_tablespace parameter in the initialization parameter file of the target database instance matches with the default undo tablespace set in the aucrdb.sql script.

2. Ignore the initialization parameters that pertain to the native compilation of PL/SQL code. You will be instructed to add them later, if necessary.

3. Create a working directory

$ mkdir /xxx/expimp

4. Create the target database instance

Copy the aucrdb.sql script from the source administration server node to the working directory in the target database server node.

Update the script on the target database server node with any necessary changes to the directory structures for the log file(s), data file(s), or tablespaces, reflecting the layout of the target database server node.

$ sqlplus /nolog

SQL> connect / as sysdba;

SQL> spool aucrdb.log;

SQL> startup nomount;

SQL> @aucrdb.sql

SQL> exit;

Note: When the target database instance has been created, restart the database instance.

5. Copy database preparation scripts to target Oracle home

Copy the following files from the $APPL_TOP/admin directory of the source administration server node to the working directory in the target database server node

1. addb1020.sql

2. adsy1020.sql

3. adjv1020.sql

4. admsc1020.sql

6. Set up the SYS schema

The addb1020.sqlscript sets up the SYS schema for use with the Applications.

$ sqlplus "/ as sysdba" @addb1020.sql

7. Set up the SYSTEM schema

The adsy1020.sql script sets up the SYSTEM schema for use with the Applications.

$ sqlplus system/<system password> @adsy1020.sql

8. Install Java Virtual Machine

The adjv1020.sql script installs the Java Virtual Machine (JVM) in the database

$ sqlplus system/<system password> @adjv1020.sql

Note: This script can be run only once in a given database instance, because the scripts that it calls are not rerunnable.

9. Install other required components

The admsc1020.sql script installs the following required components in the database: ORD, Spatial, XDB, OLAP, Data Mining, interMedia, and ConText.

$ sqlplus system/<system password> \

@admsc1020.sql FALSE SYSAUX TEMP

10. Disable automatic gathering of statistics

Copy $APPL_TOP/admin/adstats.sql from the administration server node to the target database server node.

$ sqlplus "/ as sysdba"

SQL> shutdown normal;

SQL> startup restrict;

SQL> @adstats.sql

SQL> exit;

 


Section-4: Export the source Release 12 database instance


1. Create the export parameter file


Copy $AU_TOP/patch/115/import/auexpdp.dat from the source administration server node to the working directory in the source database server node

Create a directory in the system schema that corresponds to the directory specified in the template.

$ sqlplus system/<system password>

SQL> create directory dmpdir as '/u01/expimp';

Note: Do not change the other parameters.

2. Shut down Applications server processes

Shut down all Applications server processes except the database and the Net8 listener for the database.

3. Grant privilege to source system schema

$ sqlplus ‘/as sysdba’

SQL> grant EXEMPT ACCESS POLICY to system;

4. Export the Applications database instance

$ expdp system/<system password> parfile=auexpdp.dat

Note: the export runs for several hours.

5. Export tables with long columns

$ exp parfile=aulongexp.dat

6. Export tables with XML type columns

Copy $AU_TOP/patch/115/import/auxmlexp.dat from the source administration server to the working directory in the source database server node

$ exp parfile=auxmlexp.dat

7. Revoke privilege from source system schema

SQL> revoke EXEMPT ACCESS POLICY from system;

 


Section-5: Import the Release 12 database instance


1. Create the import parameter files

Copy auimpdp.dat, aufullimp.dat, and auimpusr.dat from the $AU_TOP/patch/115/import directory in the source administration server node to the working directory in the target database server node.

Note: Make sure that the directory, dumpfile, and logfile parameters in auimpdp.dat and auimpusr.dat are set properly.

Create a directory in the system schema with the name set to the directory

$ sqlplus system/<system password>

SQL> create directory dmpdir as '/XXX/expimp';

2. Copy the export dump files

Copy the export dump files from the source database server node to the working directory in the target database server node.

3.Import the users into the target database

Start an import session on the target database server node using the customized import parameter file.

$ impdp system/<system password> parfile=auimpusr.dat

4. Grant Unlimited on Tablespace “APPS_TS_TX_DATA”

alter user AMS quota unlimited on APPS_TS_TX_DATA;

alter user AMS quota unlimited on APPS_TS_SEED;

alter user APPLSYS quota unlimited on APPS_TS_TX_DATA;

alter user AR quota unlimited on APPS_TS_TX_DATA;

alter user BEN quota unlimited on APPS_TS_TX_DATA;

alter user BOM quota unlimited on APPS_TS_TX_DATA;

alter user CN quota unlimited on APPS_TS_TX_DATA;

alter user CSI quota unlimited on APPS_TS_TX_DATA;

alter user FA quota unlimited on APPS_TS_TX_DATA;

alter user GMA quota unlimited on APPS_TS_TX_DATA;

alter user GMD quota unlimited on APPS_TS_TX_DATA;

alter user HR quota unlimited on APPS_TS_TX_DATA;

alter user HXC quota unlimited on APPS_TS_TX_DATA;

alter user IES quota unlimited on APPS_TS_TX_DATA;

alter user IGI quota unlimited on APPS_TS_TX_DATA;

alter user IGS quota unlimited on APPS_TS_TX_DATA;

alter user IGW quota unlimited on APPS_TS_TX_DATA;

alter user INV quota unlimited on APPS_TS_TX_DATA;

alter user JTF quota unlimited on APPS_TS_TX_DATA;

alter user JTF quota unlimited on APPS_TS_ARCHIVE;

alter user MSC quota unlimited on APPS_TS_TX_DATA;

alter user OE quota unlimited on APPS_TS_TX_DATA;

alter user OKE quota unlimited on APPS_TS_TX_DATA;

alter user OSM quota unlimited on APPS_TS_TX_DATA;

alter user PA quota unlimited on APPS_TS_TX_DATA;

alter user PO quota unlimited on APPS_TS_TX_DATA;

alter user RG quota unlimited on APPS_TS_TX_DATA;

alter user RLM quota unlimited on APPS_TS_TX_DATA;

alter user WMS quota unlimited on APPS_TS_TX_DATA;

alter user WSH quota unlimited on APPS_TS_TX_DATA;

alter user AZ quota unlimited on APPS_TS_TX_DATA;

alter user BIS quota unlimited on APPS_TS_TX_DATA;

alter user CZ quota unlimited on APPS_TS_TX_DATA;

alter user BIC quota unlimited on APPS_TS_TX_DATA;

alter user BIS quota unlimited on APPS_TS_TX_DATA;

alter user CZ quota unlimited on APPS_TS_TX_DATA;

alter user FV quota unlimited on APPS_TS_TX_DATA;

alter user WSH quota unlimited on APPS_TS_TX_DATA;

alter user ALR quota unlimited on APPS_TS_TX_DATA;

alter user APPS quota unlimited on APPS_TS_TX_DATA;

5. Import tables with long columns into the target database

Modify the aufullimp.dat file with the following:

Set userid to "sys/<sys password> as sysdba".

Set file to the dump file containing the long tables (longexp by default).

Set the log file appropriately.

Leave the ignore parameter commented out.

Import the tables using the following command:

$ imp parfile=aufullimp.dat

Note: You will get failures for the triggers as the dependent tables have not yet been imported

6. Import the Applications database instance

$ impdp system/<system password> parfile=auimpdp.dat

Typically, import runs for several hours.

7. Import triggers into the target database

Modify the aufullimp.dat file with the following:

Set userid to "sys/<sys password> as sysdba".

Set file to the dump file containing the long tables (longexp by default).

Change the log file name.

Uncomment the ignore parameter.

Add a line with the parameter "rows=n".

Start an import session on the target database server node using the customized import parameter file. Use the following command:

$ imp parfile=aufullimp.dat.

 


Section-6: Update the imported Release 12 database instance


1. Reset Advanced Queues

Copy the auque2.sql script from the working directory in the source database server node to the working directory in the target database server node

$ sqlplus /nolog

SQL> connect / as sysdba;

SQL> @auque2.sql

2. Run adgrants.sql

Copy $APPL_TOP/admin/adgrants.sql from the administration server node to the working directory in the database server node.

$ sqlplus "/ as sysdba" @adgrants.sql <APPLSYS schema name>

3. Grant create procedure privilege on CTXSYS

Copy $AD_TOP/patch/115/sql/adctxprv.sql from the administration server node to the database server node.

$ sqlplus apps/<APPS password> @adctxprv.sql <SYSTEM password> CTXSYS

 


Section-7: Prepare the Target Application Tier


1. Install JDK and InfoZIP Utilities on the Target System
If not already installed, the following utilities must be installed on the Target System

1.Install JDK 1.5 or higher into the JDK_HOME.

2. InfoZip UNZIP version 5.52

3.InfoZip ZIP version Zip 2.30

Ex: which java

Download & install jdk-1_5_0_08-linux-i586-rpm.bin

2. Copy the Source System Context File to the Target System

3. Clone the Applications Context File on the Target System
Log on to the Target System as the APPLMGR user and run the following commands:

1. Create a pairsfile (text file) with the following values:

s_systemname=DEV

s_dbhost=tlsdev

s_dbSid=DEV

s_jdktop=/usr/java/jdk1.5.0_08

s_jretop=/usr/java/jdk1.5.0_08/jre

2. Generate the Target System Context File:

cd <COMMON_TOP>/clone/bin

perl adclonectx.pl migrate java=<JDK_HOME>  pairsfile=<pairsfile> contextfile=<Source Applications Context File>

ex: perl adclonectx.pl migrate java=/usr/java/jdk1.5.0_08 pairsfile=/home/appldev/pairsfile.txt contextfile=/home/appldev/UAT_tlsuat.xml

Note: The Clone Context tool will ask for all the new mount points on the Target migration node.

4. Install the Middle Tier Technology Stack

Run the Ra Wizard with the -techstack option to install the Oracle Applications Technology Stack.

Use the Target System context file created in the previous step:

cd <StageR12>/startCD/Disk1/rapidwiz

./rapidwiz -techstack

5. Run AutoConfig setup phase on the Target System

Execute the INSTE8_SETUP phase of AutoConfig with the new context file.

This will create the environment files required for the AutoPatch session:

cd <AD_TOP>/bin

./adconfig.sh run=INSTE8_SETUP contextfile=<Target System Context File>

Ex: ./adconfig.sh run=INSTE8_SETUP contextfile=/appldev/oracle/DEV/inst/apps/DEV_tlsdev/appl/admin/DEV_tlsdev.xml

6. Download and apply the customer-specific update Patch with AutoPatch

adpatch options=hotpatch,phtofile

Note: In order to successfully execute autopatch on the new platform, you must use the adpatch executable included on this patch. For Linux: 64

7. Regenerate File System Objects

Source the APPL_TOP environment file and perform the following tasks to regenerate the platform dependent files on the Target System:

1.  If migrating an Application tier that starts Forms, run the following script:

cd <AD_TOP>/bin

./adgensgn.sh <Apps User>/<Apps Password>

2.   Run adadmin to generate messages, forms, reports and product jar files.

8. Run AutoConfig to complete the Target System configuration

cd <AD_TOP>/bin

./adconfig.sh contextfile=<Target System Context File>

Note: On this last step, the database will be updated to reflect the new Target System profile.

 


Section-8: Final preparation


1. Implement and run AutoConfig

Go through Doc: 387859.1 Section:6

Notepad : 1.Shut down all processes, including the database and the listener, and restart them to load the new environment settings

2. Take the necessary Backups

2. Gather statistics for SYS schema

$ sqlplus "/ as sysdba"

SQL> shutdown normal;

SQL> startup restrict;

SQL> @adstats.sql

SQL> shutdown normal;

SQL> startup;

SQL> exit;

Note: Make sure that you have at least 1.5 GB of free default temporary tablespace.

3. Re-create custom database links

$ sqlplus apps/<apps password>

SQL> select db_link from dba_db_links;

The EDW_APPS_TO_WH and APPS_TO_APPS database links, if they exist, should have been updated with the new port number by AutoConfig in the previous step.

$ sqlplus apps/<apps password>

create database link APPS_TO_APPS.TRIDENT.COM connect to APPS identified by APPS using 'DEV';

create database link EDW_APPS_TO_WH.TRIDENT.COM connect to APPS identified by APPS using 'DEV';

4. Create ConText and AZ objects

The consolidated export/import utility patch that you applied to the source administration server node contains a perl script, dpost_imp.pl, that you can run to generate an AutoPatch driver file.

$ perl $AU_TOP/patch/115/bin/dpost_imp.pl <driver file> 10

Once the driver file has been generated, use AutoPatch to apply it on the target administration server node.

5. Import tables with XML type columns into the target database (Not Required)

Modify the aufullimp.dat file with the following:

Set userid to "az/<az password>"

Set file to the dump file containing the tables with XML types (xmlexp by default).

Change the log file name.

Comment out the ignore and rows parameters.

Start an import session on the target database server node using the customized import parameter file. Use the following command:

$ imp parfile=aufullimp.dat

6. Populate CTXSYS.DR$SQE table

$ sqlplus apps/<apps password>

SQL> exec icx_cat_sqe_pvt.sync_sqes_for_all_zones;

7. Compile invalid objects

$ sqlplus "/ as sysdba" @$ORACLE_HOME/rdbms/admin/utlrp.sql

8. Maintain Applications database objects

Run AD Administration on the target administration server node. From the Maintain Applications Database Objects menu, perform the following tasks:

1.Compile flexfield data in AOL tables

2. Recreate grants and synonyms for APPS schema

9. Start Applications server processes

Start all the server processes on the target Applications system. You can allow users to access the system at this time.

10. Create DQM indexes

Create DQM indexes by following these steps:

Log on to Oracle Applications with the "Trading Community Manager" responsibility

Click Control > Request > Run

Select "Single Request" option

Enter "DQM Staging Program" name

Enter the following parameters:

Number of Parallel Staging Workers: 4

Staging Command: CREATE_INDEXES

Continue Previous Execution: NO

Index Creation: SERIAL

Click "Submit"

11. Run Gather Applications statistics program

12. Update Workflow configuration settings as per the Metalink Doc: 438086.1

References


1. Export/Import Process for Oracle E-Business Suite Release 12 Using 10gR2 Note:454616.1

2. Platform Migration with Oracle Applications Release 12 Note:438086.1