29.12.16

links to find cloning steps

How to create a cluster in weblogic server

In this, I will explain you that how we can configure our weblogic server to work on the cluster. As you all know why we need cluster, Yes you are right we do this only for high availability and scalability.

 Installation of weblogic with the cluster in Multi-node architecture

Note:- we have to have two machines . And please follow the following steps.


Simple steps that we needed :--
 1. Install WebLogic on both physical machines
 2. Create the WebLogic Domain on one physical machine
 3. Configure the domain by adding Managed Servers and Machines on one physical machine
 4. Copy the domain file structure to the other physical machine and enroll it to the WebLogic Domain
 5. Ensure that both WebLogic Machines are operational
 6. Create and configure the Cluster
 7. Ensure that the Cluster is operational


Install WebLogic on both physical machines :--

We have to install weblogic on both machine with same middleware home . So that we can copy our domain easily. Here we are doing our installation on linux machine .We must have some changes to directories but if you want to go with default then its not a problem.
First ever step to cahnge your “hosts” file.

The following actions should be performed by the "root" user.
Make sure the "/etc/hosts" file contains correct entries for both the "localhost" and real host names.
127.0.0.1      localhost localhost.localdomain localhost4 localhost4.localdomain4
192.xxx.xx.xxx  machine_name.com  machine_name
After that Create a new group and user on OS level .
groupadd -g 1000 oinstall
useradd -u 1100 -g oinstall oracle
passwd oracle


Create the directories in which the Oracle software will be installed.If you don't want too create the  directories than it's ok. BEA will take care of this and automatically create the directories in your home directory i.e. /home/username
But oracle recommend to create directories rather then your home directory. So create directories as below:--
mkdir -p /u1/app/oracle/product/fmw11g
mkdir -p /u1/app/oracle/config/domains
mkdir -p /u1/app/oracle/config/applications
chown -R oracle:oinstall /u1
chmod -R 775 /u1/


Now after creating the directories make a entries  into the "/home/username/.bash_profile" file.So, we dont need to set our path again and again.
export MW_HOME=/u1/app/oracle/product/fmw11g
export WLS_HOME=$MW_HOME/wlserver_10.3
export WL_HOME=$WLS_HOME
# Set to the appropriate JAVA_HOME.
#export JAVA_HOME=/usr/java/jdk1.6.0_33
export JAVA_HOME=/u1/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
#export JAVA_HOME=/u1/app/oracle/jdk1.7.0_17
export PATH=$JAVA_HOME/bin:$PATH


Install the JDK. Instructions for installing JRockit can be found here. This article will assume JRockit is being used.
If you are confuse with Jrockit and JDK then let me explain this for you. In simple words both works in same way. But both using different mechanism to do the same thing. If you want more detail on this please go here .


If you want to use HotSpot for JDK6 or JDK7 you might install them like this.
# # Java 6 as root
# rpm -Uvh jdk-6u33-linux-amd64.rpm
Or
$ # Java 7 as Oracle
$ cd /u1/app/oracle/
$ tar -xvzf /tmp/jdk-7u17-linux-x64.tar.gz


You can download the software from oracle and to start Installation of weblogic please run this command where your setup of weblogic is located.

$JAVA_HOME/bin/java -Xmx1024m -jar wls1036_generic.jar


After that provide the desired inputs to the system. I am not displaying everything.
Please visit oracle-base for see the one by one step of installation.
Note** we have done this on single machine. Please follow the same steps to install on another machine.

 2. Create the WebLogic Domain on one physical machine

We have installed weblogic server  on both machine with the same Middleware home. Now we have to create the domain on single machine.
For this we have to run the config.sh from loaction $ORACLE_HOME/wlserver_10.3/common.
Then go with defaults and provide the username and password for weblogic server.we will configure by admin console.


We have to make some change before starting the weblogic server .
You can change these parameters insetDomain.sh


This is optional You can change the memory size by changing the parameters Xmx
the most important parameters are :
-Xms4096m -Xmx4096m -XX:MaxPermSize=1028m
Xmx - is the max size of the heap.
Xms - is the initial size of the heap.( give it the same as Xmx )
XX:MaxPermSize - is is used to hold reflective of the VM itself such as class objects and method objects ( it's independent from the heap size,, give it the 1/3 to 1/4 of the Xms size depend in your classes size)


NOTE** For one domain having admin server and two managed server we have to use given formula :--
3GB for OS and other + 3GB for Admin Server + 6Gb for two managed servers

Now after configuration we have to start our weblogic server from the location   :--
                                 user_projects/domains/domain_name/bin by running startWeblogic.sh
After providing the username and password wait and see the logs that everything is going smooth.
We can configure our weblogic to start without asking username and password.
 I will explain that in next post i.e about nodemanger.

2.Configure the domain by adding Managed Servers and Machines in one physical machine

Note** we are doing this on one machine
Now its time to configuration the machine and manage servers for final step .
Access you weblogic from  http://localhost:7001/console and ready for the main task. Login with your weblogic username and password .
I am not putting every screen shot here because I know you all aware of the things.
Now we have to create manged server in our domain.


Follow the following steps  :--


 1) Expand your Environment then go to the server link after clicking on this you will find the summary of servers and you will find the configuration table there. There click on the ”new“ button to create managed server.

 2) Now this will ask you to put the name of the managed server and and listing address. As you know weblogic by default work on the 7001 port and if you want to change this port you can easily change this port from the admin console. After providing the input click to create manage server.
Now for e.g. we have our manage server with name of “test1” and port is 7010.

 3) Now after creating successfully you have this test1 server in your summary table where you will find its status shutdown

 4) Now you have to follow the same steps to create the same managed server on the other machine with same port.

 5) Now we have to create the machine to assign to the servers .you will find this in Environment . After clicking new it will ask you for the name of the machine  and machine OS , if you re using Linux then you can go for unix or other wise you can go with default and Now after saving this you can click on newly created machine and check the configuration it will run on default port 5556 if you want to change this port , you can change it.

 6) We have to set this machine to our manage server, for this go to the Environment and server then click on the managed server. You have to put your environment on the “lock and edit” . Now you can see in configuration tab that in machine you have options like “none” and one is machine name. Select the name of your machine and then save & active the changes. You will find this in servers summary table.

 7) Now we have to follow the same step for our second machine that is “test2”

 8)  Now with the WebLogic Machines created and configured we can start the node manager on the machine. Remember that we are still working on the same machine where we run the Configuration Wizard in the first place. It can be started by running the startNodeManager.sh script in the wlserver_10.3/server/bin directory under the Middleware Home. Before starting it, go over the start-up parameters specified in the nodemanager.properties configuration file in the wlserver_10.3/common/nodemanager directory and verify that it is not configured for SSL by ensuring that the SecureListener parameter is set to false. Once started the terminal window should indicate that the node manager is  running and listening to the port configured.

HOW TO START AND STOP ORACLE APPS r12

Hi, It is very easy to start or stop the oracle apps r12, but as a fresher you face many issues with starting and stopping the oracle apps. So in this I will tell you the simple steps to start the oracle apps.
What we must remember some rules first about starting and stopping the oracle apps.

SOME RULES:--

To start oracle apps
          when you start the oracle apps you must remember that start your database tier first and then start your listener and after that start your apps tier.
To Stop oracle apps
 
         When you want to stop oracle apps you have reverse  the starting process . First shutdown your app tier and then shutdown the listener and then at last shutdown the  database.


You must keep these steps in mind that you must follow the rules.


How to start the oracle apps:-

I will tell you the step that I use  to perform to start the oracle apps on LINUX.


Step 1:- Login to putty or any other software that you used to connect to your server.
Step 2:- Login with user that own the permission of that directory where you have installed oracle db.
Step 3:- Now you have to run the .env file located in ORACLE_HOME.
Step 4:- Now, on terminal run this command  Sqlplus '/as sysdba'
Step 5:- Now you will  have sql prompt like this sql> , type startup command to start the database
Step 6:- Now start the listener by typing " lsnrctl start " , this will start our listener.
Step 7:- We have our database up and running. now it's time to start application.
Step 8:- Now open a new terminal with user that own the permission of that directory where you have installed apps.
Step 9:- Now run the .env file from $HOME/apps/apps_st/appl .
Step 10 :- Now, change directory using cd  $ADMIN_SCRIPT_HOME
Step 11 :- Now you will see many .sh file in this directory. run following command on the terminal
                               sh adstartall.sh apps/password
Step 12:- Check  your app on http://hostname:8000/em




How to stop the oracle apps:-

As I have told you that we need to reverse the process of startup to shutdown the oracle apps.Means we have shutdown our application services first and then your database .


Step 1:- Now open a new terminal with user that own the permission of that directory where you have installed apps.
Step 2:- Now run the .env file from $HOME/apps/apps_st/appl .
Step 3 :- Now, change directory using cd  $ADMIN_SCRIPT_HOME
Step 4 :- Now you will see many .sh file in this directory. run following command on the terminal
                               sh adstpall.sh apps/password
Step 5:- Now we have to stop our listener of database.
Step 6:- Login with user that own the permission of that directory where you have installed oracle db.
Step 7:- Now you have to run the .env file located in ORACLE_HOME.
Step 8:- Now stop the listener by typing " lsnrctl stop " , this will stop our listener.
Step 9:- Now, on the same terminal run this command  Sqlplus '/as sysdba'
Step 10:- Now you will  have sql prompt like this sql> , type shutdown  immediate command to stop the database
Step 11 :- Now you have everything down.

Please let me know if you have any quires regarding this :)






ERRORS & SOLUTION in ORACLE APPS

We face many errors in oracle application in day to day activity. I am sharing some of them as may be this will help you to save time.


ERROR 1
ORA-00020: maximum number of processes (200) exceeded
ORA-20 errors will not be written to the alert log for
the next minute. Please look at trace files to see all
the ORA-20 errors.

 Reason :-- we are exceeded from the defined range of the sessions. So please find the below solution for this problem.


Solution :--  It is very common error that we face day to day. For this please  Increase the processes & Session in  DB
e.g. alter system set processes=XXX scope=spfile;
     alter system set sessions=XXX scope=spfile;
And bounce the Database properly.


ERROR 2

frm-92050 failed to connect to the server hostname:hostname:9000


Solution :--

Have a look at the following notes (especially the troubleshooting note):

Note: 252113.1 - Login Issue Failed To Connect To The Server Frm-92050 After Specfic Number Of Connections
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=252113.1

Note: 299187.1 - FRM-92050 Errors on Linux Oracle Applications 11i installs
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=299187.1

Note: 365529.1 - Troubleshooting FRM-92XXX Errors in Oracle Applications
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=365529.1

ERROR #

ISSUE :- ORA-01555 : snapshot too : old

Cause :-  Running big transection

Solution :- For this error just follow the following steps:-

1)     First check the size of UNDOTBS1 tablespace. Increase the size if it is  full .

2)     Check the undo_retention parameter. This is dynamic parameter and you can change it whenever you want. So  I found that this parameter is set to 900 i.e. in seconds. So I have increased this values to 2700. 

Detail of Patches in Oracle apps

Detail of Patches in Oracle apps



As you all know, we have to apply patches very frequently. This may be on your database or for oracle application ERP. We use OPATCH to apply patches on the database and ADPATCH to apply patches on oracle apps.

Here I am discussing only ADPATCH. As till now, I have worked in many organizations and applied a number of patches in different environments. So I am sharing my knowledge with you all. And if you find any mistake please feel free to write. 

What is a patch?

In simple words, patches are used to fix a bug. A bug is a defect in the code or functionality. Oracle provides a solution for that particular bug known as a patch.  

Types of patches in oracle apps?

Standalone/Oneoff patches:-- 

This is used to define a patch created to fix single/particular problem.

Mini Pack:--This is a group of one-off patches for a particular product like INV, GL, AP and named like 11i.GL.E ( means this group of patches contains fix for 11i GL product (General Ledger till time E is released ) This is commutative which means it will include 11i.GL.A, 11i.GL.B ....11iGL.D till 11i.GL.E earlier in 10.7 it used to call as patchset.


Family Pack:-- Group of mini-packs in one family bundled together is called a family pack. they are usually named as 11i_PF. A few examples of families are SCM ( 11i.SCM_PF.G ), ATG ( 11i.ATG_PF.H ) _PF indicate Product Family Pack


Maintenance Pack:-- Group of the family pack together is called a maintenance pack. So if you say your Verison is 11.5.10 then its maintenance pack 10 ( 3rd digit is maintenance pack )

cXXXXXX.drv The copy driver. Similar to patch.drv except it does not generate any files. dXXXXXX.drv Database driver. Functions the same as the R10 database driver.
gXXXXXXdrv Generate driver. Generates forms, reports, libraries, and message files.
uXXXXXX.drv it is a combination of all patches. means it contains c,d,g patchwork.

What is adpatch?

It is a utility that is used to apply patches. 

How to apply the patch?

You can find this here.



How to clone oracle apps using simple step by step

Cloning Oracle apps R12

I am Sunny Thakur working as Oracle apps DBA from last 3 years. I worked on many oracle product like  weblogic , OBIEE, Oracle apps and oracle database, ORACLE RMA etc. but I like Oracle apps most. I love to work on oracle apps.

You can also see my previous blog about patching oracle apps here .

The truth about oracle apps is it was a hot technology, it is hot and will remain hot. So for fresher's I will highly recommend oracle apps to take as primary skill :). 

So today I am sharing my knowledge with you guys about how to clone a oracle apps .
Cloning is not very easy to perform. You have to have full knowledge of oracle apps and database also. I will also discuss with you about the common errors that we face while cloning.

Please follow the following steps carefully to clone your system .

STEP  1 :-- Stay calm !!!

Yes, while cloning don't panic at all. I know when you clone your application for first time there is some fear in mind So Please be relax and stay calm.

Now Come to business, Cloning is very simple task . So first question is in mind is :-

Why we need to clone or when to clone oracle apps.
Answer is very simple, We do cloning to replicate our existing system to the UAT or DEV for our developers for testing purpose or if you migrating to new H/W.

STEP 2:-- Prepare your self :)

Yes, Before perform the cloning prepare your self, Do study and if you find this blog I don't think you have to go anywhere :).


NOTE:-- We have oracle apps R12. on Linux and having enough space to take backup. So please first of all make sure you have enough space in your source system(which server you want to clone) . Main objective is to save the time. I am assuming that we have system where we create the UAT for first time.

Preparations :--

If you search for cloning you will find following steps:-

1. PREREQUISITE TASKS
2. PREPARE SOURCE SYSTEM
3. COPY SOURCE TO TARGET
4. CONFIGURE TARGET
5. FINISHING TASKS

PREREQUISITE TASKS :--

Run Autoconfig on both APPLICATION & DB

It is main and very important part of cloning. I am assuming that we have enough space in our source system. First we have to run Auto-config on both application and database servers. For running autoconfig on apps tier we have to shutdown the application, only application not database.
Steps to run Autoconfig on apps tier are as follow:--
1.   Run the environment of oracle apps.
2. Go to $ADMIN_SCRIPTS_HOME then run adstpall.sh to stop the application.
3. In the same directory you will find the script adautocfg.sh .Run this script, it will prompt fro the password. And will take some time to complete.  
4. After successfully completion of the adautocfg.sh on application tier, We have to run the same on the database tier.
5.   Go to the database tier and run .env file from $ORACLE_HOME.
6.  Go to  $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME and run adautocgf.sh .
7. Now we have successfully run the autoconfig on both tiers.

You can restore your applied autoconfig .
1. Go to $APPL_TOP>/admin//out/MMDDhhmm
2. Run  restore.sh

Run Preclone  on both APPLICATION & DB

On the DB server:

1. go to  cd $ORACLE_HOME/appsutil/scripts/
2 . run perl adpreclone.pl dbTier

On the APPS server:

 1. cd $ADMIN_SCRIPTS_HOME
 2 perl adpreclone.pl appsTier

NOTE:- NOW SHUTDOWN THE DATABASE AND TAKE BACKUP OF BOTH DB & APPS

COPY SOURCE TO TARGET

Copy all the directory to new target system e.g. we have /u01 for database tier and /u02 for apps tier.
then you can use "tar " command to create a zip and send this to target system.
After sending the all the drives to target system and unzip by creating the same directory structure.  

CONFIGURE TARGET 


We first clone the database but first check the permission on the directories . We have to give full permission to user.

On the target Database system

1. Go to $ORACLE_HOME/appsutil/clone/bin
2. Run perl adcfgclone.pl dbTier 
  
Give the inputs that are required. You can change the name, port number, and location of your db tier.

After successful clone of db please check the lsnrctl that everything is running fine.

On the target apps system

1. Go to $COMMON_TOP/clone/bin
2. Run perl adcfgclone.pl appsTier
It will ask you for many inputs. you can change the port also from here.


After completing the cloning process. just check your concurrent manger. and If needed then run cmclean.sql to clean your node.   


FINISHING TASKS

Happy cloning :)


Please update with doubts. I will update this blog. Thanks for your time.












Steps to apply adpatch on EBS R12

How to apply patch on EBS R12.

Patching in oracle apps is very simple. We have to put application in maintains mode . This step is important .   

So for this we have Eight steps:---

1. Stop application tier.



2. Turn the maintains mode enable e.g.
            i. run adadmin (for this you have to run apps env)
           ii. go for 5 and after that go for 2 (1 for disable),   that will run "adsetmmd.sql" from 
                $AD_TOP/patch/115/sql
     

3.Copy the patch to oracle user folder

4. UNZIP the patch and change directory to patch number.

5. Set the PATH for home,bin.

6.  Run "adpatch"  and go with default value and give "system" and "apps" password

7. It will prompt for drive than give the patch drive name e.g. u"patch_no".drv




8. After applying the patch turn maintenance mode disable by going through 2nd step.  

11.5.15

BASICS OF LINUX FOR ORACLE APPS


Hi all, In this I will discuss you with the basic of linux that we used on daily bases. Now a days you will find linux servers every where. So let me help you understand this platform.





First I will tell you about the directory structure of Linux as below.





/ The root directory, the top-level directory in the FHS. All other directories are subdirectories of root, which is always mounted on some partition. All directories that are not mounted on a separate partition are included in the root directory


/bin Essential command line utilities. Should not be mounted separately; otherwise, it could be difficult to get to these utilities when using a rescue disk.



/boot Includes Linux startup files, including the Linux kernel. Can be small; 16MB is usually adequate for a typical modular kernel. If you use multiple kernels, such as for testing a kernel upgrade, increase the size of this partition accordingly.



/etc Most basic configuration files.



/dev Hardware and software device drivers for everything from floppy drives to terminals. Do not mount this directory on a separate partition.



/home Home directories for almost every user.



/lib Program libraries for the kernel and various command line utilities. Do not mount this directory on a separate partition.



/mnt The mount point for removable media, including floppy drives, CD-ROMs, and Zip disks.



/opt Applications such as WordPerfect or StarOffice.



/proc Currently running kernel-related processes, including device assignments such as IRQ ports, I/O addresses, and DMA channels.



/root The home directory of the root user.



/sbin System administration commands. Don't mount this directory separately.



/tmp Temporary files. By default, Red Hat Linux deletes all files in this directory periodically.



/usr Small programs accessible to all users. Includes many system administration commands and utilities.



/var Variable data, including log files and printer spools.



Now you have simple idea about structure . please wait for next post .