28 October 2011

Clone Oracle Apps R12 (Hot)

Prepare Source System (Usually Production)


Prepare the source system database for cloning:

• Log on to the source system database node as the database software owner

• cd to the $ORACLE_HOME/appsutil/scripts/ directory

• execute the perl script adpreclone.pl

$ perl adpreclone.pl dbTier

Prepare the source system application nodes for cloning (this step must be run on all application nodes):

• Log on to the source system application nodes as the application software owner
• cd to the $INST_TOP/admin/scripts directory
• execute the perl script adpreclone.pl

$ perl adpreclone.pl appsTier

2. Take a backup of Database:

You may do this usuing RMAN or conventional Hot backup(alter tablespace begin backup;)

Take the controlfile backup using the following:

SQL>alter database backup controlfile to trace as '/tmp/control.sql';

3. Take a backup of Apps Tier:


Tar the apps_st and tech_st directories of Source system.

4. Copy/Restore Source System to the Target System

    You may use SCP or sfftp to do it if it's on unix based OS.
5. Hot Backup DB Clone:

Make sure that the directories needed for oracle files are created already.

Make sure ORACLE_HOME, PATH and LD_LIBRARY_PATH and ORACLE_SID are set appropriately.

Start the database in nomount state.

exit;

Create the controlfile from previously taken trace backup from source system(Refer Step 2)
Change the necessary sections of the controlfile based on the target database requirements.

CREATE CONTROLFILE SET DATABASE "TEST" RESETLOGS FORCE LOGGING NOARCHIVELOG

MAXLOGFILES 16
MAXLOGMEMBERS 4
MAXDATAFILES 512
MAXINSTANCES 8
MAXLOGHISTORY 15000
LOGFILE
GROUP 1 (
'/u01/app/oracle/TEST/db/apps_st/data/log01a.log',
'/u01/app/oracle/TEST/db/apps_st/data/log01b.log'
) SIZE 2000M BLOCKSIZE 512,

GROUP 2 (
'/u01/app/oracle/TEST/db/apps_st/data/log02a.log',
'/u01/app/oracle/TEST/db/apps_st/data/log02b.log'
) SIZE 2000M BLOCKSIZE 512

DATAFILE
'/u01/app/oracle/TEST/db/apps_st/data/system01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/ctxd01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/owad01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_queue02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/odm.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/olap.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/apps_ts_tools01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system12.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_int02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system10.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/portal01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system09.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system08.dbf',

'/u01/app/oracle/TEST/db/apps_st/data/undo01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_int01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_summ01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_archive01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_queue01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_media01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref02.dbf'
CHARACTER SET UTF8
;
add_temp.sql (extract the TEMP creation section):
ALTER TABLESPACE TEMP1 ADD TEMPFILE '/u01/app/oracle/TEST/db/apps_st/data/temp01.dbf'
SIZE 5120M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP2 ADD TEMPFILE '/u01/app/oracle/TEST/db/apps_st/data/temp02.dbf'
SIZE 4096M REUSE AUTOEXTEND OFF;


• Log on to the target system database node as the database software owner
• cd to the $ORACLE_HOME/appsutil/clone/bin directory
• execute the perl script adcfgclone.pl

$ perl adcfgclone.pl dbTechStack

• Below is the adcfgclone.pl dialogue and example responses:

$ perl adcfgclone.pl dbTechStack
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
Oracle Applications Rapid Clone
Version 12.0.0
adcfgclone Version 120.20.12000000.11

Enter the APPS password :

Target System Hostname (virtual or normal) [prod1] : test01
Target Instance is RAC (y/n) [n] : n
Target System Database SID : TEST
Target System Base Directory : /u01/app/oracle/TEST
Target System utl_file_dir Directory List : /usr/tmp
Number of DATA_TOP's on the Target System [1] : 1

Target System DATA_TOP Directory 1 [/u01/app/oracle/PROD/db/apps_st/data] : /u01/app/oracle/TEST/db/apps_st/data

Target System RDBMS ORACLE_HOME Directory [/u01/app/oracle/TEST/db/tech_st/11.1.0] : /u01/app/oracle/TEST/db/tech_st/11.2.0

Do you want to preserve the Display [null] (y/n) ? : n
Target System Display [prod1:0.0] : test1: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] : 2


• Edit the following two parameters in the init.ora file on the target system with the correct path and format for the archivelogs

log_archive_dest_1='LOCATION=<>’ -- location of archive logs on destination server for the the specific instance
log_archive_dest_1=’LOCATION=/u03/oracle/TEST/oradata/archive’
log_archive_format='TEST%t_%s_%r.log'

• Login to the target instance as sysdba:

Run CreateControl.sql
By now the database will be mounted(If all the parameters mentioned above are correct)
 Recover database using backup controlfile until cancel or time:

Open the database with the following command

SQL>alter database open resetlogs;

• Execute the add_temp.sql script that was created in a previous step:

SQL> @add_temp.sql
• Bounce database (shutdown and start):
• Execute the adupdlib.sql script (with the “so” option) located in the $ORACLE_HOME/appsutil/install/ directory as sysdba:
SQL> @adupdlib.sql so

• cd to the $ORACLE_HOME/appsutil/clone/bin directory
• execute the perl script adcfgclone.pl
$ perl adcfgclone.pl dbconfig $ORACLE_HOME/appsutil/.xml


6. Configure the target system application server nodes (this step must be run on all application nodes):
• Log onto the target system application nodes as the application software owner
• cd to the $COMMON_TOP/clone/bin directory
• execute the perl script adpreclone.pl
 perl adcfgclone.pl appsTier
• Below is the adcfgclone.pl dialogue and example responses:
$ perl adcfgclone.pl appsTier

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
Oracle Applications Rapid Clone
Version 12.0.0
adcfgclone Version 120.20.12000000.11
Enter the APPS password :
PROMPT :
Target System Hostname (virtual or normal) [test1]
PROMPT :
Target System Domain Name
test.oracle.com
PROMPT :
Target System Database SID
TEST
PROMPT :
Target System Database Server Node [testdb01]
PROMPT :
Target System Database Domain Name [testdb01.oracle.com]
PROMPT :
Target System Base Directory
/u01/app/oracle/TEST
Tools Oracle Home default value/u01/app/oracle/TEST/apps/tech_st/10.1.2
PROMPT :
Target System Tools ORACLE_HOME Directory [/u01/app/oracle/TEST/apps/tech_st/10.1.2]
ANSWER :
/u01/app/oracle/TEST/apps/tech_st/10.1.2
Web Oracle Home:/u01/app/oracle/TEST/apps/tech_st/10.1.3
Target System Web ORACLE_HOME Directory [/u01/app/oracle/TEST/apps/tech_st/10.1.3]
Appl TOP:/u01/app/oracle/TEST/apps/apps_st/appl
PROMPT :
Target System APPL_TOP Directory [/u01/app/oracle/TEST/apps/apps_st/appl]
/u01/app/oracle/TEST/apps/apps_st/appl
COMMON TOP:/u01/app/oracle/TEST/apps/apps_st/comn
PROMPT :
Target System COMMON_TOP Directory [/u01/app/oracle/TEST/apps/apps_st/comn]
PROMPT :
Target System Instance Home Directory [/u01/app/oracle/TEST/inst]
/u01/app/oracle/TEST/inst
PROMPT :

Target System Root Service [enabled]
enabled
PROMPT :
Target System Web Entry Point Services [enabled]
enabled
PROMPT :
Target System Web Application Services [enabled]
enabled
PROMPT :
Target System Batch Processing Services [enabled]
enabled
Target System Other Services [disabled]
disabled
PROMPT :
Do you want to preserve the Display [192.168.1.150:0.0] (y/n)
n
PROMPT :

Target System Display [test1.oracle:0.0]
PROMPT :
Do you want the the target system to have the same port values as the source system (y/n) [y] ?
n
Started testing the availabilty of ports in port pool 2



Post Cloning Tasks:

Shutdown Applications
Shutdown the database and put the database in archivelog mode
Startup Database
Startup Applications
Change the Profile option: Site_name to the TEST Instance name
Configure Workflow
Configure Concurrent Managers
Change Apps and SYSADMIN passwords



24 October 2011

Fusion Middleware Installation Part4

Configure SOA Suite

During the configuration, the Oracle Fusion Middleware Configuration Wizard automatically creates Managed Servers in the domain to host the Fusion Middleware system components. Oracle recommends that you use the default configuration settings for these Managed Servers. If you modify the default configuration settings, then you will have to perform some manual configuration steps before the Fusion Middleware environment can be started.

Depending on your selections, the following Managed Servers (default names shown) are created:

•soa_server1 - Hosts Oracle SOA
•bam_server1 - Hosts Oracle BAM

If this is a new installation and you need to create a new WebLogic domain, follow the steps below

The Domain creation process:

1. Navigate to the following DIR in Unix based systems.

[oracle@fusn01 bin]$ pwd
/u01/app/Fusion/Middleware/wlserver_10.3/common/bin
2.       Run config.sh
Select Create option.



Select Products for which the domains needs to be created


Enter Domain name and location where the domain needs to be stored.


Enter the Administrator user/password details



Enter thr startup role and the JDK location depending on your installation and requirements.

Click on each schema and enter the Database name, Hostname and the port where RCU had created schemas(Refer Part1) and click next

Select Server which you like to modify


Enter the details and click next

Review the screen and the options selected and then click on create




Note down the console URL and confirmation of successful domain creation


Start Weblogic Server:

cd DOMAIN_HOME/startWebLogic.sh

cd /u01/app/Fusion/Middleware/user_projects/domain/pracdba_domain/
./startWebLogic.sh


You should see this message to see that the web server is started successfully.

CompositeStoreMXBeanImpl is registered as domain runtime mbean.




PostInstallConfigIntegration:oracle_ias_farm target auth registration is done.

ADF Library non-OC4J post-deployment (millis): 126












Enter Login Details




You can now start deploying your applications.

23 October 2011

Fusion Middleware Installation Part3

Download SOA from here

Install Oracle SOA and start the installer.




Click Next



Select the Middleware Home


Click Install








Click Finish


Configure Domain for SOA in Part4

21 October 2011

Fusion Middleware Installation Part2

Installing an Application Server


All Oracle Fusion Middleware products (except for Oracle WebTier) require an application server on your system. For Oracle Application Developer or Oracle SOA Suite and Business Process Management Suite you can choose to install Oracle WebLogic Server or IBM WebSphere as the application server. Refer to the "System Requirements and Supported Platforms for Oracle Fusion Middleware 11gR1" document to determine the certified versions of these application servers for installation on your system. You should be installing the latest available version:
http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html


All Oracle Fusion Middleware products must be installed in the Oracle Middleware home directory, which can be created by installing Oracle WebLogic Server as the application server on your system. If you choose to use IBM WebSphere as your application server, you must manually create a Middleware home directory in which you can install your Oracle Fusion Middleware products.


The following types of WebLogic Server installers are available:

• OS-specific Package installer—This type of installer is a standalone version of the installation program that includes the JDKs for the selected platform. The installer may be either an .exe file or a .bin file, depending on the selected platform.


Note:
Silent mode installation is supported only for Package installers.


• Generic Package installer—This type of installer is a .jar file. It does not include the JRockit SDK and Sun JDK. You can use this type of installer to install the product on any supported platform on which Java is already installed.

• Upgrade installer—Upgrade installers allow you to upgrade an existing WebLogic Server installation to the current patch release. For example, if you have WebLogic Server 10.3.0 installed, you can use an Upgrade installer to upgrade your installation to WebLogic Server 10.3.4. If a patch release is available for your current WebLogic Server installation, you can download an Upgrade installer from My Oracle Support


Check for the complete prerequired for installing weblogic:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e14142/prepare.htm#i1129059


During the installation process, you must specify locations for the following home directories:


• Oracle Fusion Middleware
• WebLogic Server, Coherence (if applicable), and Enterprise Pack for Eclipse (if applicable)

Choosing a Middleware Home Directory

When you install WebLogic Server, you are prompted to specify a Middleware home directory. This directory serves as a repository for common files that are used by multiple Fusion Middleware products installed on the same machine. For this reason, the Middleware home directory can be considered a central support directory for all the Fusion Middleware products installed on your system.
The files in the Middleware home directory are essential to ensuring that WebLogic Server operates correctly on your system. They facilitate checking of cross-product dependencies during installation.


Run the Installer:
You may run the installer in 3 modes:
1. Graphical mode
2. Console Mode
3. Silent Mode


I have chosen graphical mode


Starting .bin Installation Programs in Graphical Mode on UNIX Machines:
1. Log in to the target UNIX system.
2. Go to the directory that contains the installation program.
3. Launch the installation by entering the following commands:





Click Next

Specify the Middleware home directory that will serve as the central support directory for all Fusion Middleware products installed on the target system, including WebLogic Server.
Click Next and enter support information for Oracle and click next


Select installation type

Choose product install document
Screen displays information about JDK and the documents








You will see this message once the installation is complete.

Next task is to install Middleware products in the Middleware Home created just now.

I will be installing SOA 11.1.2 for fusion middleware right now.

You can find the fusion middleare home installed as shown below:

[oracle@fusn01 Fusion]$ cd Middleware/




[oracle@fusn01 Middleware]$ ls


coherence_3.6 jrockit_160_24_D1.1.2-4 ocm.rsp registry.xml


domain-registry.xml logs oepe_11gR1PS4 utils


jdk160_24 modules registry.dat wlserver_10.3


[oracle@fusn01 Middleware]$
 
Continuation in Part3

Fusion Middleware Installation Part1

Creating the Database Schemas

Installation of most Oracle Fusion Middleware products requires the availability of a database (only Oracle Web Tier does not require a database). This database must be up and running, and does not have to be on the same system where you are installing the components. The database must also be compatible with Repository Creation Utility (RCU), which is used to create the schemas necessary for your Oracle Fusion Middleware components

Navigate to cd RCUHOME and run rcu command:


Click create schema option

Enter the database details as shown below:


Click Next



Once this completes click next


Required Schemas and Dependencies


This section lists the required schemas and their dependencies for Oracle Fusion Middleware components. Before you run RCU, you should make a note of the schemas you will need to create.

•Oracle SOA Suite Schemas

•Oracle WebCenter Schemas

•Oracle Application Developer Schema

•Oracle Identity Management Schemas

•Oracle Data Integrator Schema

•Oracle Business Intelligence Schemas



Enter the passwords based on your requirements


Click on Manage Tablespace if you need to organize your tablespaces.


Click OK if the tablespaces doesn't exist already.





Review the selected schemas and then click create button.



Wait for the confirmation as shown below:



Continuation in Part2







Install Fusion Middleware 11g

I'm back......

Let's do some Fusion(the most happenning) stuff!!!

Overview:

Oracle Fusion Middleware is a collection of standards-based software products that spans a range of tools and services from J2EE and developer tools, to integration services, business intelligence, collaboration, and content management. Oracle Fusion Middleware offers complete support for development, deployment, and management


Pre-Reqs:

1. Install Operating system(RHEL 5 in my case)
2. Install Oracle software and create the database(Please refer to the certification matrix here: http://download.oracle.com/docs/cd/E17904_01/doc.1111/e14259/overview.htm#RCUUG258)
3. Set the following parameters with these minimum values: open_cursors=500, processes=500
4. Make sure the database and the listener is up and running.

If you are starting the fusion middleware with this version, you can install it using Full Installer.

Installing a Release 11.1.1.4.0 Oracle Fusion Middleware product using the full installer involves the following:

•Creating the Database Schemas

•Installing an Application Server

•Installing Oracle Fusion Middleware Release 11g (11.1.1.4.0) Products

•Configuring Your Products and Creating the WebLogic Domains

Use the Installation guide for fusion installation - Part1