Tuesday, 3 June 2008

Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i

Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i Note:233436.1

Upgrading Developer 6i with Oracle Apps 11i (Patchset 18 4948577)

Upgrading Developer 6i with Oracle Applications 11i Doc ID: Note:125767.1

1. Check $OA_HTML/bin/appsweb.cfg . Change the value from http to socket or https.
in xml Form Connection Mode = socket
2. Configure Applications to use Oracle JInitiator 1.1.8.16 or later MetaLink Note
124606.1
3. Developer 6i Patch 4948577
Apps Interop Patch 4888294
HP Tru64 :- 5713544, 4261542, 5216496, 5753922, 6195758.

4. Stop the Forms, Reports, HTTP, and Concurrent Manager Servers.

5. Install the Developer 6i Patch
Copy the files in this patch to your $ORACLE_HOME (8.0.6)
unzip the patch file.
cd $ORACLE_HOME/developer6i_patch18
./patch_install.sh
check the logfile.
cd $ORACLE_HOME/procbuilder60/lib
make -f ins_procbuilder.mk install
cd $ORACLE_HOME/forms60/lib
make -f ins_forms60w.mk install
cd $ORACLE_HOME/graphics60/lib
make -f ins_graphics60w.mk install
cd $ORACLE_HOME/reports60/lib
make -f ins_reports60w.mk install

6. cp –b /developer6i_patch18/bin/genshlib $ORACLE_HOME/bin

7. Apply patch 5713544
sh patch.sh
adrelink.sh force=y "fnd f60webmx"

8. Apply patch 4261542

9. Apply patch 5216496 ( sh patch.sh)

10. Apply patch 5753922
sh patch.sh
adrelink.sh force=y "fnd f60webmx"

11. Apply patch 6195758

12. Relink applications executables
execute adadmin
- Maintain Applications Files Menu
- "Relink Applications program"
- List of product to link: “fnd”
- Generate specific executables ….: “y”
- Relink with debug: “n”
- Enter executables to relink: “f60webmx ar60run ar60runb ar60rund *”

13. Apply intro patch 4888294.

14. select Maintain Applications Files, then select Generate Product JAR Files. Do
not force the regeneration of all JAR files.

15. Start the services.
------------------------------------------------------

Saturday, 31 May 2008

Good Metalinks Notes Configuring Oracle Applications Release 11i with 10g R2 RAC and ASM

1. Note:362135.1 Configuring Oracle Applications Release 11i with 10g R2 RAC and ASM

2. Note:362203.1 Interoperability Notes - Oracle Applications 11i with Oracle
Database 10g Release 2

3. Note 165195.1: Using AutoConfig to Manage System Configurations with Oracle E-
Business Suite 11i.

4. Note 230672.1: Cloning Oracle Applications Release 11i with Rapid Clone

5. Note 240575.1: RAC on Linux Best Practices

6. Note 265633.1: Automatic Storage Management Technical Best Practices

7. http://download.oracle.com/docs/cd/B16981_04/current/html/docset.html
Applications System Administrator's Guide, Release 11i

Friday, 30 May 2008

HOW TO RESET SYSADMIN PASSWORD

How to Reset only the SYSADMIN Password

PROBLEM DESCRIPTION
-------------------
You have forgotten the SYSADMIN applications password and cannot login. You know the apps and applsys passwords but does not want to follow the steps to
reset all passwords since resetting applsys would require re-registering all applications user passwords.

How can you reset only the SYSADMIN password?

SOLUTION DESCRIPTION
--------------------
The applsys password provides the basis for all user passwords so resetting applsys will require re-registering all user passwords.
If there are any other users with System Administrator privileges, then they can reset the SYSADMIN user's password from within applications.
Otherwise SYSADMIN can be reset without affecting other users as follows:
1. Log in to SQL*Plus as applsys
2. Backup FND_USER and FND_ORACLE_USERID tables using
create table FND_USER_BAK as select * from FND_USER;
create table FND_ORACLE_USERID_BAK as select * from FND_ORACLE_USERID;
3. update FND_USER
set ENCRYPTED_FOUNDATION_PASSWORD ='2DF3E509EB6A33F9607959C0976E25D997166FAB694ACDDAE466414791A44411',
ENCRYPTED_USER_PASSWORD='D2FCA9810D86BCA9BE944D3E2E7A4A9E6CDF89AAD633179B701774083F907C13'
where user_name='SYSADMIN';
sql>commit;

The SYSADMIN password is now set to WELCOME.

Thursday, 29 May 2008

10g GRID CONTROL ENTERPRISE MANAGER INSTALLATION.

Set the env for oracle user.

1. Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/oms; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:/opt/IBMJava2-131/bin:$ORACLE_HOME/bin:$PATH; export PATH
PATH=$PATH:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin; export PATH
PATH=$PATH:$ORACLE_HOME/Apache/Apache/bin; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

2. DISPLAY=:0.0; export DISPLAY

3. ./runInstaller

4. The installation will automatically install an agent in the agent home.

5. Agent installation on another node to connect with this 10g enterprise manager.

6. start and stop services.

To stop all the Grid Control components on a host, follow these steps:

Stop the OMS.

$PROMPT> $ORACLE_HOME/bin/emctl stop oms

Stop the Application Server Control Console, which is used to manage the Oracle Application Server instance used to deploy the Management Service.

$PROMPT> $ORACLE_HOME/bin/emctl stop iasconsole

Stop all the application server components, such as Oracle HTTP Server, OracleAS Web Cache.

$PROMPT> $ORACLE_HOME/opmn/bin/opmnctl stopall

Wait for four to five minutes to ensure that all the OPMN processes are stopped and TCP ports are released.

Change directory to the home directory for the Oracle Management Agent and stop the Management Agent.

$PROMPT> AGENT_HOME/bin/emctl stop agent
----------------------------------------------------------------------------------

To start all the Grid Control components on a host, follow these steps:

$PROMPT> $ORACLE_HOME/bin/emctl start oms

$PROMPT> $ORACLE_HOME/bin/emctl start iasconsole

$PROMPT> $ORACLE_HOME/opmn/bin/opmnctl startall

$PROMPT> AGENT_HOME/bin/emctl start agent

-------------------------------------------------------------------------------------

APPLICATION FORM METRIC SERVER CLIENT ADDITION IN 11i

NODE A DATABASE + CONCUR
NODE B DATABASE + CONCUR
NODE C PRIMARY WEB NODE
NODE D WEB NODE
NODE E ADD THIS NODE AS A NEW APPLICATION NODE

--------------------------------------------------------------

Put the entry of third node in /etc/hosts files of all the remaining current nodes.

2. /etc/services should have read permission.

3. Confirm the following to be present on third node OS :-

ld, ar, cc, make, Perl 5.0, Zip 2.3

4. Check the OS for asynchronous I/O mode.

5. Copy and extract “/oraprod” (APPL_TOP, COMMON_TOP, ORA_TOP) contents from second
application NODE D, to third NODE E mountpount. This node is selected for
cloning, since this node is “form metric server client”.

6. Create the clone context file on third node by using following commands :-
Set the environment
# cd /oraprod/oracle/finprdappl
# . ./APPSORA.env

Run adclonectx.pl

# perl $AD_TOP/bin/adclonectx.pl
contextfile=/oraprod/oracle/finprdappl/admin/SID_HOST.xml

It will generate context file in working directory which will be used for running Autoconfig.

7. Set s_methost to Form Metrics server NODE C.

8. Set s_leastloadedhost to %LeastLoadedHost%

9. Set the third node as Form server node only, i.e. Web server processes will not be running on third node. First application node NODE C is the web entry point for users.

10. Run Autoconfig
# sh $AD_TOP/bin/adconfig.sh contextfile=/oraprod/oracle/finprdappl/admin/
SID_HOST.xml

Start all applications on third NODE E.
-------------------------------------------------------------------------------

SOME USEFUL APPS DBA COMMANDS

PLEASE RUN THESE COMMANDS ON TEST FIRST THEN USE ON PRODUCTION.

Performance Monitoring
----------------------
select sid,serial#,program,status,module,last_call_et from v$session
where last_call_et>18000

select sid,sql_hash_value from v$session where sid in (select sid from v$session_wait where event like 'global cache cr request') order by 2

select sum(blocks*8192)/1024/1024/1024 from v$tempseg_usage

select name , lockid from dbms_lock_allocated

select table_name from dict where table_name like 'HZ%'

select * from gv$resource_limit

select name, kind, partition_name, sum(xnc) from v$cache_transfer
group by name, kind, partition_name order by 4

select JOB,WHAT,NEXT_DATE,BROKEN,INTERVAL from dba_jobs

Temp usage : -- select sum(blocks*8192)/1024/1024/1024 from gv$tempseg_usage

Kill all inactive old sessions
------------------------------
Select 'alter system kill session '''||sid||','||serial#||''';'
from V$session
where
status='INACTIVE'
and type <> 'BACKGROUND'
and SID>100
and last_call_et>18000

killing snipped sessions
------------------------------
--get spid

select p.spid from v$process p,v$session s where s.paddr=p.addr and
s.status='SNIPED'

kill -9 p.spid

select 'kill -9 ' || p.spid from v$process p,v$session s where s.paddr=p.addr and s.status='SNIPED'
and s.username='BOLBOL'


select b1.inst_id, b2.value "GCS CR BLOCKS RECEIVED",
b1.value "GCS CR BLOCK RECEIVE TIME",
((b1.value / b2.value) * 10) "AVG CR BLOCK RECEIVE TIME (ms)"
from gv$sysstat b1, gv$sysstat b2
where b1.name = 'global cache cr block receive time' and
b2.name = 'global cache cr blocks received' and b1.inst_id = b2.inst_id

Kill inactive sessions which are more than 5 hrs old
----------------------------------------------------
select sid,serial#,program,status,module,last_call_et from v$session
where sid>50 and last_call_et>18000 and status='INACTIVE' and type <> 'BACKGROUND'

Long operations
-----------------
select inst_id,sid,serial#, (ELAPSED_SECONDS + TIME_REMAINING) TOTAL_TIME, TIME_REMAINING,
100 - ((TIME_REMAINING/(ELAPSED_SECONDS + TIME_REMAINING)) * 100) PERCENTAGE_COMPLETE
FROM gV$SESSION_LONGOPS WHERE TIME_REMAINING>0


Kill concurrent request processes
---------------------------------
Get oracle_session_id from FND_CONCURRENT_REQUESTS
get sid,serial# from v$session with ausid=oracle_session_id
alter system kill sid,serial#



Set SQL command prompt
-------------------------------------------------
SET SQLPROMPT '&_USER.@&_CONNECT_IDENTIFIER.> '


Kill processes
-----------------------------

kill -9 `ps -ef | grep 'LOCAL=NO' | awk '{ print $2 }'`

kill -9 `ps -ef | grep f60runm | awk '{ print $2 }'`

Waits
-----------------
select event,count(*) from v$session_wait group by event'


To see the applied patches
--------------------------
select count(*) from ad_bugs where BUG_NUMBER='&bug_no';
select count(*) from ad_applied_patches where PATCH_NAME='&patch_name';


To know the patch lebel of a product in APPS
==================================================

select a.application_name,decode(b.status,'I','Installed','S','Shared','N/A') STATUS,PATCH_LEVEL
from APPS.fnd_application_vl a,APPS.fnd_product_installations b
where a.application_id = b.application_id order by 2,1;


To see the free space in tablespaces
------------------------------------
select TABLESPACE_NAME,sum(BYTES)/1024/1024 from dba_free_space
group by TABLESPACE_NAME


To remove/move the file by date
----------------------------
ls -lrt *.gz |grep "Apr 20"|grep "Apr 21"| awk '{print "mv " $9 " copied" }'> mv.sh
ls -lrt *.gz |grep -v xxxxx | awk '{print "mv " $9 " /arch_prd1" }'> mv.sh

ls -l |grep "Jul 20" |awk '{print "rm "$9}' >rmglo.sh

ls -ltr|grep "Feb 7"|grep trc|awk '{print $9}'|xargs -I {} -t rm {}

ls -ltr|grep trc|awk '{print $9}'|xargs -I {} -t rm {}


To kill all FNDLIBR processes
-----------------------------
ps -ef|grep FNDLIBR|grep -v grep | awk '{print "kill -9 " $2}' > killfndlibr.sh


To get the list of files on size basis
--------------------------------------
ls -l |sort +4rn |more


TO copy the files remotely
----------------------------
nohup rcp -p -r oraprosp@kmc2prospsuncrege:/export/ora9.2.0.4_64/* . &


To find out the error in patch log file
------------------------------------------
egrep -i 'ORA-|FRM-|APP-|REP-|Err|Fail|Warn'


For Split
----------
$split -60 amt79_copy.sh amt79_x$ls -l amt79_xa? | awk '{print "nohup ./"$NF" > "$NF".out 2> "$NF".err &"}' > master_amt79_copy.sh$chmod a+x amt79_x*

$ls -l xa* | awk '{print "nohup ./"$NF" > "$NF".out 2> "$NF".err &"}' > master_frsbx_copy.sh



nohup ./xaa > xaa.out 2> xaa.err &
nohup ./xab > xab.out 2> xab.err &



To startup Workflow
--------------------
nohup /oracle/apps/R11isbx/sbxappl/fnd/11.5.0/bin apps/sysuat@uat 0 Y /oracle/apps/R11isbx/sbxappl/fnd/11.5.0/resource/wfmail.cfg &


To Check Work flow process
----------------------------
ps -ef |grep -i wfmail


To Check ULIMIT OutPut
-----------------------
/export/home/oracle: ulimit -a

To cancel running concurrent request
----------------------------------
sqltweof>update fnd_concurrent_requests set PHASE_CODE='C',STATUS_CODE='E' where request_id='3477766';


To find out port number which is in used
----------------------------------------
netstat -a



To test mailx
--------------
echo "Test mail" |mailx -s "test" mailid@mailserver.com

echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" rupam.bora@airtel.in
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" rupam.bora@airtel.in

echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" crm.dba@airtel.in
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" crm.dba@airtel.in


echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" bpsingh@in.ibm.com
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" bpsingh@in.ibm.com

echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" manmoha1@in.ibm.com
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" santkum2@in.ibm.com

If patch has been applied on DBTIER and u r getting prereq error on FOrms tier..
Then follow this command while applying patch
---------------------------------------------------
$adpatch options=novalidate,noprereq


To find Java Virtual Machine version :
--------------------------------------
$ java -version

To find OS Version
------------------
$ uname -a


To find Available disk space
-----------------------------
$ df -b


To find Number of CPUs
-----------------------------
$ uname -X

$lsdev -C |grep Process|wc -l

To find Physical RAM on server
-------------
$ prtconf |pg




----------------------------------------------------------

To find the O/S level packages which are installed
=========================================================
pkginfo | grep -i





=================================================================
=================================================================


To know the operating system ...32 bit or 64 bit
------------------------------------------------

/export/home/frcrp: isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
/export/home/frcrp: uname -a
SunOS gecmsn05 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-4
/export/home/frcrp: isainfo -vk
64-bit sparcv9 kernel modules


to extract CPIO file
-------------------------

cpio -idmcv <

In HP to know RAM details
=============================

vishnuvardhan_v: grep -i Physical /var/adm/syslog/syslog.log
vishnuvardhan_v: http://unixguide.net/cgi-bin/unixguide.cgi


# /usr/sbin/dmesg | grep "Physical:" (to know the RAM size on HP)


To know swap size in HP
=======================
# /usr/sbin/swapinfo -a

To know the O/S bit version
=============================

/bin/getconf KERNEL_BITS


prtdiag---location
---------------------------------

/usr/share/man/sman1m/prtdiag.1m
/usr/platform/SUNW,Sun-Fire-V240/sbin/prtdiag
/usr/platform/SUNW,Sun-Fire-V250/sbin/prtdiag
/usr/platform/sun4u/sbin/prtdiag

to know more about the printers
================================

/etc/lp/interfaces
/etc/lp/printers


to know the printer status
----------------------------


# lpstat -p

# lpstat -a

$ lp adstrtal.sh ....to test the pint from unix level
When multiple printers:
lp -d 2105nw_phaser text.out (note the space after the -d)
lpr -P2105nw_phaser text.out (note that there is no space after the -P)

To remove job 469 from the color printer, you would type:
cancel 2105nw_phaser-2241
lprm -P2105nw_phaser 2241

# lpstat -v ---to know the printer names and printer queue names


to know the particular user responsibilities
=============================================
select c.user_id,a.RESPONSIBILITY_ID, b.RESPONSIBILITY_NAME from FND_USER_RESPONSIBILITY a,FND_RESPONSIBILITY_TL b, fnd_user c where c.user_name='HACKLN' and c.user_id=a.user_id and a.RESPONSIBILITY_ID=b.RESPONSIBILITY_ID ;



to check last issued commonds(with reboot comnds also)
=======================================================

last|more



To check the server reboot time from the last reboot
====================================================
uptime


To compile invalid objects in the database.
==============================================
exec utl_recomp.recomp_parallel(4)


TO Unset two task
=====================
unset two_task


CronTab values
===============
minute (0-59),
hour (0-23),
day of the month (1-31),
month of the year (1-12),
day of the week (0-6 with 0=Sunday).


To know Jserv status
======================

http://hostname.domainname:portnumber/servlets/IsItWorking

http://gecmsn05.cf.capital.ge.com:8010/servlets/IsItWorking

To check mailx command
===========================

applprod (PROD)$ mailx -v tejinder.singla@ge.com
Subject: Hello
.
EOT
applprod (PROD)$ tejinder.singla@ge.com... Connecting to smtpmail.corporate.ge.com via relay...
tejinder.singla@ge.com... Deferred: Connection refused by smtpmail.corporate.ge.com

applprod (PROD)$
-------------------------------------------------------

sendmail -V



To move Datafile to another location
========================================

Because of space problems moved '/vg03s1/edwdata/edwdata08.dbf to '/vg03s0/edwdata/edwdata08.dbf


alter tablespace EDWDATA rename datafile '/vg03s1/edwdata/edwdata08.dbf' to '/vg03s0/edwdata/edwdata08.dbf';


Add A Datafile To An Existing Tablespace
========================================
ALTER TABLESPACE ADD DATAFILE '' SIZE K|M;

e.g. ALTER TABLESPACE tools ADD DATAFILE 'c:\oracle\oradata\orabase\tools02.tom' SIZE 20M;


ALTER DATABASE CREATE DATAFILE '' SIZE K|M AS '';

e.g. ALTER DATABASE CREATE DATAFILE 'c:\oracle\oradata\orabase\uwdata03.dbf' AS 'UWDATA';


To add datafile in RAW DEVICES
==================================

to add a datafile in a tablesapce in O&G(for raw devices)


ls -ltr ---to check the datafiles which are existing ..

ls -altr free* ----to check the raw devices which we have in that instance


mv (follow the naming structure with existing datafiles)


go to sql and add a datafile to a tablespace using alter tablespace command with the size of rawdevice file size



To know the package body from a procedure
=============================================

SELECT TEXT FROM ALL_SOURCE WHERE NAME LIKE 'GCFEXT_AP_AUOR2AB1_PKG'


To find the table size
========================

first method----to calculate table size

select sum(bytes)/1024/1024
from dba_segments
where SEGMENT_NAME='TABLE_NAME';


------------------------------------

second method


analyze table my_table compute statistics;
or
analyze table my_table estimate statitics;

And then, execute the query
select blocks from user_tables where table_name='SIZE';


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
analyze table tabe_name compute statistics;
and then give
select num_rows,blocks ,empty_blocks as
empty,avg_space,chain_cnt,avg_row_len from dba_tables
where table_name='table_name';
now
blocks * db_block_size = table size

or

select segment_name Table_Name, sum(bytes) / 1024 / 1024 MB from user_segments
Where segment_type = 'TABLE' and Segment_Name like '&Table_search_string'
Group by segment_name;


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

To know particular user responsibility
=============================================


select c.user_id,a.RESPONSIBILITY_ID, b.RESPONSIBILITY_NAME from FND_USER_RESPONSIBILITY a,FND_RESPONSIBILITY_TL b, fnd_user c where c.user_name='HACKLN' and c.user_id=a.user_id and a.RESPONSIBILITY_ID=b.RESPONSIBILITY_ID ;


To find the any object version like *.pll,fmb and etc
========================================================

- go to the corresponding directory
- execute one of the following commands to get the version of the file
on all platforms (beginning with Oracle Applications v. 11.x) :
adident Header
on Unix :
strings -a | grep Header
on Windows (DOS box) :
find "Header"


To find a file under subdirectorys
=================================

$ ls -R|grep " " (here finding the space in the file/dir name)


1. To determine the physical RAM size, enter one of the following commands:
==========================================================================



Platform Command

AIX #/usr/sbin/lsattr -E -l sys0 -a realmem
HP-UX # grep "Physical:" /var/adm/syslog/syslog.log
Linux # grep MemTotal /proc/meminfo
Solaris # /usr/sbin/prtconf | grep "Memory size"
Tru64 UNIX # /bin/vmstat -P | grep "Total Physical Memory"



2. To determine the size of the configured swap space, enter one of the following commands:
===========================================================================================

Platform Command
AIX # /usr/sbin/lsps -a
HP-UX # /usr/sbin/swapinfo -a
Linux # grep SwapTotal /proc/meminfo
Solaris # /usr/sbin/swap -s
Tru64 UNIX # /sbin/swapon -s



To determine whether the Oracle Inventory group exists, enter the following command:
====================================================================================

AIX, Linux x86, or Linux Itanium:
# more /etc/oraInst.loc
Other operating systems:
# more /var/opt/oracle/oraInst.loc

Remove archives by number , archive format: arch_prd2_2_54375.arc.gz
==========================================================
echo "Enter instance no [1 or 2 ? ] "
read instno
echo "Enter archive no : "
read archno
echo "Deleting archives of instance " $instno " , below seq no : " $archno
for name in `ls *.gz`
do
ino=`echo $name|cut -c9-9`
if [ $ino -eq $instno ]
then
no=`echo $name|cut -c13-17`
if [ $no -lt $archno ]
then
echo " Removing file : " $name
#rm $name
fi
fi
done
#################################################################################

ps -aefo pid,pcpu,vsz,args|awk '{if ($2>1) print $1,$2,$3,$4}'