No great genius has ever existed without some touch of madness.

Wednesday, 19 June 2013

SCAN

BRIEF SUMMARY OF SCAN


SCAN is required for oracle 11gR2 GRID INFRASTRUCTURE installation and OUI can’t complete unless SCAN is defined.


In TYPICAL installation , the SCAN name you provide is also the name of the cluster and this name must be globally unique throughout your enterprise.


The SCAN is the address used by all clients connecting to the cluster. The SCAN name is a domain name registered to three IP addresses either in the DNS or Grid Naming Service (GNS).


The SCAN address must be on the same subnet as the VIP address for nodes in the cluster.


To use DNS method for SCAN, Network administrator must create a single name that resolves to 3 separate IP addresses. Use nslookup at least twice or thrice to see the round–robin algorithm work.


For GNS to operate, only 1 static address is required to be registered in the DNS i.e for the GNS vip . The node VIP and 3 SCAN VIP’s are obtained from DHCP server when using GNS.


Without setting up a DNS based SCAN resolution , you can use a HOSTS – FILE based workaround. In this case, you would use a typical host file entry to resolve the SCAN to only 1 ip address.


If hosts file is used to resolve SCAN hostname, you will receive CVU failure at the end of installation. (NOTE : 887471.1)


For each of the 3 IP addresses that the SCAN resolves to , a SCAN VIP resource is created  and a SCAN LISTENER is created .





Sample TNS entry for SCAN :

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = racnode-scan.india.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL.INDIA.COM)
    )
  )


Sample TNS entry without SCAN :

ORCL =
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=racnode1-vip.india.com)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=racnode2-vip.india.com)(PORT=1521))
)
(CONNECT_DATA=(SERVICE_NAME=ORCL.INDIA.COM))
)


The database registers with the SCAN listener through the remote_listener parameter in the init.ora/spfile .


SCAN automatically provides both FAILOVER and LOAD BALANCING . Each SCAN listener keeps updated cluster load statistics.


In order to make the cluster aware of the modified  SCAN configuration, delete the entry in the hosts-file and then issue : “srvctl modify scan –n <scan-name>” as the root user on one node in the cluster .



SEE MY NEXT POST  RELATED TO “TOP 5 ISSUES WITH SCAN VIP AND LISTENER”

Tuesday, 18 June 2013

RAC

IMPORTANT FACTS OF RAC

GRD(Global Resource Directory) : to record information about how resources are used within a cluster database. Lock Mastering is handled by GRD .

GCS(Global Cache Services) : implements Cache coherency .

GES(Global Enqueue Services)  : controls dictionary cache locks and library cache locks.


When 1 instance departs the cluster, the GRD portion of that instance needs to be redistributed to surviving nodes.
Similarly, when a new instance enters the cluster , the GRD portions of the existing instances must be redistributed to create the GRD portion of the new instance .
All this is done through an algorithm called LAZY REMASTERING.


Normally , when requesting a block information , oracle first check it’s own local cache , should the block not be there then it will request the RESOURCE MASTER for shared access to that block . If the blocks are in the remote node’s buffer cache then the blocks are copied via the HIS (Hgh Speed Interconnect)

  
It is strongly recommended that NETWORK TIME PROTOCOL (NTP) be configured on all cluster nodes before you install RAC but now in 11gR2 , you have Cluster Time Synchronization Service(CTSS) as part of GRID and for it to be functional you have to stop ntpd.


The ability to use ASM diskgroups for Clusterware OCR and Voting Disks is a new feature in oracle database 11gR2 GRID INFRASTRUCTURE .
The Clusterware and ASM share the same home , thus we call it GRID INFRASTRUCTURE HOME.


srvctl – manage instances and services

crsctl – manage nodes and cluster  

ocrconfig – manage ocr and voting disk


SCAN is required for oracle 11gR2 GRID INFRASTRUCTURE installation and OUI can’t complete install unless scan is defined .

SCAN can be defined in following ways
Using DNS : a single name that resolves to 3 IP addresses must be created in DNS (static)
Using GNS : instead of listening SCAN static addresses in DNS , a sub domain must be created in DNS for GNS to run i.e we will create a static virtual ip address in DNS for GNS (The node VIP and the SCAN VIP are obtained from the DHCP server when using GNS)

If u have more than 3 nodes , regardless of the number of nodes you have, there will be atmost 3 SCAN listeners .

SCAN automatically provides both FAILOVER and LOAD BALANCING .



NODE EVICTION also called as REBOOTLESS RESTART generally happens due to communication failure between the instances when the instance is not able to send heartbeat information to the control file and various other reasons.
During failure , to avoid data corruption , the failing instance evicts itself from the cluster group.The error is reported as ORA – 29740 in alert.log .

NETWORK HEARTBEAT – Each node in a cluster is pinged every second . Nodes must respond in css_misscount time (defaults to 30 sec) .  Network heartbeat failure will lead to node eviction .

DISK HEARTBEAT – Each node in a cluster “pings” (r/w) the voting disk(s) every second . Nodes must receive a response in diskTimeout time . Disk heartbeat failure will lead to node eviction .



CLUSTER INTEGRITY  and CLUSTER MEMBERSHIP is governed by  OCSSD (oracle cluster synchronization daemon)


CSS (Cluster Synchronization Services) manages cluster configuration by controlling which nodes are members and notifying members when a node joins or leaves the cluster . It has 3 separate processes :  cssdagent , cssdmonitor , ocssd



Change of CLUSTERNAME require deconfigure and reconfigure of entire cluster.



The OCR is backed up automatically every 4 hrs to <GRID_HOME> / cdata / <clustername> /  and can be restored via ocrconfig .

The Voting file is backed up into the OCR at every configuration change and can be restored via crsctl .


Ensure that UDP buffers are sized appropriately .It is applicable to all platforms except windows . Without proper buffer space allocated for UDP send and receive buffers, the performance of interconnect will suffer .(Refer ID 181489.1)



Implement OS Watcher and/or Cluster Health Monitor . It is applicable to all platforms . OS Watcher is a very simple and lightweight tool that gathers basic OS information every 30 sec. (Refer ID 301137.1)



If using NTP then implement NTP with slewing option . It is highly recommended that NTP be configured to slew time(speed up or slow down) the clock to synchronize the time to prevent node evictions.



Identify read only tables and move them to read only tablespaces .In a read only tablespace, reading from disk doesn’t involve any global cache operation , so , interconnect traffic can be reduced.

Monday, 3 December 2012

Oracle Apps R12 Scripts






















































You can see the installation blog at :
http://www.oracledbasagar.blogspot.in/2012/12/oracle-e-business-suite-1211.html

So,
From above screenshots you can see the locations for Database and Application Base Directory ,i.e

Database BASE DIRECTORY : /u01/oraR12
Application BASE DIRECTORY : /u01/applR12

NOW,
We will see the location of different scripts needed for administration according to the locations selected in above screenshots:

      1.       DATABASE STARTUP AND SHUTDOWN

1.1)
Go to location (Use “oracle” user):
/u01/oraR12/db/tech_st/11.1.0/appsutil/scripts/r12erp_r12apps
(note : r12erp_r12apps is same as <database_sid>_<host_name>)

Here, at this location you will find :
[oracle@r12apps r12erp_r12apps]$ ls -lrt
total 60
-rwx------ 1 oracle oracle  7109 Nov 29 18:55 adexecsql.pl
-rw------- 1 oracle oracle  1208 Nov 29 18:55 adstrtdb.sql
-rw------- 1 oracle oracle   809 Nov 29 18:55 adstopdb.sql
-rwx------ 1 oracle oracle  5081 Nov 29 18:55 adchknls.pl
-rwx------ 1 oracle oracle  4128 Nov 29 18:55 addlnctl.sh
-rwx------ 1 oracle oracle  2782 Nov 29 18:55 addbctl.sh
-rwx------ 1 oracle oracle  3407 Nov 29 18:55 adlsnodes.sh
-rwx------ 1 oracle oracle  1526 Nov 29 18:55 adautocfg.sh
-rwx------ 1 oracle oracle 15249 Nov 29 18:55 adpreclone.pl

Use ,
[oracle@r12apps r12erp_r12apps]$  ./addbctl.sh stop immeidate|normal|abort
to shutdown your database.

and

[oracle@r12apps r12erp_r12apps]$  ./addbctl.sh start
to startup your database.

1.2)
Go to location (Use “oracle” user):
/u01/oraR12/db/tech_st/11.1.0

Here , you will find an “env” file in a format like “<database_sid>_<host_name>.env”

Example :
r12erp_r12apps.env

Just execute this .env
[oracle@r12apps 11.1.0]$ . ./r12erp_r12apps.env

[oracle@r12apps 11.1.0]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.1.0.7.0 - Production on Mon Dec 3 17:24:33 2012
              Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
Using above also , you can startup and shutdown your database.

      
      2.       DATABASE LISTENER

Go to location (Use “oracle” user ):
/u01/oraR12/db/tech_st/11.1.0/appsutil/scripts/r12erp_r12apps
Here , you will find a script with a name addlnctl.sh

[oracle@r12apps r12erp_r12apps]$ ./addlnctl.sh status r12erp
[oracle@r12apps r12erp_r12apps]$ ./addlnctl.sh stop r12erp
[oracle@r12apps r12erp_r12apps]$ ./addlnctl.sh start r12erp


where r12erp is the name of listener.

However , listener.ora ,tnsnames.ora and sqlnet.ora  are  located at :
/u01/oraR12/db/tech_st/11.1.0/network/admin/r12erp_r12apps/

      
      3.       APPLICATION RELATED SCRIPTS

Go to location (Use “apps” user):
/u01/applR12/inst/apps/r12erp_r12apps/admin/script
Here, at this location you will find :

[apps@r12apps scripts]$ ls -lrt
total 176
drwxr-xr-x 2 apps apps  4096 Nov 28 20:33 msc
drwxr-xr-x 2 apps apps  4096 Nov 28 20:35 ieo
-rw-rw-r-- 1 apps apps  2888 Nov 29 14:20 sqlnet.log
-rwx------ 1 apps apps  6002 Nov 29 19:16 adstrtal.sh
-rwx------ 1 apps apps  5858 Nov 29 19:16 adstpall.sh
-rwx------ 1 apps apps  7360 Nov 29 19:16 adalnctl.sh
-rwx------ 1 apps apps 16543 Nov 29 19:16 adcmctl.sh
-rwx------ 1 apps apps  7237 Nov 29 19:16 adexecsql.pl
-rwx------ 1 apps apps  1552 Nov 29 19:16 adautocfg.sh
-rwx------ 1 apps apps 15366 Nov 29 19:16 adpreclone.pl
-rwx------ 1 apps apps  2250 Nov 29 19:17 gsmstart.sh
-rwx------ 1 apps apps  2296 Nov 29 19:17 java.sh
-rwx------ 1 apps apps  8097 Nov 29 19:17 adoacorectl.sh
-rwx------ 1 apps apps  8835 Nov 29 19:17 adformsctl.sh
-rwx------ 1 apps apps  8339 Nov 29 19:17 adapcctl.sh
-rwx------ 1 apps apps  7371 Nov 29 19:17 adopmnctl.sh
-rwx------ 1 apps apps  8105 Nov 29 19:17 adoafmctl.sh
-rwx------ 1 apps apps 10251 Nov 29 19:17 adformsrvctl.sh
-rwx------ 1 apps apps  6495 Nov 29 19:19 jtffmctl.sh
-rwxrwxr-- 1 apps apps  6638 Nov 29 19:19 mwactl.sh
-rwxrwxr-- 1 apps apps  6645 Nov 29 19:19 mwactlwrpr.sh
[apps@r12apps scripts]$

3.1)
To completely stop all the components of application tier use :

[apps@r12apps scripts]$ ./adstpall.sh
You are running adstpall.sh version 120.10
Enter the APPS username: apps

Enter the APPS password:
......
......
…….

3.2)
To start all the components of application tier use :

[apps@r12apps scripts]$ ./adstrtal.sh
You are running adstrtal.sh version 120.15
Enter the APPS username: apps

Enter the APPS password:
......
......
…….

3.3)
To check the status use :

[apps@r12apps scripts]$ ./adapcctl.sh status

You are running adapcctl.sh version 120.7.12010000.2

Checking status of OPMN managed Oracle HTTP Server (OHS) instance ...

Processes in Instance: r12erp_r12apps.r12apps.localdomain
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group          | OC4J:oafm          |   24645 | Alive
OC4JGroup:default_group          | OC4J:forms         |   24578 | Alive
OC4JGroup:default_group          | OC4J:oacore        |   24500 | Alive
HTTP_Server                             | HTTP_Server        |   24449 | Alive


adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /u01/applR12/inst/apps/r12erp_r12apps/logs/appl/admin/log/adapcctl.txt for more information ...

[apps@r12apps scripts]$




frm-92050 failed to connect to server /forms/lservlet-1

ERROR

frm-92050 failed to connect to server /forms/lservlet-1

SOLUTION

1. Make sure that the remote machine through which you are accessing Oracle Apps http page
    must have latest java update.

2.  Please make the following entry in C:\Windows\System32\drivers\etc\hosts : 
     <OracleAppshost_ip>                  <OracleAppshost_name>
     example :
     <10.298.231.10>                           <r12apps.localdomain>

IN Internet Explorer , go to Tools ->Internet Options -> Security->Choose Local Intranet->press Sites->Advanced and then press add : 



Example :






























and





















































































Sunday, 2 December 2012

Oracle E-business Suite 12.1.1 installation


STEP 1:

INSTALL ORACLE ENTERPRISE  LINUX

In my scenario it is OEL 5.1 i.e
While installing OEL , do not forget to select following packages :

        X Window System
            GNOME Desktop Environment
      Editors
      Graphical Internet
      Server Configuration Tools
      Development Tools
      Administration Tools
      System Tools
      Text-based Internet
      Development Libraries
      Base

Disable FIREWALL and SELINUX while installating.

[root@r12apps ~]# uname -a
Linux r12apps.localdomain 2.6.18-8.el5PAE #1 SMP Tue Jun 5 23:39:57 EDT 2007 i686 i686 i386 GNU/Linux


STEP 2:

DOWNLOAD E-BUSINESS SUITE 12.1.1.
You can download it from http://edelivery.oracle.com
Sign in and select :




Click on Go…
And select ….














































Click on continue…













































Download all files except..







































Above files are not needed for the installation purpose.


STEP 3:

INSTALL RPMs ON INTENDED MACHINE…

 As per my machine I installed

       gcc-4.1.2-14.el5.i386.rpm
            gcc-c++-4.1.2-14.el5.i386.rpm
      glibc-2.5-24.i386.rpm
      glibc-common-2.5-24.i386.rpm
      glibc-devel-2.5-24.i386.rpm
      kernel-headers-2.6.18-128.el5.i386.rpm
      libgcc-4.1.2-14.el5.i386.rpm
      libstdc++-devel-4.1.2-14.el5.i386.rpm
      libstdc++-4.1.2-14.el5.i386.rpm
      libXp-1.0.0-8.1.el5.i386.rpm
      libgomp-4.1.2-14.el5.i386.rpm
      sysstat-7.0.0-3.el5.i386.rpm
      libaio-devel-0.3.106-5.i386.rpm
      unixODBC-devel-2.2.11-7.1.i386.rpm
      libgomp-4.3.2-7.el5.i386.rpm
      unixODBC-2.2.11-7.1.i386.rpm
  
      The following i386 packages are not part of the OS distribution media and must be downloaded separately (from http://oss.oracle.com/projects/compat-oracle/files/Enterprise_Linux for both Oracle Linux 5 and RHEL 5) and installed manually:
      
      openmotif21-2.1.30-11.EL5.i386.rpm
            xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm
      binutils-2.17.50.0.6-6.0.1.el5.i386.rpm



However , you can get all the platform specific and rpm information regarding your installation on Metalink ID 405565.1 shown as :


















































In my scenario I selected document 761564.1 and got all information of RPMs needed to install.

Run
[root@r12apps ~]# ldconfig –v
after you install all RPMs.


STEP 4:

CHECK THE PERL VERSION :

[root@r12apps ~]# perl -v

This is perl, v5.8.8 built for i386-linux-thread-multi
 Copyright 1987-2006, Larry Wall
 Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
 Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[root@r12apps ~]#

You must have perl 5.0053 or higher installed


STEP 5 :


APPLY OS Library Patch for Oracle HTTP Server


In my scenario it is patch 6078836 i.e p6078836_101330_LINUX.zip  

Just unzip it and u will get below two files

[root@r12apps 6078836]# ls -lrt

total 16

-rw-r--r-- 1 root root 5825 Oct  4  2007 libdb.so.2

-rw-rw-r-- 1 root root 4819 Oct  4  2007 README.txt

View README.txt , so according to readme :

I copied libdb.so.2 to /usr/lib

[root@ r12apps 6078836]# cp libdb.so.2 /usr/lib

 

STEP 6 :


6.1)


[root@r12apps ~]# vi /etc/security/limits.conf

And add

  *              hard    nofile          65535

  *              soft    nofile          4096

  *              hard    nproc           16384

  *              soft    nproc           2047


6.2)


[root@r12apps ~]# vi /etc/sysctl.conf

And add

kernel.shmall = 268435456

kernel.shmmax = 4294967295

kernel.shmmni = 4096

kernel.sem = 256 32000 100 142

fs.file-max = 131072

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 262144       


NOTE:

Kernel.shmmax must be half the size of the physical memory (in bytes), and at least 2147483648)

Run :

[root@r12apps ~]# /sbin/sysctl –p


6.3)


[root@r12apps ~]# vi /etc/hosts

Verify that the /etc/hosts file is formatted as follows:
127.0.0.1 localhost.localdomain localhost
[ip_address] [node_name].[domain_name] [node_name]


6.4)


[root@r12apps ~]# vi /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=[node_name].[domain_name]


6.5)


If the /etc/sysconfig/networking/profiles/default/network  file exists, then remove it.


6.6)


Two Domain Name System (DNS) resolver parameters (timeout and attempts) are set by default to low values when the operating system is installed. These low values may cause attempted network connections to an Oracle database to fail. If this happens, add or update the following entries to these minimum settings in the /etc/resolv.conf file on each server node:

[root@r12apps ~]# vi /etc/resolv.conf
Add:
options timeout:15
options timeout:15


6.7)


CHECK OPMN port conflict

Check if the port 6000 is being used ("netstat -a | grep 6000")

If so, you should disable the graphics console login process on the Linux server. This can be accomplished by logging in as root and issuing the following commands:

Find the process that uses port 6000 by the command "lsof -i TCP:6000".
Use "kill -9" to abort the process found in the previous step
Confirm that nothing is listening at port 6000 ("netstat -a | grep 6000")
Modify /etc/inittab by changing "id:5:initdefault:" to "id:3:initdefault:"
Run "/sbin/init 3" to restart dtlogin

 

STEP 7:


RESTART THE SERVER


STEP 8:


ADDING USERS AND GROUP

[root@r12apps ~]# groupadd oinstall

[root@r12apps ~]# useradd –G oinstall oracle

[root@r12apps ~]# useradd –G oinstall apps

[root@r12apps ~]# passwd oracle

[root@r12apps ~]# passwd apps

Note: “oracle” user is for database and “apps” user is for application and part of the same group “oinstall”.


STEP 9:


MAKING DIRECTORIES AND GIVING PERMISSION

[root@r12apps ~]#  mkdir –p /u01/applR12/inst

[root@r12apps ~]# mkdir –p /u01/oraR12

[root@r12apps ~]# chmod –R 775 /u01/applR12

[root@r12apps ~]# chmod –R 775 /u01/oraR12

[root@r12apps ~]# chown –R apps:oinstall /u01/applR12

[root@r12apps ~]# chown –R oracle:oinstall /u01/oraR12


STEP 10:


INSTALL E-BUSINESS SUITE R12.1.1

10.1)

After you unzip all the files downloaded at step no. 2
You will get 5 folders:












In my scenario , I copied all the above software into USB and mounted it on my linux machine at location /u01/media :

First I ran fdisk –l

After knowing the my USB is at /dev/sdb1, I executed

[root@r12apps ~]# mount /dev/sdb1 /u01/media

10.2)

Running the installer :

[root@r12apps ~]# cd /u01/media/startCD/Disk1/rapidwiz

[root@r12apps ~]# ./rapidwiz


























































































































































































































































































So, after this finishes, just login :

http://<hostname>.localdomain:8000
or
http://<hostname>.localdomain:8000/OA_HTML/AppsLogin

and you will get:


























See my next blog to access the application through remote machine and solution to some errors you may get while doing so.

http://www.oracledbasagar.blogspot.in/2012/12/frm-92050-failed-to-connect-to-server.html

Do not forget to share your views, always there to help you out in the same.