Monday, May 26, 2008

Installation Instructions for Oracle Application Server 11.5.10.2 on Redhat Linux AS 4.0 (Multi Node )

Installation Instructions for Oracle Application Server 11.5.10.2 on Redhat Linux AS 4.0 (Multi Node )
Environment Name: REDHAT AS4 Machine:
Configuration of machines and OS Configuration of Machines

2 GB RAM150 GB HDDPantium IV 3 GHZ DVD Rom

Operation Systems :-
Machine 1 :- apps01Windows 2000 professional (50 GB, Primary Partition FAT32 *)REDHAT Linx AS 4 (100 GB)

Machine 2 :- apps02REDHAT Linx AS 4 (150 GB)

Installation of OS
Machine 1 :- apps01
Windows 2000 professional
- Install windows 2000 professional and create primary partition FAT32 so that you can mount on linux.- Apply service pack 4.0
Redhat Linux AS 4.0

- Create Mount points as follows
Mount File system Size/ Ext3 1GB/boot Ext3 122MB/ebis Ext3 79GB/home Ext3 1GB/opt Ext3 1GB/var Ext3 1GB/tmp Ext3 2G/swap Ext3 4GB/usr Ext3 10GB
- Select everything in custom selection of packages.

Machine 2 :- apps02
- Create Mount points as follows
Mount File system Size/ Ext3 5GB/boot Ext3 122MB/ebis Ext3 114GB/home Ext3 6GB/opt Ext3 1GB/var Ext3 2GB/tmp Ext3 4G/swap Ext3 4GB/usr Ext3 10GB
- Select everything in custom selection of packages during linux installations

Prerequisite Staging on Windows 2000 professional – Machine 01
1. Prerequisite
- Install and configure IIS 5.0 or above. It is prerequisite to run perl- Download perl 5.8.8.8.7 from http://www.perl.com/ and install it. This is prerequisite for staging.- Check the following DVD’s Oracle Application 11i Start Here Disk 1 Oracle Application Rapid Install RDBMS Disk1 Oracle Application Rapid Install Database Disk1 to Disk4 Oracle Application Rapid Install Tools Disk1 Oracle Application Rapid Install Appl_Top Disk 1 & Disk2

2. Insert Oracle Application 11i Start Here Disk 1 in DVD ROM drive

3. execute perl <>\mnt\cdrom\disk1\rapidwiz\adautostg.pl

4. Setup the stage Area Direcoty

At the prompt for the stage directory, enter the name of the system top-leveldirectory. The Rapid wizard stage11i directory will be created in this path. 5. When the script prompts select 1 (Oracle Applications) .6. Insert the correct DVD’s as prompted by script7. Staging will take approximately 25GB

Staging on Redhat Linux 4.0 AS– Machine 02

1. Check the following DVD’s• Oracle Application 11i Start Here Disk 1• Oracle Application Rapid Install RDBMS Disk1• Oracle Application Rapid Install Database Disk1 to Disk4• Oracle Application Rapid Install Tools Disk1• Oracle Application Rapid Install Appl_Top Disk 1 & Disk2

2. Log in as Root and Check the current version of the perl installed
perl –v
it should be 5.8.5 or later3. Mount the dvd rom
mount /dev/dvd /mnt/dvdrom

3. execute perl <>/dev/dvd/mnt/cdrom/disk1/rapidwiz/adautostg.plSetup the stage area At the prompt for the stage directory, enter the name of the system top-level directory. The Rapid wizard stage11i directory will be created in this path.

4. When the scripts prompts select 1 (Oracle Applications)6. Insert the CD’s as prompted by the script(Note : even Automount enabled DVD has to be unmounted from and remounted
umount /mnt/dvdrom umount /dev/dvd
mount /dev/dvd /mnt/dvdrom and press enter


Pre-Installation StepsPreparing the Operating systems for Oracle 11.5.10.2
Check the following packages

Required RPMS Installed RPMS

• compat-db-4.1.25-9
• compat-gcc-32-3.2.3-47.3
• compat-gcc-32-c++-3.2.3-47.3
• compat-oracle-rhel4-1.0-5
• compat-libcwait-2.0-2
• compat-libgcc-296-2.96-132.7.2
• compat-libstdc++-296-2.96-132.7.2
• compat-libstdc++-33-3.2.3-47.3
• xorg-x11-deprecated-libs-devel-6.8.1-23.EL
• xorg-x11-deprecated-libs-6.8.1-23.EL
• openmotif21-2.1.30-11.RHEL4.4
• libaio-0.3.102-1
• libaio-devel-0.3.102-1
• compat-db-4.1.25-9
• compat-gcc-32-3.2.3-47.3
• compat-gcc-32-c++-3.2.3-47.3
• compat-oracle-rhel4-1.0-5
• compat-libcwait-2.0-2
• compat-libgcc-296-2.96-132.7.2
• compat-libstdc++-296-2.96-132.7.2
• compat-libstdc++-33-3.2.3-47.3
• xorg-x11-deprecated-libs-devel-6.8.1-23.EL
• xorg-x11-deprecated-libs-6.8.1-23.EL
• openmotif-2.2.3-6.RHEL4.2
• libaio-0.3.102-1
• libaio-devel-0.3.102-1

The libaio components are available on Disk 3 of the RHEL4.0 media. For information on downloading the openmotif component, see the instructions at the following URL:https://rhn.redhat.com/errata/RHSA-2005-412.html

1.1. After installing these patches, run ldconfig -v.(Note : ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). The cache is used by the run-time linker, ld.so or ld-linux.so. ldconfig checks the header and file names of the libraries it encounters when determining which versions should have their links updated )

1.2. Verify minimum Kernel Requirements with uname and rpm command,

[root@vision ~]# uname -r2.6.9-5.ELsmp [root@vision ~]# rpm -q glibcglibc-2.3.4-2
1.3. Domain Name System (DNS) Resolver ParametersEdit the following file
/etc/resolv.conf
and set the following parameters as below,
options attempts:5
options timeout:15
(Note : The resolv.conf file resides in the /etc directory and contains the IPs of domain name servers that you will probably need if you are going to do anything on the internet.options :Allows certain internal resolver variables to be modified. The syntax is where option is one of the followingtimeout: n (IN SECONDS)sets the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server.attempts: n sets the number of times the resolver will send a query to its name servers before giving up and returning an error to the calling application).


1.4. Host names
1.4.1. The format of hosts /etc/hosts file must be formatted as follows :
127.0.0.1 localhost.localdomain.(In apps01 hosts file make this entry and there should be entry for the other nodes which hosts the servers)
192.9.200.149 apps01.oneapps.com local_host 192.9.200.146 apps02.oneapps.com
(In apps02 the following entries to the /etc/hosts file has to be added )
192.9.200.146 apps02.oneapps.com local_host192.9.200.149 apps01.oneapps.com

Ping the remote machine with and hostname and checkComment the first line in the /etc/hosts file

1.4.2. Verify that the /etc/sysconfig/network file is formatted as follows :HOSTNAME=.
Exi : HOSTNAME=apps01.oneapps.com
( Note : Make sure that your machines has static ip address)

1.5. If the /etc/sysconfig/networking/profiles/default/network file exists, remove it.
Note: If you changed any files in the previous steps, reboot the system.

1.6. Modify number of open descriptors: in file /etc/security/limits.conf add the following
hard nofile 65535
soft nofile 4096
(.You can protect against certain types of denial of service attacks by modifying /etc/security/limits.conf. This file sets limits on system resources for each user.. The above setting limits the maximum number of files open)

1.7. Change port range value : /etc/sysctl.config add the following line,
net.ipv4.ip_local_port_range = 1024 65000

1.8. Set LD_ASSUME_KERNEL in file /etc/profile
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL

1.9. Apply one of these OS library patches: 4198954 (for Red Hat 4.0), you can download it from metalink.

 The above patch contains compat_libcwait-2.0-2.i386.rpm, compat-oracle-rhel4-1.0.-5.i386.rpm
 After applying the compat-libcwait-2.0-2.i386.rpm move the libcwait.so - library from /usr/lib to /lib and modify the path in /etc/ld.so.preload

2.0 Create a goup and two users one owner of database and other owner of oracle application
groupadd dbauseradd –g dba –G dba oracleuseradd –g dba –G dba applmgrpasswd oraclepasswd applmgr

Installation StepsInstallation of database serverMachine :- apps01

 Go to the following directory in your staging /ebis/Stage11i/startCD/Disk1/rapidwiz
./rapidwiz
Press next for welcome screen
Select Installation option
Install Oracle Applications E-Business 11i
Load Configuration
No
Install Type
Multinode
Node Information

Database :- apps01Administration :- apps01Concurrent Manager :- apps01Application :- apps02Web:- apps02
Define Database type
Fresh Database ( PROD)
Database install information( Folder or Mount point)/ebisDatabase install information Oracle OS

User :- oracleOracle OS Group :- dbaBase Install Directory :- /ebisSelect Licensing Type E-business Suite LicensingSelect Language American EnglishCharacter SetDefault Port PoolDefaultConfiguration File path./tmp/config.txt
Follow the installation step upto completion of installation.

Application Server Installation.Machine :- apps02 Copy the configuration file from apps01.
ssh apps01.oneapps.com cat /tmp/config.txt > /tmp /config.txt

 Go to the following directory in your staging /ebis/Stage11i/startCD/Disk1/rapidwiz
./rapidwiz
Press next for welcome screen
Select Installation option
Install Oracle Applications E-Business 11i
Load Configuration
Yes
Install Type
Multinode
Node Information

Database :- apps01Administration :- apps01Concurrent Manager :- apps01Application :- apps02Web:- apps02
Define Database type
Fresh Database ( PROD)
Database install information( Folder or Mount point)/ebisDatabase install information Oracle OS User :- oracleOracle OS Group :- dbaBase Install Directory :- /ebisSelect Licensing Type E-business Suite LicensingSelect Language American EnglishCharacter SetDefault Port PoolDefaultConfiguration File path./tmp/config.txt
Follow the installation step upto completion of installation.
Include a subset of test steps that will confirm that the customization has been installed properly.


Post- Installation Steps
Apply patch 4632932 to all the application tiers, then re-source the applications environment file to refresh the environment variables. This patch is required for setting the values for LD_ASSUME_KERNEL and LD_PRELOAD.Steps to Apply this patch

1. Connect as user applmgr on Application server
2. download patch 4632932 from metalink
3. Create a directory called patch in /ebis and unzip downloaded patch in this directory
4. Run adadmin utility and put the database into maintenance mode (type adadmin at shell prompt and it will guide you to put the application in maintenance mode .
5. Apply the patch using adpatch utility
6. After applying the patch disable the maintenance mode
7. Repeat the same on the host where the Database server installed

Thursday, May 8, 2008

Crontab

CRONTAB



Cron is unix,solaris utility that allows tasks to be automatically run in the background
At regular intervals by the cron daemon.

Crontab is a file which contains the schedule of cron entries to be run and at specified
Times.


Crontab commands:


Crontab –e edit crontabfile

Crontab –l display current crontab entries

Crontab –r remove crontabfile

Crontab – v display the last time edited



Crontab syntax:


A crontab file has five fields for specifying day,date and time

Each line in the crontab follows the following format

* * * * *

Field meaning

1minute(0-59)

2hour(0-23)

3day of month(1 -31)

4month (1-12)

5day of week(0-6) (Sunday=0)


how to edit crontab:

1 . At the prompt type in ‘crontab –e’ .This will open crontab file when this file open you will see other cron jobs ,or if u haven’t any-you’ll see a branch of lines with ‘~’ on them.

2 .use the cursor to go down until you can’t move the cursor down any more.this is where you start your new line.press ‘o’ to insert a new line.

3. press ‘o’ to insert new line.if u want to edit line,press’I’.

4. press the ‘esc’ key to exit out of edit mode.

5. to save the changes and exit :zz
If u want to exit without saving changes:q!

6. to view the new entry in crontab file type ‘crontab-l’.this will list the contents of crontabfile.







Crontab environment:


Cron invokes the command from the user’s HOME directory with the shell

Upon the execution of a command from a crontab entry,the implementation will supply a default environment ,defining at least the following environment variables

HOME
A pathname of the user’s home directory.

LOGNAME
The users login name

PATH
A string representing a search path guaranteed to find all of the standard
Utilities.

SHELL
A pathname of the command interpreter.


Crontab example:



5,10,15,20,25,30,35,40,45,50,55 * * * * /pro.sh >> /var/log/pro.log



On the 5th minute
Every hour of the day
Every day of the month
Every month of the year
Every day of the month

It will run pro.sh


su - applprod -c 'sh fam.sh'
cp /prodapps/applprod/process.lst .
if [ `tail -1 process.lst | awk '{print $1}'` -gt 500]
then
echo "Bouncing Apache"
sh /bounce.sh


fam.sh


sqlplus -s apps/apps <set feed off
set linesize 100
set pagesize 200
spool process
SELECT count(*) from v\$process;
spool off
exit
!
if [ `tail -1 process.lst | awk '{print $1}'` -gt 500 ]
then
echo "Apache to be bounced"

once the processes reaches 500 it will bounce






Disable email:


By default cron jobs sends a email to the users account executing the cronjob. If this is not required put the following command at the end of the cronjob line.

>/var/null 2>&1


Generate log file:


To collect the cron execution execution log in a file:



>>ar/log/pro.log

Wednesday, May 7, 2008

Recreating control file manually-Basic method

Sql>alter system backup controlfile to trace;
It will generate control file trace in udump. Edit the file manually remove unnecessary lines except below lines.
---edit the db-name---and remove resetlogs----
STARTUP NOMOUNT
CREATE CONTROLFILE set DATABASE "tnd" NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 5
MAXDATAFILES 512
MAXINSTANCES 8
MAXLOGHISTORY 14607
LOGFILE
GROUP 1 (
'/dev01/oracle/PROD/db/apps_st/data/log01a.dbf',
'/dev01/oracle/PROD/db/apps_st/data/log01b.dbf'
) SIZE 1000M,
GROUP 2 (
'/dev01/oracle/PROD/db/apps_st/data/log02a.dbf',
'/dev01/oracle/PROD/db/apps_st/data/log02b.dbf'
) SIZE 1000M resetlogs
-- STANDBY LOGFILE---edit the path of the datafiles-----
DATAFILE
'/dev01/oracle/PROD/db/apps_st/data/ctxd01.dbf',
'/dev01/oracle/PROD/db/apps_st/data/owad01.dbf',
'/dev01/oracle/PROD/db/apps_st/data/a_queue02.dbf',
'/dev01/oracle/PROD/db/apps_st/data/odm.dbf',
'/dev01/oracle/PROD/db/apps_st/data/olap.dbf',
'/dev01/oracle/PROD/db/apps_st/data/sysaux01.dbf',
'/dev01/oracle/PROD/db/apps_st/data/undo01.dbf',
'/dev01/oracle/PROD/db/apps_st/data/a_txn_data01.dbf',
CHARACTER SET UTF8
;
This is the way to create control file manually. Save it as a .sql script. Connect to sqlplus as sysdba and execute this script.
Sql>@create.sql
After execting this it’ll take some time to create the control file and finally you can see the message Control file created.
After that execute this,
Sql>ALTER DATABASE OPEN RESETLOGS;
If database require any recovery issue,
Sql>recover database using backup controlfile;
And apply the redolog file.
It’ll recover from the redo log files.
Eg:
/oracle/db/redo1.log
Recovered.

how to compile invalid objects.

1- log in to unix or linux as applmgr user.

2-Find the number of invalid objects:

SQL>sqlplus apps/passwd


SQL>select count(*) from dba_objects where status=’INVALID’;


You can use utlrp.sql script to compile invalid objects

$cd $ORACLE_HOME/rdbms/admin

SQL>@utlrp.sql


After that check again by using same sql statement

SQL>select count(*) from dba_objects where status=’INVALID’;