Saturday, January 26, 2013

CLONING EBS & ORACLE DATABASE

EBS CLONING:
A cloning is a process of creating identical copy of EBS of source system on a target system. If we simply copy the EBS it will create problem because there are numerous configuration files in the file system that must be modified, depending on the physical configuration of the target environment.
BENEFIT OF CLONING:
  1.   Creating a copy of a production system for patch testing
  2.   Creating a staging area to reduce the downtime required for patching
  3.   Refreshing a test system from a production system
  4.   Moving an existing system to a different machine or platform
CLONING TOOLS:
1.       Rapid clone tool
2.       Oracle Application management pack for EBS
CLONING OPTION:

  1.        Single node to Single node
  2.        Recloning (of database only)
  3.        Clone existing Clone
  4.         Multi-node to Multi-node
  5.         Single node to Multi-node
  6.         Multi-node to Single node
RAPID CLONE:
Ø  Rapid Clone does not modify the source system. Rapid Clone requires all the expected binary files to be in place on the source system, and may fail to operate correctly if any are missing.
Ø  The adpreclone.pl script prepares the source system to be cloned by collecting information about the database, and creating generic templates. The template files are located in /appsutil/template on the database tier.
Ø  After running adpreclone.pl, you copy the relevant files and directories from the source system files to the target system, and then run the adcfgclone.pl on target system.
Ø  Edit the context file on the target system after adcfgclone.pl completes, then running AutoConfig to update the system with the new value.
EDB CLONING STEP BY STEP:
1.       First we r going to login to your Linux server by host name and password using the putty and VNC viewer (in my scenario because our EBS was install on Amazon Server).
2.       Start the DB tier by using the following command. We need to login as Oracle user for starting or stopping the DB tier.
§  su oracle
§  cd  /data01/oracle/VIS/db/tech_st/11.1.0/script//  OR cd $ORACLE_HOME
§  adstrtal.sh
3.       Start the APP tier by using the following command. We need to login as Applmgr user for starting or stopping the APP tier.
§  Su Applmgr
§  Cd  /data01/oracle/VIS/APPS//admin/scripts/  OR cd $ADMIN_SCRIPTS_HOME
§  Adstrtal.sh

4.       Now run adpreclone.pl to perform the pre cloning steps in DB tier it prepares the source system to be cloned by collecting information about the database, and creating generic templates.
§  su oracle
§  cd  /data01/oracle/VIS/db/tech_st/11.1.0/script//  OR cd $ORACLE_HOME
§  Perl adpreclone.pl

5.       Now run adpreclone.pl to perform the pre cloning steps in DB tier it prepares the source system to be cloned by collecting information about the database, and creating generic templates.
§      Su Applmgr
§  Cd  /data01/oracle/VIS/APPS//admin/scripts/  OR cd $ADMIN_SCRIPTS_HOME
§  Perl adpreclone.pl
6.       Now copy the db tier and app tire to the target system (50.18.192.24) using special copy command here data02 is directory in target machine.
§  scp –i /root/appsclass.pem –r   /data01/oracle/VIS/apps/    root@50.18.192.24: /datao2/clone/apps/
7.       After running adpreclone.pl, you copy the relevant files and directories from the source system files to the target system, and then run the adcfgclone.pl on target system.
8.       Set the environment variable.
ORACLE DATABASE CLONING:
 A cloning is a process of creating identical copy of database of source system on a target system. If we simply copy the database it will create problem because there are numerous configuration files that must be modified, depending on the physical configuration of the target environment.
BENEFIT 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 TOOLS:
·         Using OEM
·         Manually by using command prompt.
MANUALLY CLONING OF THE DATABASE:
We can manually copy database to another location with the same features
Steps:
1.       Start the database
If we created database using DBCA then go to app->administrator->oradata-> (here db will there that you want to clone)->make new folder with the clone name of db. OR                                                  
If we created database to our preferred location then create new folder to that drive with clone database name.
2.       Go to flash recovery area which will present in app->administrator. Make another folder with clone database name.
3.       Create new instance
Ø  oradim –new –sid clone syspwd ****
4.       Login to source database using sqlplus as sys/sys as sysdba.
5.       Now create pfile for target database from source database spfile. using command
Ø  Create pfile =’d:/data/pfileclone.ora’ from spfile
6.       Now create control file for target database using this command
Ø  Alter database backup controlfile to trace as ‘d: /data/controlfile.ora’
7.       Now shutdown your source database only in normal or immediate mode
Ø  Shutdown immediate OR
Ø  Shutdown normal
8.       Now copy source database‘s all files except the control file to the target database clone. Using copy command or simply os copy command.
9.       Open pfileclone.ora with notepad and  replace all source database name by  clone 
Database name and also take a look of path.
10.   Now login to clone sit to sqlplus by providing password that u given to earlier while creating the sid.
Ø  Set oracle_sid=clone
Ø  Sqlplus sys/****** as sysdba
11.   Now create spfile from pfile that earlier you created manually from the source database spfile.
Ø  Create spfile from pfile=’D:/data/pfileclone.ora’
12.   Start-up the database at no mount stage so it can be run with the control file
Ø  Startup nomount
13.   Now we have to create control file using the script and the script we can get from the source database control file itself by changing some items as replace all source database name with clone database name removing unwanted line and replacing reuse with set etc. I m providing the all required steps do it carefully.
Ø  Open control file that we created earlier on location d:/data/controlfile.ora with notepad  
Ø  Copy all the line starting with Create controlfile till the semicolon (;) and save this to another location using the name create.sql
Ø  Save as like “create.sql” in some windows.
Ø  Replace all source database name with clone database name ex replace all sourcedb to clone using find and replace option in notepad.
Ø  Delete  all -->
Ø  Delete all spaces
Ø  Replace reuse with set
Ø  Replace noresetlogs to resetlogs
Ø  Save the file it will look like a sql script
14.   Run script using following command
Ø  @D:/ create.sql  
15.   Now run the reset log command it will reset the database and file will be created in the clone db folder as well as the flash recovery area.
Ø  Alter database open resetlogs; 
Ø  Shutdown immediate
Ø  Startup normal
Ø  Now this is your clone db
16.   Now only this we need to change is to change the db id it can be done by using the command prompt command are given below.
Ø  nid target =d:/clone
Ø  Yes
CLONING USING OEM:
We can also perform the cloning operation using the OEM which is very easy and it’s GUI
Steps:
1.       Startup database and open OEM in the browser using the link given below. Or at the oracle home start-up click on the link. Mainly it is https:/ followed by host name then port number then language then consol then logon/logon
2.       Login as sysdba using password and user name example sys/*** as sysdba
3.       Go to data movement
4.       Click on clone database
5.       Specify the source for the cloning operation.
Ø  Choose Use Recovery Manager (RMAN) to copy database files and click on the  continue
6.       Source option
Ø  sSpecify the source host credential
It can be done using the control panel the steps are as follow
a.       Control panel
b.      System and security
c.       Administrative tools
d.      Local security policies
e.      Local policies
f.        User right assignment
g.       Log as a batch server (right click here)
h.      Add user
i.         Add computer name here as DARKNIGHT (NOT AS DARKNIGHT-PC)
j.        Give user name as DARKNIGHT and password as password of system (ur computer password) if u don’t have password in ur system then create one.
7.       Select Destination:
Ø  Give destination name
Ø  destination credential
Ø  destination password
Ø  clone database name
Ø  clone database instance name etc
8.       Destination option:
Ø  select flash recovery or OFA
9.       Database configuration
Ø  Provide password of all users
10.   Schedule the cloning
11.   Submit the job

Friday, January 25, 2013

EBS BASIC INTRO

EBS:
It is a product of oracle commonly known as the E business suite. It is a framework for multitier distributed computing. Its various services are distributed among three tier or model. A tier is a logical grouping of services, potentially spread across more than one physical machine. A machine may be referred to as a node, particularly in the context of a group of computers that work closely together in a cluster

  1. Desktop Tier
  2. Application Tier
  3. Database Tier
Oracle EBS installation take place on Database tier which support and manage Database.
Desktop Tier
It is client interface provided by html or html based application and java applet in a browser for the traditional form based application.

  1. Form client Applet
            The Forms client applet is a general-purpose presentation applet that supports all Oracle
E-Business Suite Forms-based products, including those with customizations and extensions. The Forms client applet is packaged as a collection of Java Archive (JAR) files. The JAR files contain all Java classes required to run the presentation layer of Oracle E-Business Suite forms. It is also known as Form.

  1. Desktop java client
             The Forms client applet must run within a Java Virtual Machine (JVM) on the desktop client. The Sun JRE Plug-in component allows use of the Oracle JVM on web clients, instead of browser's own JVM. This component is implemented as a standard browser plug-in.
The Application Tier
It having dual role:

  1. Having the various server services group that process the business logic.
  2. Managing the communication b/w desktop tier and the database tier.
It also called the middle tier three servers and services group include the basic operation for the oracle.
  1. Web service
  2. Form service
  3. Concurrent processing service
Note:
In the previous 10 version web service and form service, it was same. In R12 there was no concept of administration services. Patching can be done using any node.
Use of Application tier

  1. Load balancing
  2. Higher availability
  3. Fault tolerance
  4. Reliability
  5. Optimal scalability
Database tier (DB Tier)
       The database tier contains the Oracle database server that stores and manages all the data maintained by Oracle E-Business Suite. This includes the various types of file in which the tables, indexes, and other database objects for your system physically reside, as well as the database executables. The database also stores the Oracle E-Business Suite online help information.
       The database server communicates with the services and servers on the application tier, which mediate the communications between the database and the clients: there is no direct communication between the database and clients.

  1. Mixed Platform Architecture
      The Oracle database server is sometimes available on platforms where Oracle
E-Business Suite is not currently certified. In such a case, it may be possible to utilize a mixed platform architecture, where the database is installed on one platform and the application tier on another. (In Release 11i, this was referred to as a split configuration.)

  1. Oracle E-Business Suite Technology Layer

  1. Oracle Applications DBA (AD)
  2. Oracle Application Object Library (FND)
  3. Oracle Applications Utilities (AU)
  4. Oracle Common Modules (AK)
  5. Oracle Workflow (WF)
  6. Oracle Alert (ALR)
  7. Oracle Application Framework (FWK)
  8. Oracle XML Publisher (XDO)

  1. Oracle E-Business Suite Database Features

  1. Monitoring Features
1. Automatic Workload Repository (AWR)
2. Automatic Database Diagnostic Monitor (ADDM)
3. Active Session History (ASH)

  1. Performance Features
  1. Query Optimization
  2. Database Resource Manager
  3. Partitioned Tables
  1. Scalability Features

  1. Oracle Real Application Clusters
  2. Automatic Storage Management

  1. Business Intelligence Features

  1. Materialized Views

  1. Security Features