Friday, September 17, 2010

ASM

Adding datafile

ALTER TABLESPACE TDW_PROD ADD DATAFILE '+DATA_DISKGRP/bivis/datafile/bivis_28.dbf' SIZE 1024M AUTOEXTEND ON NEXT
1024M MAXSIZE UNLIMITED

queries
select NAME,TOTAL_MB,FREE_MB,FREE_MB/TOTAL_MB*100 from v$ASM_DISK;

select NAME,TOTAL_MB,FREE_MB,FREE_MB/TOTAL_MB*100 from v$ASM_DISKGROUP;

select NAME,TOTAL_MB,FREE_MB,TOTAL_MB-FREE_MB,FREE_MB/TOTAL_MB*100 from v$ASM_DISK

select NAME, REDUNDANCY, FAILGROUP from V$ASM_DISK ;

select operation from v$ASM_OPERATION;

select name,path,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,total_mb,free_mb from v$asm_disk

dropping/adding/cheking diskALTER DISKGROUP CHECK ALL;
ALTER DISKGROUP DROP DISK ; This command drops the disk and also initiates a REBAL operation
We can monitor the status of REBAL operation from v$asm_operation
Run select * from v$asm_disk and get different statuses of hdisk8.
eg:
ALTER DISKGROUP DATA_DISKGRP DROP DISK DATA_DISKGRP_0004;

DATA_DISKGRP_004 is alias for /dev/rhdisk8.

SQL> select OPERATION from v$asm_operation;

OPERA
-----
REBAL


ALTER DISKGROUP DATA_DISKGRP ADD DISK ‘mention the disk path’ NAME DATA_DISKGRP_004 REBALANCE POWER 5;


This query will give more details about disk usage.
SET LINESIZE 145
SET PAGESIZE 9999
SET VERIFY off
COLUMN disk_group_name FORMAT a15 HEAD 'Disk Group Name'
COLUMN disk_file_path FORMAT a17 HEAD 'Path'
COLUMN disk_file_name FORMAT a20 HEAD 'File Name'
COLUMN disk_file_fail_group FORMAT a20 HEAD 'Fail Group'
COLUMN total_mb FORMAT 999,999,999 HEAD 'File Size (MB)'
COLUMN used_mb FORMAT 999,999,999 HEAD 'Used Size (MB)'
COLUMN pct_used FORMAT 999.99 HEAD 'Pct. Used'
break on report on disk_group_name skip 1
compute sum label """" of total_mb used_mb on disk_group_name
compute sum label ""Grand Total: "" of total_mb used_mb on report
SELECT
NVL(a.name, '[CANDIDATE]') disk_group_name
, b.path disk_file_path
, b.name disk_file_name
, b.failgroup disk_file_fail_group
, b.total_mb total_mb
, (b.total_mb - b.free_mb) used_mb
, ROUND((1- (b.free_mb / b.total_mb))*100, 2) pct_used
FROM
v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number)
ORDER BY
a.name
/

Issues -- Forms

Fixing issues of Custom Forms in Forms Servlet using Doc id 269634.1
You need to put your CUSTOM TOP variable (where the form resides) path information into Apache/Jserv/etc/formservlet.ini file
So open formservlet.ini and add this entry at the end
# Begin customizations
XXTAC_TOP=/d01/app/applmgr/prodappl/xxtac/11.5.0
# End customizations

Wednesday, September 15, 2010

UNIX

ls commnadb

Copy the specific things to ur file
ls -l > s1.sh
cat s1.sh |awk '{print $9}' > s2.sh


ls *.dbf|wc -l --- number of files in the PWD
t
ls -l /data/ora007/od08oadb01/*dbf|awk '{print $9}' > 007.txt
$9 is column number
column 9 is redirected to new file 007.txt

# echo "$userid"
system/xxxxx
# echo "$userid"|awk 'BEGIN { FS = "/" } {print $2}'
xxxxx

date=`date +%F`
# date +%F
2010-09-19
# date
Sun Sep 19 22:49:21 EDT 2010

ls -l *dbf|awk 'BEGIN {total=0} {total+=$5} END {print total/1024/1024/1024}'
$5 is the column number
column five size column in GB will be printed

ls -l [a-g]*dbf|awk 'BEGIN {total=0} {total+=$5} END {print total/1024/1024/1024}'
gives the total size of the DBF's starting from a to g

To find out the size of the datafiles
from [a-h]*dbf

du -sk [a-h]*dbf |awk 'BEGIN {total=0} {total+=$1} END {print total/1024/1024}'
du -sk [i]*dbf |awk 'BEGIN {total=0} {total+=$1} END {print total/1024/1024}'
du -sk [j-z]*dbf |awk 'BEGIN {total=0} {total+=$1} END {print total/1024/1024}'


ls -l | grep 'Jan 9' | awk '{print$9}' >one.sh -------in this Jan 9 is the day for which we are compressing and one.sh is the file name. Next open one.sh and do
:%s,^,compress ,g
OR
: %s,^,rm -rf ,g
save the file and run it also do a chmod 777 one.sh


To remove one month files at a time
ls -l|grep 'Aug '|awk '{print$9}' > one.sh
chmod 777 one.sh
vi one.sh
: %s,^,rm -f ,g
./one.sh

ls -l |grep 'Feb' |awk '{print$9}' > one.sh

ls -l |grep 'Feb' |grep *.req |awk '{print$9}' > one.sh


sdiff
sdiff -s -w 50 tb.txt sb.txt
50 is word length

diff $IAS_ORACLE_HOME/Apache/Apache/conf/httpd.conf $HOME/httpd.conf.orig > /tmp/httpddiff.txt
SIZEDIFF=`ls -lA /tmp/httpddiff.txt | awk -F' ' '{print $5}'`
if [ $SIZEDIFF -gt 0 ]
then
mailx -s "VIS irecruitment setup is missing in PROD" emaladdress < /tmp/httpddiff.txt
mailx -s "vis irecruitment setup is missing in PROD"" onemoreemailaddress < $HOME/irecmessage.txt
fi

eg of mailx command:
cat /tmp/mailbody | mail -s "Ignore Alerts: ABC PREPROD Apachebounce on hostname" abcd@abc.ice.com -- -r alertfromserver@abc.ice.com < a


to check any errors present in the file
cat /oracle/qa/qaappl/admin/QA/log/u2819091.log |grep -i ORA-

VNC SERVER
vncserver -geometry 1024x1024 -depth 8 -cc 3
vncserver :49 -nolisten local -httpd ${VNC}/classes -cc 3
vncserver :99 -geometry 1024x1024

You can kill sessions you started.
$ vncserver -kill :[display number]

$ vncserver -kill :0
Wait for 5 mins and delete the file as follows:
$ rm /tmp/X11-unix/X0
login as appl user for the instance refreshed and start the vnc services as follows:
$ vncserver :0 -localhost
$ xhost +

To set your password the first time (or reset it later) run this command:
$ /usr/bin/vncpasswd



strings
strings -a hrrunprc.sql | grep Header


To create a directory, change ownership, create symbolic link
mkdir -p /u20/app/KEYCS1/apkeycs1/applmgr/11510
mkdir -p /u20/app/KEYCS1/apkeycs1/applmgr/common
mkdir -p /u20/app/KEYCS1/apkeycs1/applmgr/CUSTOM
mkdir -p /u20/app/KEYCS1/apkeycs1/applmgr/product/806
mkdir -p /u20/app/KEYCS1/apkeycs1/applmgr/product/iAS
mkdir -p /u20/app/KEYCS1/orkeycs1/oracle/product
mkdir -p /u22/oradata/KEYCS1/oradata/data01
mkdir -p /u22/oradata/KEYCS1/oradata/data02
mkdir -p /u22/oradata/KEYCS1/oradata/data03

ln -s /u20/app/KEYCS1/apkeycss1/applmgr applmgr
ln -s /u20/app/KEYCSS1/orkeycss1/oracle oracle
ln -s /u22/oradata/KEYCSS1/oradata oradata

chown apkeycs1:oaa applmgr
chown orkeycs1:dba oracle
chown orkeycs1:dba oradata


Changing group for user
# usermod -g dba ora10g
Check the group created in “/etc/group”
# cat /etc/group |grep dba
dba::110:


useradd -c ""App user KEYCS1"" -d /u20/app/KEYCS1/apkeycs1 -g oaa apkeycs1
useradd -c ""Ora user KEYCS1"" -d /u20/app/KEYCS1/orkeycs1 -g dba orkeycs1

chown -R apkeycs1:oaa /u20/app/KEYCS1/apkeycs1
chown -R orkeycs1:dba /u20/app/KEYCS1/orkeycs1
chown -R orkeycs1:dba /u22/oradata/KEYCS1


Commands useful to clear space issues in mount points

bdf|awk '{print $5,$6}' > one.txt

find . -type f -mtime +5
find . -type f -mtime +5 -exec rm -f()
find . -type f -mtime +5|xargs rm -f
find . -name *.req -mtime +7 -exec compress -f {} \;
find . -name *.req -mtime +30 -exec rm -f {} \;
find . -name *.req -mtime +7 -exec gzip {} \;
find . -name "*" -mtime +20 -exec rm {} \;
find . -name "*" -mtime +30 -exec ls -la {} \;|awk '{print $5}'>a.sh
find . -size +500000000 -exec ls -al {} \;
find . -name "*" -mtime +20 -exec rm {} \;
find . -size +52428800 -exec ls -al {} \;
find . -size +100000000c -exec ls -l {} \;
$du -sh
$du -sk
find /eadvi4/applmgr/common/admin/log/EADVI4_hostname \( -name '*.*' \) -mtime +120 -exec rm -rf {} \;

delete files /u03/applmgr/prod/TEMPS and /u03/applmgr/qlty/TEMPS older than 15 days.
find /u03/applmgr/prod/TEMPS/ -mtime +15 -exec rm -f {} \;
find /u03/applmgr/qlty/TEMPS/ -mtime +15 -exec rm -f {} \;

find . -name "*.dbg" -mtime +1 -exec rm -f {} \;

Script to delete the dump files 21 days old need to be in cron
30 20 * * * find /ORACLE/eul10g/backup \( -name '*.dmp*' \) -mtime +21 -exec rm -f {} \; ---- As oracle user cron.

To find Symbolink links and replace to corrent ones
more rename_softlinks.sh
#!/bin/ksh
cd $ORACLE_HOME
find . -type l -exec ls -l {} \; | grep prod | awk '{gsub("prod","qa",$11); print "rm "$9; print "ln -s " $11 " " $9}'

To find links under any top
find . -type l -print | xargs ls -ld

Recreate soft links in $CUSTOM_TOP/bin
unlink visSQL
ln -s ../../../fnd/11.5.0/bin/fndcpesr visSQL


How to find the symbolic links that point to the old path in your oracle_home and appl_top.
This command is useful in cloning after restore from source to target that symbolic link are not pointing to source.

ls -al `find . -type l` | grep $OLD_PATH

To find all the text files that contains the old path at the UNIX level.

find . -type f -print|grep -v ":"|xargs file|grep "text"|awk '{FS=":"}{print $1}'|xargs grep -il $OLD_PATH

How to Sort files based on Size of file in a Directory
Useful in finding out spaces issues
ls -l | sort -nrk 5 | more

How to find a "word" or pattern in all files in a directory & subdirectories
find . -name "*" -exec grep -l {} \; -print
for example I want to search for word oracle
find . -name "*" -exec grep -l oracle {} \; -print


How to delete files older than N number of days , Useful to delete old log files
find . -name '*.*' -mtime + -exec rm {} \;
for example if I want to delete all files older than 7 days
find . -name '*.*' -mtime +7 -exec rm {} \;



To edit window registry
regedit (on run prompt)


To view a Linux desktop remotely
1. SSH to Linux server
2. Start the VNC server by typing 'vncserver' at the command line. Remember the display number.
3. Connect to the VNC server using a VNC viewer. Enter host name, display number, and VNC password for the user who started the session.
4. When finished, don't log out of Linux, just close the VNC viewer window.
5. If you wish, kill the VNC server session when finished. Or keep it running and use it next time you need to connect.



To use VNC to control or view a computer behind a firewall
The official VNC FAQ has a good explanation of using VNC through a firewall
at http://www.realvnc.com/faq.html#firewall. You must either open port 5900+N where N equals the VNC port assigned when you created a connection, or you must use SSH tunneling to channel the VNC traffic through ports that normally allow traffic through a firewall.
More detailed information is available at the link above.


ps command
ps -fu apdev


sort, delete rows, columns
ls -lrt |sort -nr -k5 |head -15
ls -lart |head -200
ls -lrt > a.sh
vi a.sh
esc :3000,$d -- to delete all line after 3000 use ^d for before 3000 deletion
$cut -c 55-95 a.sh > b.sh
vi b.sh
esc :%s,compress,^,g
save
sh b.sh

To know port is free or not
netstat -na
lsof |grep


To know n/w IP
netstat -iv

tar commands
Simple tar commands
tar -cvf directory.tar direcotry
tar -xvf director.tar


tar cvfzp TEST_apps_inst_myserver.tar.gz apps inst
tar cvfzp TEST_dbhome_myserver.tar.gz db/tech_st
Extract each of the tar files with the command tar xvfzp
tar xvfzp TEST_apps_inst_myserver.tar.gz

nohup tar -zxvf ------.gzip or .gz &

tar cf - . | ssh 192.168.100.107 "cd /path/target_directory; tar xf - "

ssh servernmae "cd /ORACLE/prod/9.2.0;tar cf - ." | tar xf -

Remote tar and untaa eg:
ssh usaxsxx "cd /ORACLE/prod/9.2.0;tar cf - ." | tar xf -
ssh usaxsxx "cd /ORACLE/prod/8.0.6; tar cf - ." | tar xf -
ssh usaxsxx "cd /ORACLE/prod/9iAS; tar cf - ." | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - [a-b]*" | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - [d-s]*" | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - [u-z]*" | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - c[a-n]*" | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - c[p-z]*" | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod/common; tar cf - [a-j]*" | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod/common; tar cf - [p-z]*" | tar xf -
ssh usaxsxx "cd /ORACLE/apps/prod/common; tar cf - outbound" | tar xf -

tar cf - [a-b]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - "
tar cf - [d-s]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - "
tar cf - [u-z]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - "
tar cf - c[a-n]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - "
tar cf - c[p-z]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - "
tar cf - [a-j]* | ssh remotehost "cd /ORACLE/apps/narvis/common; tar xf - "
tar cf - [p-z]* | ssh remotehost "cd /ORACLE/apps/narvis/common; tar xf - "

tar cf - . | ssh remotehost "cd /ORACLE/narvis/8.0.6.3; tar xf - "
tar cf - . | ssh remotehost "cd /ORACLE/narvis/9iAS; tar xf - "

tar cf - . | ssh remotehost "cd /ORACLE/narvis_conf/8.0.6.3; tar xf - "
tar cf - . | ssh remotehost "cd /ORACLE/narvis_conf/9iAS; tar xf - "



Tar split
nohup tar cvf - OraHome_1 2> /11iGold/backup/OraHome_1.log | gzip | split -b 2000m - /11iGold/backup/OraHome_1.tar.gz &
This can be restored using the follwing command if required:
nohup cat /11iGold/backup/OraHome_1.tar.gz?? | gunzip | tar xf - &


untar/tar syntax in a single set of options

nohup cat /backups/code_tree_backups/100906/920.gz | gunzip | tar xvf - > 920.log &
nohup cat /backups/code_tree_backups/100906/1159.gz | gunzip | tar xvf - > ApplTop.log &
nohup cat /backups/code_tree_backups/100906/806.gz | gunzip | tar xvf - > 806.log &
nohup cat /backups/code_tree_backups/100906/common.gz | gunzip | tar xvf - > common.log &
nohup cat /backups/code_tree_backups/100906/custom.gz | gunzip | tar xvf - > custom.log &
nohup cat /backups/code_tree_backups/100906/ias.gz | gunzip | tar xvf - > ias.log &

nohup tar -cvpf - /u01/oradata/ 2> /scratch/u01.log | gzip -c > /scratch/u01.gz &
nohup tar -cvpf - /u13/oradata/ 2>/scratch/u13.log|gzip -c>/scratch/u13.gz &

nohup tar -cvpf - PROD_LVL0_20070103_9ii6jsga_s16690_p11 PROD_LVL0_20070103_9ki6jsgb_s16692_p11 PROD_LVL0_20070103_9ni6jtlj_s16695_p11 PROD_LVL0_20070103_9ri6k05o_s16699_p11 PROD_LVL0_20070103_9si6k0ig_s16700_p11 PROD_LVL0_20070103_9ti6k0ku_s16701_p11 PROD_LVL0_20070103_9mi6jtl9_s16694_p11 c-620808606-20070104-00 snapcf_PROD.f 2>/backup/backup1.log|gzip - c >/backup/backup1.gzip &


nohup tar -zcvpf $BACKUP_DIR/u01.tar /u01/PROD/oradata/ >$BACKUP_DIR/u01.log 2>&1 &
nohup tar -zxvpf $BACKUP_DIR/u10.tar &

rcp command
rcp -pr applmgr@remoteserver1:/u03/oracle/tst/tstcomn/* . &
rcp -pr applmgr@remoteserver1:/u03/oracle/tst/tstora/8.0.6 . &
rcp -pr applmgr@remoteserver1:/u03/oracle/tst/tstora/iAS . &

To zip files several files at a time
zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS.zip \
$IAS_ORACLE_HOME/Apache/Apache/conf/* \
$IAS_ORACLE_HOME/Apache/Apache/logs/* \
$IAS_ORACLE_HOME/Apache/Jserv/etc/* \
$IAS_ORACLE_HOME/Apache/Jserv/logs/*


R12 config files backup commands
as oratst user :
REFRESH=/clone/TST/REFRESH_FILES_DB.`date +%m%d%y`
rm -rf $REFRESH
mkdir -p $REFRESH
cp -p $ORACLE_HOME/*.env $REFRESH
cp -p $ORACLE_HOME/dbs/*.ora $REFRESH
cp -p $ORACLE_HOME/appsutil/*.xml $REFRESH
cp -p $TNS_ADMIN/*.ora $REFRESH
chmod 700 $REFRESH

=> as appltst user:
REFRESH=/clone/TST/REFRESH_FILES_APPS.`date +%m%d%y`
#rm -rf $REFRESH
mkdir -p $REFRESH/inst/apps
rsync -avH /d21/appltst/inst/apps/* $REFRESH/inst/apps/
chmod 700 $REFRESH

R12 config files backup commands
# more /vis2/clone/vis2.backup
echo su - applvis2
sleep 1
echo
echo backing up applications related config files .....................
sleep 2
echo
su - applvis2 -c /vis2/clone/vis2bkgenfiles/applvis2.bkp
sleep 1
echo su - oravis2
echo
sleep 2
echo backing up db related config files .....................
su - oravis2 -c /vis2/clone/vis2bkgenfiles/oravis2.bkp
sleep 1
echo
echo vis2 instance config files backup is complete and is located in /vis2/clone directory .
echo
# more /vis2/clone/vis2bkgenfiles/applvis2.bkp
REFRESH=/vis2/clone/REFRESH_FILES_APPS.`date +%m%d%y`
mkdir -p $REFRESH/inst/apps
rsync -avH /d11/applvis2/inst/apps/* $REFRESH/inst/apps/ --exclude "vis2_hostname1/logs/" --exclude "vis2_hostname2
/logs/" --exclude "vis2_hostname3/appltmp/" --exclude "vis2_hostname4/appltmp/"
chmod 700 $REFRESH

# more /vis2/clone/vis2bkgenfiles/oravis2.bkp
REFRESH=/vis2/clone/REFRESH_FILES_DB.`date +%m%d%y`
rm -rf $REFRESH
mkdir -p $REFRESH
cp -p $ORACLE_HOME/*.env $REFRESH
cp -p $ORACLE_HOME/dbs/*.ora $REFRESH
cp -p $ORACLE_HOME/appsutil/*.xml $REFRESH
cp -p $TNS_ADMIN/*.ora $REFRESH
chmod 700 $REFRESH
exp " '/ as sysdba' " file=$REFRESH/msdem_vis2_hostname.dmp log=$REFRESH/msdem_vis2_hostname.log direct=y feedbac
k=1000 owner=MSDEM



rsync
if refired it will pickup from where it failed
“rsync –exclude=ABc/ --log-file= -avH


RSYNC failed and restarted it. Please monitor the rsync and restart in case of failure.
Location: /d33/oravis/visdata
To Monitor: tail –f nohup.out (and) ps -ef | grep rsync
Command used to rsync:
nohup rsync -avH /snap/oravis/visdata/ /d33/oravis/visdata/ &


Some more rsync commands
nohup rsync -a -v -H /snaps/d01/applmgr/ /d01/appltst/ > /d01/appltst/rsync.log &
nohup rsync -a –v -H /cosxaor0o_d02oracle/ /d02/oratst/ > /d02/oratst/rsync.log &
nohup rsync -a -v -H /snaps/d03/oracle/ /d03/oratst/ > /d03/oratst/rsync.log &


One more rsync example
rsync -avH /d01/applcrp2/inst/apps/* $REFRESH/inst/apps/ --exclude "CRP2_vcosxaor33/logs/" --exclude "CRP2_vcosxawo14/logs/" --exclude "CRP2_vcosxaor33/appltmp/"
--exclude "CRP2_vcosxawo14/appltmp/"

some more rsync eg:
rsync commands and they can be submitted as background jobs using the nohup command.

Applications tier files:

cd /d01/oradev
nohup rsync --update --verbose --progress --stats --compress --recursive --times --owner --group --hard-links --perms --links /d01_snap_922385/oraprod/prodappl /d01/oradev/ > d01_devaappl_rsync.log &

nohup rsync --update --verbose --progress --stats --compress --recursive --times --owner --group --hard-links --perms --links /d01_snap_922385/oraprod/prodcomn /d01/oradev/ > d01_devacomn_rsync.log &

nohup rsync --update --verbose --progress --stats --compress --recursive --times --owner --group --hard-links --perms --links /d01_snap_922385/oraprod/prodora /d01/oradev/ > d01_devaora_rsync.log &

Database tier files:

cd /d03/oradev
nohup rsync --update --verbose --progress --stats --compress --recursive --times --owner --group --hard-links --perms --links /d03_snap/oraprod/proddata /d03/oradev/ > d03_devadata_rsync.log &

cd /d02/oradev
nohup rsync --update --verbose --progress --stats --compress --recursive --times --owner --group --hard-links --perms --links /d02_snap/oraprod/prodracdb /d02/oradev/ > d02_devadb_rsync.log &


one more rsync eg:

nohup rsync --log-file=d03_oradata_a.log -avH /NEW/d03/oracle/proddata/[a-d]* /d03/oracle/proddata &

nohup rsync --log-file=d03_oradata_e.log -avH /NEW/d03/oracle/proddata/[e-g]* /d03/oracle/proddata &

nohup rsync --log-file=d03_oradata_h.log -avH /NEW/d03/oracle/proddata/[h-k]* /d03/oracle/proddata &

nohup rsync --log-file=d03_oradata_l.log -avH /NEW/d03/oracle/proddata/[l-o]* /d03/oracle/proddata &

nohup rsync --log-file=d03_oradata_p.log -avH /NEW/d03/oracle/proddata/[p-s]* /d03/oracle/proddata &

nohup rsync --log-file=d03_oradata_t.log -avH /NEW/d03/oracle/proddata/[t-w]* /d03/oracle/proddata &

nohup rsync --log-file=d03_oradata_x.log -avH /NEW/d03/oracle/proddata/[x-z]* /d03/oracle/proddata &


nohup rsync --log-file=d02_oracle.log -avH /NEW/d02/oracle/* /d02/oracle &

nohup rsync --log-file=d01_prodappl.log -avH /NEW/d01/oracle/prodappl/* /d01/oracle/prodappl &

nohup rsync --log-file=d01_prodcomn.log /NEW/d01/oracle/prodcomn/* /d01/oracle/prodcomn/ &

nohup rsync --log-file=d01_prodora.log -avH /NEW/d01/oracle/prodora/* /d01/oracle/prodora &


nohup rsync --log-file=d01_final_log -avH /NEW/d01/* /d01/ &
nohup rsync --log-file=d02_final_log -avH /NEW/d02/* /d02/ &
nohup rsync --log-file=d03_final_log -avH /NEW/d03/* /d03/ &


Config files backup commands for apps[applvis@hostname]$ more /home/appltest/clone/config_backup_apps.sh
REFRESH=/home/appltest/REFRESH_FILES.`date +%m%d%y`
mkdir -p $REFRESH/appltop/admin $REFRESH/oraclehome $REFRESH/iasoraclehome $REFRESH/fndtop/resource $REFRESH/fndtop/secure $REFRESH/oahtml/bin/cfg $REFRESH/iasoraclehome/Apache/
modplsql $REFRESH/iasoraclehome/Apache/Apache $REFRESH/iasoraclehome/Apache/Jserv $REFRESH/comntop/admin/scripts $REFRESH/adtop/admin/template $REFRESH/config_top $REFRESH/iasco
nfighome/Apache
cp -rp $APPL_TOP/*.env $REFRESH/appltop
cp -rp $APPL_TOP/admin/*.env $REFRESH/appltop/admin
cp -rp $APPL_TOP/admin/*.txt $REFRESH/appltop/admin
cp -rp $APPL_TOP/admin/*.xml $REFRESH/appltop/admin
cp -rp $APPL_TOP/admin/*.sql $REFRESH/appltop/admin
cp -rp $APPL_TOP/admin/*.pls $REFRESH/appltop/admin
cp -rp $APPL_TOP/admin/*.drv $REFRESH/appltop/admin
cp -rp $ORACLE_HOME/*env $REFRESH/oraclehome
cp -rp $IAS_ORACLE_HOME/*env $REFRESH/iasoraclehome
cp -rp $IAS_CONFIG_HOME/*env $REFRESH/config_top
cp -rp $FND_TOP/resource/* $REFRESH/fndtop/resource
cp -rp $FND_TOP/secure/* $REFRESH/fndtop/secure
cp -rp $OA_HTML/bin/*cfg $REFRESH/oahtml/bin/cfg
cp -rp $IAS_ORACLE_HOME/Apache/modplsql/cfg $REFRESH/iasoraclehome/Apache/modplsql
cp -rp $IAS_ORACLE_HOME/Apache/Apache/conf $REFRESH/iasoraclehome/Apache/Apache
cp -rp $IAS_ORACLE_HOME/Apache/Jserv/etc $REFRESH/iasoraclehome/Apache/Jserv
cp -rp $APPLCSF/scripts/* $REFRESH/comntop/admin/scripts
cp -rp $AD_TOP/admin/template $REFRESH/adtop/admin/template
cp -rp $IAS_CONFIG_HOME/Apache/modplsql/cfg $REFRESH/iasconfighome/Apache/modplsql
cp -rp $IAS_CONFIG_HOME/Apache/Apache/conf $REFRESH/iasconfighome/Apache/Apache
cp -rp $IAS_CONFIG_HOME/Apache/Jserv/etc $REFRESH/iasconfighome/Apache/Jserv


-----------------------
Config file backup commands from DB side
[oravis@hostname]$ more db_bkp.sh
REFRESH=$HOME/REFRESH_FILES_DB.`date +%m%d%y`
mkdir -p $REFRESH/ORACLE_HOME/appsutil $REFRESH/TNS_ADMIN
cp -rp $ORACLE_HOME/dbs $REFRESH/ORACLE_HOME
cp -rp $ORACLE_HOME/*env $REFRESH/ORACLE_HOME
cp -rp $ORACLE_HOME/appsutil/*.xml $REFRESH/ORACLE_HOME/appsutil
cp -rp $TNS_ADMIN $REFRESH/TNS_ADMIN

To run alert commands repeatedly
while true
do
date
sqlplus "/as sysdba" @temp_alert1.sql
sleep 10
clear
done

To know number of CPU's on AIX m/c
lsdev -Cc processor

titles of each xterm window
If we add this to $HOME/.kshrc (assuming KSH is the shell being used), the information that is constant throughout the lifetime of the shell.
echo ""\033]0;${USER}@${HOST}\007""
The answer is available freely on the internet: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html

How to run sibclean
As any of these users rlakshmi
$ /usr/local/bin/sudo /usr/sbin/slibclean
This will clean up any unused modules in kernel and library memory which may cause installation or runtime problems


Setup the SSH Key between machine1 and machine2

Scp machine1:/home/applmgr/.ssh/id_dsa.pub to machine2:/home/applmgr/.ssh/authorized_keys2

Verify that the ssh key is working from usellx08 to the config/middle tiers of the cloned instance

machine1> ssh machine2

machine2>exit

Connection to machine2 closed

machine1>

We can also generate the dsa key if not working as :
ssh-kegen -t dsa


Control file creation script
cat create_controlfile_script_for_newdb.sh
#!/bin/ksh

newdbname=$1
[ -z "$newdbname" ] && echo "Usage: {script_name}.sh " && exit 1

cd $DATA_DIR/admin/udump
latest_tracefile=`ls -lt *.trc | head -5 | awk '{print $9}' | xargs grep -l "CREATE CONTROLFILE" | head -1`

awk '/# Set #2. RESETLOGS case/ {
while ($0 !~ /^;$/) {
getline;
if ($0 ~ /^#/) continue;
sub("CONTROLFILE REUSE","CONTROLFILE SET");
sub("PROD",s_dbname);
sub("/prod/","/"s_dbname"/");
sub("/prod","/redo");
print
}
}' s_dbname=$newdbname $latest_tracefile > create_controlfile_${newdbname}.sql


To check if package/rpm is installed
rpm –qa grep {rpm_name} (From root)
eg: rpm -q binutils
To install package/rpm
rpm –ivh {rpm_name} (From root)

If you execute rpm with the -qa options (q for query mode, a for all installed packages) you will see the following if it is installed:

[oravis@myserver~]$ rpm -qa | grep libstdc++-devellibstdc++-devel-3.4.6-10
If your on a 64bit OS how do you know if this is the 32bit or 64bit version.
You need specify a query format in the rpm command. following example extract the name, version, release and architecture information for the libstdc++-devel package.

[oravis@myserver ~]$ rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}_%{ARCH}.rpm \ %{INSTALLTIME:date}\n" | grep libstdc++libstdc++-devel-3.4.6-10_x86_64.rpm
Mon 06 Oct 2008 07:46:50 PM EDTlibstdc++-devel-3.4.6-10_i386.rpm Mon 06 Oct 2008 07:46:50 PM EDT


To check the amount of RAM and swap space available, run this:

grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo

Ex:
# grep MemTotal /proc/meminfo
MemTotal: 1034680 kB
# grep SwapTotal /proc/meminfo
SwapTotal: 1534196 kB

The minimum RAM required is 1024MB, and the minimum required swap space is 1GB. Swap space should be twice the amount of RAM for systems with 2GB of RAM or less and between one and two times the amount of RAM for systems with more than 2GB.

You also need 2.5GB of available disk space for the Oracle Database 10g Release 2 software and another 1.2GB for the database. The /tmp directory needs at least 400MB of free space. To check the available disk space on your system, run the following command:

df -h
Ex:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 6.8G 1.3G 5.2G 20% /
/dev/sda1 99M 17M 77M 18% /boot

Kernel Parameter
Make sure you add following entry in /etc/sysctl.conf

kernel.core_users_pid = 1
kernel.sem = 250 32000 100 128
kernel.shmmax = 65536
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rrem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_mzx = 262144

After adding these entries execute below command to take these parameters in to effect

sysctl –p /etc/sysctl.conf # sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.panic = 10
vm.dirty_background_ratio = 1
vm.dirty_ratio = 5
vm.lower_zone_protection = 100
vm.oom-kill = 0
kernel.shmmax = 34359738368
kernel.shmall = 8388608
kernel.sem = 2000 500000 100 250
kernel.shmmni = 4096
kernel.msgmnb = 65535
kernel.msgmni = 2878
kernel.msgmax = 8192
fs.file-max = 131072
net.ipv4.ip_local_port_range = 20000 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
vm.nr_hugepages = 16384



$/sbin/sysctl -a | grep sem
kernel.sem = 250 32000 100 128



Create the Oracle Groups and User Account
Next, create the Linux groups and user account that will be used to install and maintain the Oracle Database 10g Release 2 software. The user account will be called oracle, and the groups will be oinstall and dba. Execute the following commands as root:

Ex:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id
oracleuid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)

Set the password on the oracle account:

passwd oracle
Ex:
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
all authentication tokens updated successfully.

# groupadd dba
# useradd –d "/home/oracle" –m –g dba oracle
# passwd oracle

useradd
The general syntax for the useradd command is :

useradd -d home_directory -e expire_date -g initial_group -p password login_name

home_directory : Is the main directory within which the user is expected to store all his files and subdirectories.
For a user named ‘neha’ the home directory generally is /home/neha
expire_date : This is the date on which the user’s account expires and he/she cannot access the computer anymore unless the account is renewed.
initial_group : Every user in Linux belongs to a group which affects his file permissions. The initial group must be a group which already exists.
Password : This will be the user’s password to access his account
login_name : This will be the user name with which the user will access his account.

Eg :

useradd -d /home/neha -e 2009-12-03 -g root -p talent123 neha

creates a user named neha on my computer.

Home directory for user Neha is /home/neha
Expirty date is 3rd december,2009
Belongs to the ‘root’ group
Password is talent123

Incase you do not enter one of the parameters group, home, expire or shell they are replaced by their default values. These default values can be viewed using the “ useradd -D” command and can also be changed.


Configuring Kernel Parameters

Check and edit the /etc/sysctl.conf file with the following lines.

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Note: Make sure to reboot the system or run the command /sbin/sysctl –p to change the kernel parameters.

Add the following lines to the /etc/security/limits.conf file:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

session required /lib/security/pam_limits.so

Make sure that SELINUX=disabled in the the /etc/selinux/config file

Edit the /etc/redhat-release file replacing the current release information (Fedora Core release 6 (Zod)) with redhat-4

Create Directories
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

Ex
#mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle

The Linux kernel is a wonderful thing. Unlike most other *NIX systems, Linux allows modification of most kernel parameters while the system is up and running. There's no need to reboot the system after making kernel parameter changes. Oracle Database 10g Release 2 requires the kernel parameter settings shown below. The values given are minimums, so if your system uses a larger value, don't change it.
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

If you're following along and have just installed Linux, the kernel parameters will all be at their default values and you can just cut and paste the following commands while logged in as root.
cat /etc/sysctl.conf EOF
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
EOF
/sbin/sysctl -p

Ex:
# cat /etc/sysctl.conf EOF
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
EOF
# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144

Run the following commands as root to verify your settings:
/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max

Ex:
# /sbin/sysctl -a | grep shm
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shm-use-bigpages = 0
# /sbin/sysctl -a | grep sem
kernel.sem = 250 32000 100 128
# /sbin/sysctl -a | grep file-max
fs.file-max = 65536
# /sbin/sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 1024 65000
# /sbin/sysctl -a | grep rmem_default
net.core.rmem_default = 262144
# /sbin/sysctl -a | grep rmem_max
net.core.rmem_max = 262144
# /sbin/sysctl -a | grep wmem_default
net.core.wmem_default = 262144
# /sbin/sysctl -a | grep wmem_max
net.core.wmem_max = 262144

For Novell SUSE Linux releases, use the following to ensure that the system reads the /etc/sysctl.conf file at boot time:
/sbin/chkconfig boot.sysctl on

Setting Shell Limits for the oracle User
Oracle recommends setting limits on the number of processes and open files each Linux account may use. To make these changes, cut and paste the following commands as root:
cat /etc/security/limits.conf EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat /etc/pam.d/login EOF
session required /lib/security/pam_limits.so
EOF
For RHEL4, use the following:
cat /etc/profile EOF
if [ \$USER = ""oracle"" ]; then
if [ \$SHELL = ""/bin/ksh"" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat /etc/csh.login EOF
if ( \$USER == ""oracle"" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
For SLES 9, use the following:
cat /etc/profile.local EOF
if [ \$USER = ""oracle"" ]; then
if [ \$SHELL = ""/bin/ksh"" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat /etc/csh.login.local EOF
if ( \$USER == ""oracle"" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF


Enable Trace on any Executable to find out whats happening at O.S. Level
truss -eafl -o output.trc -o truss.txt
for example for Apache
truss -eafl -o output.trc -o truss.txt apachectl

This command will trace any system calls and will help you to find out errors.


How to schedule a Job in Unix
Use cronjob
crontab -l ( list current jobs in cron)
crontab -e ( edit current jobs in cron )
_1_ _2_ _3_ _4_ _5_ $Job_Name
1 - Minutes (0-59)
2 - Hours ( 0-24)
3 - day of month ( 1- 31 )
4 - Month ( 1-12)
5 - A day of week ( 0- 6 ) 0 -> sunday 1-> monday
e.g. 0 0 1 * 5 Means run job at Midnight on 1st of month & every friday
crontabs are in /var/spool/cron. The date/time of the users file is the last time they modified /var/cron/log


How to extract cpio file
cpio -idmv < file_name   (Don’t forget to use sign < before file name)

How to find CPU & Memory detail of linux
cat /proc/cpuinfo  (CPU)
cat /proc/meminfo (Memory)


How to find if Operating system in 32 bit or 64 bit ?
For solaris use command
isainfo -v
If you see out put like
32-bit sparc applications
That means your O.S. is only 32 bit
but if you see output like
64-bit sparcv9 applications
32-bit sparc applications
above means your o.s. is 64 bit & can support both 32 & 64 bit applications


How to find Process ID (PID) associated with any port ?
This command is useful if any service is running on a particular port (389, 1521..) and that is run away process which you wish to terminate using kill command
lsof | grep {port no.}  (lsof should be installed and in path)


How to change a particular pattern in a file ?
Open file using vi or any other editor, go in escape mode (by pressing escape) and use

:1,$s/old_pattern/new_parameter/gc   ( g will change globally, c will ask for confirmation before changing )

How to create symbolic link to a file ?
ln -s  pointing_to  symbolic_name
e.g. If you want to create symbolic link from a -> b
ln -s b a   
(Condition:you should have file b in that directory & there should not be any file with name a)


Grep for word in a zip file
unzip -t xmlparserv2.zip |grep HandlerBase
unzip -l appsborg2.zip | grep 9.0.4
0 04-18-03 17:10 .xdkjava_version_9.0.4.0.0_production


Redirecting standard error to standard output
sh patch.sh 2>&1 | tee patch.log


Printer check
lpstat -p printername
printer printername is idle. enabled since Mon Sep 15 14:50:53 2008. available.

lpstat -t | grep cac-check-bak

# ls -l test
-rw-r--r-- 1 root root 727 Apr 9 17:50 test
# lp -d cac-check-bak test
request id is cac-check-bak-54 (1 file(s))

# lpstat -o cac-check-bak

STEPS:
1. Verify whether the Printer IP is pingable from the server.
root# ping
2. Verify whether we are able to telnet to port 515 (or 9100 if HP) of the Printer IP.

1. To Add Network Printers:
Step: 1
Command:
lpadmin -p -o nobanner,dest= ,protocol=bsd -v /dev/null -I simple,postscript -T PS -i

/usr/lib/lp/model/netstandard
Step: 2
Enable and Accept The Printer:
enable
accept
Step: 3
Check the printer status.
lpstat -t | grep
Step: 4
Fire a test print and check the queue.
lp -d ( firing printjob)

-----------------------------APPS---------------------------------
SEE NOTE ONE ABOVE

The below are the steps for adding printer on Apps:
1. Login to Application as SYSADMIN.
2. Select System Administrator responsibility.
3. Open Printer -> Register form
4. Enter the Printer name, Type and Description
5. Save


To know hostnae from IP address
nslookup IP

Verify hostnames are fully qualified with the domain
-server: login as root
hostname
server.domainname


If the hostname is not fully qualified (with domain name) for a server, perform the following check:
cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server.domainnmae
GATEWAY=xx.xxx.xx.xx
If the HOSTNAME shows the fully qualified name in this file, then issue a reboot command for the settings to take effect.


To kill LOCAL=NO processes on DB
ps -ef | grep 'LOCAL=NO' | grep orad1 | awk '{ print $2 }' | xargs -i -t kill -9 {}


Embedding SQL in Shell
#!/bin/sh
VAR1=`sqlplus -s username/password end
set pagesize 0 feedback off ver off heading off echo off
select sysdate from dual;
exit;
end`
echo “system date is ” $VAR1
#end of shell script



Checking the Sun Operating System
System and hardware Configuration:
Hardware Status: sun4 (UNIX command; ‘arch’)
Operating System: SunOS 5.11 Generic sun4u sparc SUNW, Sun-Fire-V240 (UNIX command; ‘uname –a’).
CPU: 2 CPU’s. Each having the sparcv9 processor operates at 1503 MHz and has a sparcv9 floating point processor (UNIX command; ‘psrinfo –v’).
Memory size: 5120 Megabytes (UNIX command; ‘prtconf |grep size’).
Swap Total: (45440k bytes allocated + 4032k reserved = 49472k used) 14468936k available, i.e., 14GB (UNIX command; ‘swap –s’).
Check file System mounted and its respective size (UNIX command; ‘df -h’)


Screen commands
which screen
/usr/local/bin/screen
screen -list
screen -RR -DD screenname


To extract jar files
jar -xfv timesheet.jar
jar xvf $ORACLE_HOME/8402746/ewt3.jar


To split large files
split -l 2000 FILE
# split -l 50 book sect

This example splits book into 50-line segments named sectaa, sectab, sectac, and so forth.

# split book
This example splits book into 1000-line segments named xaa, xab, xac, and so forth.

Following are the most requred OS commands while installing and configuring Oracle Software on Unix/Linux Operating Systems.
Operating System: AIX 5L Based Systems (64-Bit)
Physical RAM: # /usr/sbin/lsattr -E -l sys0 -a realmem
Swap Space: # /usr/sbin/lsps -a

Operating System: HP Tru64 UNIX
PPhysical RAM: # /bin/vmstat -P grep "Total Physical Memory"
Swap Space: # /sbin/swapon -s

Operating System: HP-UX Itanium
Physical RAM: # /usr/contrib/bin/machinfo grep -i Memory
Swap Space: # /usr/sbin/swapinfo -a

Operating System: HP-UX PA-RISC (64-Bit)
Physical RAM: # grep "Physical:" /var/adm/syslog/syslog.log
Swap Space: # /usr/sbin/swapinfo -a

Operating System: IBM zSeries Based Linux, LinuxItanium/POWER/x86/x86-64
Physical RAM: # grep MemTotal /proc/meminfo
Swap Space: # grep SwapTotal /proc/meminfo

Operating System: Solaris SPARC 64-Bit/x86/x86-64
Physical RAM: # /usr/sbin/prtconf grep "Memory size"
Swap Space: # /usr/sbin/swap -s



Group and User Creation in Solairs.
This post is for creating an Unix Group and a User.

Solaris 5.10
--------------------------------------
Creating a Group:
--------------------------------------

For instance: Group - dba

Login as ROOT User

login: root
Password:
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
#

To Check whther the group is already created.

# grep dba /etc/group
or
# cat /etc/groupgrep dba

If dba group info is not displayed, then

To create a Group:

# groupadd dba

Syntax: groupadd -g

# cat /etc/groupgrep dba

dba:103:

Note: The gid, which needs to be changed, should be not being the gid of other group.
Example:
# usermod -g 333 dba
UX: groupmod: ERROR: 103 is already in use. Choose another.

To remove a Group:

# groupdel dba

# cat /etc/groupgrep dba

Commands:
---------

Create Group - groupadd
Modify Group - groupmod
Remove Group - groupdel

For more details, check the man pages i.e. man groupadd, man groupmod, and man groupdel

--------------------------------------
Creating a User Account:
--------------------------------------

For instance: User - Oracle

Login as ROOT User

login: root
Password:
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
#

To Check whther the oracle user is already created.

# grep oracle /etc/passwd
Or
# id –a oracle

If Oracle group info is not displayed, then

To create a User:

# useradd –d /export/home/oracle –m -g dba -s /bin/sh oracle


Note: In the above command
Option -Discription -Value
------------- -------------------- --------------------
-d -Home for the Oracle user -/export/home/oracle
-m -For making directory
-g -Primary Group dba
-s -Default Shell for the User -/bin/sh
Login -Name -Oracle

# grep oracle /etc/passwd
oracle:x:100:100::/export/home0/oracle:/bin/sh

To modify a User:

For example: To Comment the user and assing secondray group to the user

# usermod -c "Owner of the Oracle Software 10g" -G oinstall oracle

Note: In the above command
Option -Discription -Value
------------- -------------------- --------------------
-c -Comment -"Owner of the Oracle Software"
-G -econdary -Group oinstall


# grep oracle /etc/passwd
oracle:x:100:100:Owner of the Oracle Software 10g:/export/home0/oracle:/bin/sh

To set a password:

# passwd -r files oracle
New Password: XXXXXXXX
Re-enter new Password: XXXXXXXX
passwd: password successfully changed for oracle

Note: Where XXXXXXXX is the new password for oracle User.

To remove a user:

# userdel -r oracle

Note: The "-r" option is used to remove the user's home directory from the system.
And the Oracle user account should not be removed until and unles required, and
this should not be done on Production Servers.

# grep oracle /etc/passwd


Commands:
---------
Create a user - useradd
Modify a user - usermod
Rmove a user - userdel

seta password to the user- passwd

For more details, please check the man pages in UNIX i.e. man useradd, man usermod, and man userdel


UnZip can be downloaded from the following URLs:
Metalink : http://updates.oracle.com/unzips/unzips.html
Info-Zip : http://www.info-zip.org.

Perl 5.005
Use the Perl shipped with iAS1022 and RDBMS 9i if available or download it from
Perl.com

"Obtain and Install JDK 1.3 on All Applications Middle Tier Server Nodes

Download JDK 1.3
Operating System JDK 1.3 Download Location
Sun Solaris (SPARC) http://java.sun.com/j2se/1.3/download.html
Windows NT/2000 http://java.sun.com/j2se/1.3/download.html
HP HP/UX http://www.hp.com/products1/unix/java/
IBM AIX http://www.ibm.com/developerworks/java/jdk/aix/index.html
HP Tru64 UNIX http://www.compaq.com/java/download/index.html
Linux http://java.sun.com/j2se/1.3/download.html

follow the installation instructions provided in the package to install the JDK for each Applications middle tier

server node. Take a note for the new JDK 1.3 installation top-level directory with the full path as [JDK13_TOP]
[JDK13_TOP]/bin/java -version ---> confirm downloaded version


Script to kill services
# Kill leftover Apache processes
kill_processes=`ps -ef | grep ""/iAS/Apache/Apache/bin/"" | awk '{print $2}'`
echo $kill_processes
kill -9 $kill_processes

# Kill leftover Discoverer processes
kill_processes=`ps -ef | grep ""/discwb4/bin/"" | awk '{print $2}'`
echo $kill_processes
kill -9 $kill_processes


# Kill leftover JVM processes - THIS IS NOW APPLICABLE ONLY FOR OC4J
# kill_processes=`ps -ef | grep ""/native_threads/"" | awk '{print $2}'`
# echo $kill_processes
# kill -9 $kill_processes

# kill_processes=`ps -ef | grep ""/usr/j2se/"" | awk '{print $2}'`
# echo $kill_processes
# kill -9 $kill_processes"


Convert .sh file to unix format
“:set fileformat=unix”



Unix Operating System release
Solaris -> cat /etc/release
Red Hat Linux -> cat /etc/redhat-release

system log file
/var/adm/messages
service is /usr/sbin/syslogd
ps -ef|grep syslo
root 27893 7373 0 00:02:27 pts/4 0:00 grep syslo
root 9222 1 0 23:48:53 ? 0:00 /usr/sbin/syslogd

"How to find hostname on Linux/OEL ?
Use command “hostname” to find host name of Linux

How to change hostname on Linux/OEL ?

Open file /etc/sysconfig/network using editor like vi , nano or ed
Change entry HOSTNAME=XXXXXX to
HOSTNAME=New_Host_Name
Restart xinetd service or reboot Linux/OEL
Restart xinetd service xinetd restart
Reboot Linux reboot
If you have defined hostname resolution in hosts file then change entry in /etc/hosts

Starting xvfb
run this as applvis
nohup /usr/bin/X11/Xvfb :0 &
and then run this as applvis
nohup /usr/bin/X11/mwm &


O/s monitoring
use top/iostat/sar/vmstat

Most of the times while viewing big log files in vi editor, you would get "Line too Long" error
A simple solution to this problem is to use the fold command:

fold -80 yourfile.log > folded.log


Program to convert plain text files in DOS format to UNIX format.
dos2unix *.*


Below is the script which we used, - where certain files in non-prod were pointing to PROD.
#! /bin/bash

find /d11/applprod/PROD/apps/tech_st/10.1.2 -exec grep -l '/d11/applprod/GOLD' {} \; > ./files

for i in `cat ./files`
do
sed -e 's:d11/applprod/GOLD: d11/applprod/PROD:g' $i > temp_file
cp -rp temp_file $i
done


To get sql o/p in xls format
set markup html on spool on
spool emp.xls

Tuesday, September 14, 2010

OCM

Manual way of collection and upload
$ pwd
/d02/oravis/visdb/10.2.0/ccr/bin
$ ./emCCR collect
Oracle Configuration Manager - Release: 10.3.3.1.0 - Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
------------------------------------------------------------------
Collection and upload done.

Verify in the systems tab of metalink to see the upload is done

RDA

review, download and run the ./rda.sh script as described in Note: 250262.1

other notes for rda
Note: 314422.1 - Remote Diagnostic Agent (RDA) 4 - Getting Started
Note: 330363.1 - Remote Diagnostic Agent (RDA) 4 - FAQ
Note: 330344.1 - Remote Diagnostic Agent (RDA) 4 - Training
Note: 330362.1 - Remote Diagnostic Agent (RDA) 4 - Troubleshooting Guide

To simplify RDA configuration, use an RDA profile, and the best choice is the DB9i profile, even for 10g or 11g, because the DB10g profile is a superset of DB9i that adds stuff we don't care about (for DB Install). First set the ORA* environment variables for the DB of interest, then run the RDA config pass:

Unix:
cd {dir you unzipped RDA into}
export ORACLE_HOME={dir}
export ORACLE_SID={name}
./rda.sh -Syvp DB9i

Next, edit the resulting setup.cfg file, search for 'sysdba' (first hit will be a comment), and change the 2 lines directly above and below as follows:
for SQL_LOGIN= replace 'system' with '/' and for SQL_SYSDBA= replace 0 with 1
then save it, and run the (rda) command again, with no arguments this time:
Unix:
./rda.sh
The output subdirectory will contain a new RDA*.zip file for you to upload

Quantum

Installing Quantum for Oracle Payroll [ID 224273.1]

How to perform this section is as below:

create a directory:$PAY_TOP/vendor/quantum_2.9.5

cp this file $PAY_TOP/vendor/lib/pyvendor.zip to $PAY_TOP/vendor/quantum_2.9.5

cd $PAY_TOP/vendor/quantum_2.9.5

unzip pyvendor.zip

unzip REDHAT40.zip it will create 2.9.5 directory

cp -pr $PAY_TOP/vendor/quantum_2.9.5/2.9.5 $PAY_TOP/vendor/

mkdir /d11/appldev/devappl/pay/11.5.0/vendor/data

cp qfpt.dat file which should be latest 2.9.5 data release from any of the other instnaces to $PAY_TOP/vendor/2.9.5/data



as , US Super HRMS Manger responsibility --> Submit Processes and Reports
Quantum Program Update Installer
Platform:REDHAT40
Install in Directory:$PAY_TOP/vendor/quantum

Quantum Data Update Installer
Data Source: $PAY_TOPvendor/quantum/data
Data File Location: $PAY_TOP/quantum/data

PCP

To disable PCP

Capture required information before updating rows.
Sample Output
sqlplus apps
select NODE_NAME ,count(*) from FND_CONCURRENT_QUEUES
group by NODE_NAME
order by NODE_NAME;

NODE_NAME COUNT(*)
------------------------------ ----------
a 2
b 9
c 4
d 41
2

select NODE_NAME2,count(*) from FND_CONCURRENT_QUEUES
group by NODE_NAME2 order by NODE_NAME2;

NODE_NAME2 COUNT(*)
------------------------------ ----------
c 15
d 4
39

select TARGET_NODE,count(*) from FND_CONCURRENT_QUEUES
group by TARGET_NODE
order by TARGET_NODE;

TARGET_NODE COUNT(*)
------------------------------ ----------
58

Execute below DML statements as apps user
create table FND_CONCURRENT_QUEUES_BKP as select * from FND_CONCURRENT_QUEUES;

update fnd_concurrent_queues
set node_name='z'
where node_name in ('c','d');

45 rows updated.

Commit;

update fnd_concurrent_queues
set target_node='z'
where CONCURRENT_QUEUE_NAME not like '%QUEUE2%'
and MAX_PROCESSES >0

14 rows updated.
update fnd_concurrent_queues
set NODE_NAME2=''
where NODE_NAME2 in ('c','d');

19 rows updated.

Commit;

Disable all Concurrent queues ending with ""- Queue 2""

update FND_CONCURRENT_QUEUES
set ENABLED_FLAG='N'
where CONCURRENT_QUEUE_NAME like '%QUEUE2%'

4 rows updated.
Commit;"

Monday, September 13, 2010

SSL

SSL


Start/stop apache as root( if default ports 80 and 443 are used, ROOT user
must execute commands )
more /d01/oracle/prodcomn/admin/scripts/VIS_hostname/Apache_SSL_Stop_root
# Please Stop Apache in SSL mode as root #
. /d01/oracle/prodappl/APPSORA.env
/d01/oracle/prodora/iAS/Apache/Apache/bin/httpdsctl stop
as applmgr
$ more $SCRIPT_TOP/STOP_ALL
adalnctl.sh stop
jtffmctl.sh stop
#addisctl.sh stop

as root
more /d01/oracle/prodcomn/admin/scripts/VIS_hostname/Apache_SSL_Start_root
# Please Start Apache in SSL mode as root #
. /d01/oracle/prodappl/APPSORA.env
/d01/oracle/prodora/iAS/Apache/Apache/bin/httpdsctl startssl

as applmgr:
$ more $SCRIPT_TOP/START_ALL
adalnctl.sh start
jtffmctl.sh start
#addisctl.sh start

https://hostname.domainname/OA_HTML/jtfavald.jsp

implement new SSL certificate
1) shutdown services on web
2) backup the current SSL certificate and implement the new one
cd /d01/oracle/prodcomn/admin/certs/apache/ssl.crt
mv server.crt server.crt.20090222
mv ca.crt ca.crt.20090222
mv ca.crt.new ca.crt
cp ca.crt server.crt
3) start the services on web
4) verify the following URL
https://hostname.domainname/OA_HTML/jtflogin.jsp

SSL renew
Login to server webnode1

cd /d01/oratrn/viscomn/conf/VIS_webnode1/iAS/Apache/Apache/conf/ssl.crt
mv server.crt.deploy server.crt
mv ca.crt.deploy ca.crt
mv ca-bundle.crt.deploy ca-bundle.crt

cd /d01/oratrn/viscomn/conf/VIS_webnode1/iAS/Apache/Apache/conf/ssl.key
mv server.key.deploy server.key

Bounce the Apache services for VIS
Test the login

R12

To start MWA on R12
cd $ADMIN_SCRIPTS_HOME
./mwactlwrpr.sh start sysadmin/pwd

STOP
cd $ADMIN_SCRIPTS_HOME
./mwactlwrpr.sh stop sysadmin/pwd

Log Directories:
mwa.logdir= $INST_TOP/logs

CFG file:
$INST_TOP/admin/install/mwa.cfg

telnet hostname 10803


Parameter for auto compilation of jsp in R12
change s_jsp_main_mode justrun to recompile

Default env file in R12
$ORA_CONFIG_HOME/10.1.2/forms/server/default.env
on 11i
$ORACLE_HOME/forms60/server/default.env


R12 version checks

## Collect the Apache version
echo ""*****Apache Version*****""
$IAS_ORACLE_HOME/Apache/Apache/bin/httpd -v
echo "" ""
## Collect perl version
echo ""*****perl version******""
$IAS_ORACLE_HOME/perl/bin/perl -v|grep built
echo "" ""
## Collect Java version
echo ""******Java Version******""
sh -c ""`awk -F= '$1 ~ /^JSERVJAVA.*$/ {print $2}' $ADMIN_SCRIPTS_HOME/java.sh` -version;""
echo "" ""
## Collect client JRE version
echo ""*****Client JRE version*****""
cat $FORMS_WEB_CONFIG_FILE|grep sun_plugin_version| cut -c 1-35
echo "" ""
## Collect Forms version
echo ""*****Forms Version*****""
$ORACLE_HOME/bin/frmcmp_batch|grep Forms| grep Version
echo "" ""
## Collect PL/SQL Version
echo ""*****PL/SQL Version****""
$ORACLE_HOME/bin/frmcmp_batch|grep PL/SQL|grep Version
echo "" ""
## Collect Forms communication mode
echo ""****Forms Communication Mode****""
cat $FORMS_WEB_CONFIG_FILE|grep serverURL=
echo ""If the serverURL parameter has no value then Forms is implemented in socketmode else it is servlet


R12 form and pll compilation
$ORACLE_HOME/bin/frmcmp_batch module=$AU_TOP/forms/US/WMSLABEL.fmb userid=APPS/***** output_file=$WMS_TOP/forms/US/WMSLABEL.fmx module_type=form batch=yes compile_all=special

$ORACLE_HOME/bin/frmcmp_batch module=$AU_TOP/resource/CSCHTAB.pll userid=APPS/***** output_file=$AU_TOP/resource/CSCHTAB.plx module_type=library batch=yes compile_all=special


Version checks in 11i and r12

How to find Apps Version (11i/R12/12i)
Connect to database as user apps
SQL> select release_name from apps.fnd_product_groups;
Output like 12.0.4 or 11.5.10.2

Web Server/Apache or Application Server in Apps 11i/R12
Log in as Application user, set environment variable and run below query $IAS_ORACLE_HOME/Apache/Apache/bin/httpd -version
Output for 11i should be like
Server version: Oracle HTTP Server Powered by Apache/1.3.19 (Unix)
Server built: Jan 26 2005 11:06:44 (iAS 1.0.2.2.2 rollup 5)

Output for R12 should be like
Server version: Oracle-Application-Server-10g/10.1.3.0.0Oracle-HTTP-Server
Server built: Dec 4 2006 14:44:38

Forms & Report version (aka developer 6i) in 11i >> Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/f60run | grep Version | grep Forms

output like
Forms 6.0 (Forms Runtime) Version 6.0.8.25.2 (Production)
Check fourth character in version 25 which means Forms 6i patchset 16 (25-9)

Forms & Report version in R12/12i Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/rwrun | grep Release
or rwrun help=yes | grep Release
Output should be like
Report Builder: Release 10.1.2.2.0
You can safely ignore warnings

Oracle Jinitiator in 11i/R12/12i >>

Log in as Application user, set environment variable and run below query
grep jinit_ver_comma $CONTEXT_FILE

(Default is Java Plug-In for R12/12i )

Oracle Java Plug-in in 11i/R12/12i >>

Log in as Application user, set environment variable and run below query
grep plugin $CONTEXT_FILE


File Version on file system
adident Header filename
or
strings file_name | grep Header

Here adident is AD Utility (Oracle Apps) and strings is Unix utility

Version of pld file
*.pld are source code of *.pll which are inturn source of *.plx. *.pll is in $AU_TOP/resource and to find its version check

adident Header $AU_TOP/resource/.pll
IGSAU012.pll:
$Header IGSAU012.pld 115.1.115100.1 2004/04/01 05:40:18 appldev ship $

or
strings $AU_TOP/resource/.pll | grep -i header

FDRCSID(’$Header: IGSAU012.pld 115.1.115100.1 2004/04/01 05:40:18 appldev ship $’);

OA Framework Version
http:// hostname.domainName:port/OA_HTML/OAInfo.jsp (Only for 11i); Log in as Application user, set environment variable and run below query

adident Header $FND_TOP/html/OA.jsp
adident Header $OA_HTML/OA.jsp

output for both should look like
$Header OA.jsp 115.60 2006/03/31 00:47:28 atgops1 noship $

120.21 means OA Framework Version (coming soon..)
115.60 means OA Framework Version (coming soon..)
115.56 means OA Framework Version (coming soon..)
115.36 means OA Framework Version 5.7
115.27 means OA Framework Version 5.6E
115.26 means OA Framework Version 5.5.2E

OA.jsp Version OA Framework Version ARU Patch Number
115.56 5.10 Patch:3875569.
115.36 5.7 Patch:2771817.
115.27 5.6 Patch:2278688.


Discoverer Version for 11i (3i or 4i)
Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/disc4ws | grep -i Version

Discoverer Version for 11i or R12 (10g AS)
Check under Application Server Section as 10g AS Discoverer is on standalone

Workflow Version with Apps
Connect to Database as apps user
SQL> select TEXT Version from WF_RESOURCES where NAME = ‘WF_VERSION’;
Output like 2.6.0 means workflow version 2.6.0

Oracle Single Sign On
Connect to database which holds SSO repository
SQL>select version from orasso.wwc_version$;

Oracle Internet Directory
There are two component in OID (Software/binaries & Schema/database)

To find software/binary version

$ORACLE_HOME/bin/oidldapd -version
output should look like

oidldapd: Release 10.1.4.0.1 - Production on thu sep 11 11:08:12 2008
Copyright (c) 1982, 2006 Oracle. All rights reserved.

To find Schema Version/ database use

ldapsearch -h -p -D “cn=orcladmin” -w “” -b “” \
-s base “objectclass=*” orcldirectoryversion

and output should be like

version: 1
dn:
orcldirectoryversion: OID 10.1.4.0.1

or run following query in database
SQL> select attrval from ods.ds_attrstore where entryid = 1 and attrname = ‘orcldirectoryversion’;

Output should be like OID 10.1.4.0.1

Application Server
Oracle Application Server (Prior to Oracle WebLogic Server)
If application server is registered in database (Portal, Discoverer) check from database
SQL> select * from ias_versions;
or
SQL>select * from INTERNET_APPSERVER_REGISTRY.SCHEMA_VERSIONS;

OC4J (Oracle Container for J2EE)
Set ORACLE_HOME
cd $ORACLE_HOME/j2ee/home
java -jar oc4j.jar -version

Oracle Portal
SQL> select version from portal.wwc_version$;

Database Component

I) Oracle Database

To find database version
SQL> select * from v$version;
or
All component version in database

$ORACLE_HOME/OPatch/opatch lsinventory -detail

Oracle Enterprise Manager
Metalink Note 605398.1 How to to find the version of the main EM components

Unix Operating System

Solaris -> cat /etc/release
Red Hat Linux -> cat /etc/redhat-release

Checking whether Forms Socket or Forms Servlets are used
Look for the line in jserv.conf file
#ApJServGroup FormsGroup 1 1 /u02/oracle/visora/iAS/Apache/Jserv/etc/forms.properties
If using servlets this line will be uncommented.
Check the appsweb.cfg under OA_HTML/bin for the following line
if using Servlets this line will be uncommented.
; serverURL=/forms/formservlet
If the serverURL is uncommented and set, then you are using Forms Servlets.
Otherwise, you are using the Socket connection mode.


Middle/Application Tier Scripts in R12
-------------------------------------------------

Scripts for Application Tier services in R12 are located in "Install_base/inst/apps/$CONTEXT_NAME/admin/scripts"
where CONTEXT_NAME is of format SID_HOSTNAME

i) adstrtal.sh
Master script to start all components/services of middle tier or application tier. This script will use Service Control API to start all services which are enabled after checking them in context file (SID_HOSTNAME.xml or CONTEXT_NAME.xml)

ii) adstpall.sh
Master script to stop all components/services of middle tier or application tier.

iii) adalnctl.sh
Script to start / stop apps listener (FNDFS and FNDFS). This listener will file will be in 10.1.2 ORACLE_HOME (i.e. Forms & Reports Home)
listener.ora file will be in $INST_TOP/apps/$CONTEXT_NAME/ora/10.1.2/network/admin directory
(Mostly similar to one in 11i with only change in ORACLE_HOME i.e. from 8.0.6 to 10.1.2 )

iv) adapcctl.sh
Script to start/stop Web Server or Oracle HTTP Server. This script uses opmn (Oracle Process Manager and Notification Server) with syntax similar to opmnctl [startstop]proc ohs
like opmnctl stopproc ohs .



(In 11i this script directly used to call apachectl executable but now calls opmnctl which in turn calls apachectl. In 11i web server oracle home was 1.0.2.2.2 but in R12 its 10.1.3)

v) adcmctl.sh
Script to start / stop concurrent manager, Similar to one in 11i. (This script in turn calls startmgr.sh )

vi) adformsctl.sh
Script to start / stop Forms OC4J from 10.1.3 Oracle_Home. This script will also use opmnctl to start/stop Forms OC4J like
opmnctl stopproc type=oc4j instancename=forms

vii) adformsrvctl.sh
This script is used only if you wish to start forms in socket mode. Default forms connect method in R12 is servlet.
If started this will start frmsrv executable from 10.1.2 Oracle_Home in Apps R12


viii) adoacorectl.sh
This script will start/stop oacore OC4J in 10.1.3 Oracle_Home. This scripts will also use opmnctl (similar to adapcctl & adformsctl) to start oacore instance of OC4J like
opmnctl startproc type=oc4j instancename=oacore

ix) adoafmctl.sh
This script will start/stop oafm OC4J in 10.1.3 Oracle_Home. This scripts will also use opmnctl (similar to above) to start oacore instance of OC4J like
opmnctl startproc type=oc4j instancename=oafm

x) adopmnctl.sh
This script will start/stop opmn service in 10.1.3 Oracle_Home. opmn will control all services in 10.1.3 Oracle_Home like web server or various oc4j instances. If any services are stopped abnormally opmn will/should start them automatically.

xi) jtffmctl.sh
This script will be used to start/stop one to one fulfilment server.

xii) mwactl.sh
To start / stop mwa telnet server where mwa is mobile application.


R12 - log files information
A. Startup/Shutdown Log files for Application Tier in R12

Instance Top is new TOP added in R12 (to read more click here)

–Startup/Shutdown error message text files like adapcctl.txt, adcmctl.txt…
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/admin/log

–Startup/Shutdown error message related to tech stack (10.1.2, 10.1.3 forms/reports/web)
$INST_TOP/apps/$CONTEXT_NAME/logs/ora/ (10.1.2 & 10.1.3)
$INST_TOP/apps/$CONTEXT_NAME/logs/ora/10.1.3/Apache/error_log[timestamp]
$INST_TOP/apps/$CONTEXT_NAME/logs/ora/10.1.3/opmn/ (OC4J~…, oa*, opmn.log)$INST_TOP/apps/$CONTEXT_NAME/logs/ora/10.1.2/network/ (listener log)
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/conc/log (CM log files)

B. Log files related to cloning in R12

Preclone log files in source instance
i) Database Tier - /$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/(StageDBTier_MMDDHHMM.log)

ii) Application Tier - $INST_TOP/apps/$CONTEXT_NAME/admin/log/ (StageAppsTier_MMDDHHMM.log)

Clone log files in target instance

Database Tier - $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTier_.log
Apps Tier - $INST_TOP/apps/$CONTEXT_NAME/admin/log/ApplyAppsTier_.log

—–
If your clone on DB Tier fails while running txkConfigDBOcm.pl (Check metalink note - 415020.1)
During clone step on DB Tier it prompts for “Target System base directory for source homes” and during this you have to give like /base_install_dir like ../../r12 and not oracle home like ../../r12/db/tech_st_10.2.0
—–

C. Patching related log files in R12

i) Application Tier adpatch log - $APPL_TOP/admin/$SID/log/
ii) Developer (Developer/Forms & Reports 10.1.2) Patch - $ORACLE_HOME/.patch_storage
iii) Web Server (Apache) patch - $IAS_ORACLE_HOME/.patch_storage
iv) Database Tier opatch log - $ORACLE_HOME/.patch_storage

D. Autoconfig related log files in R12
i) Database Tier Autoconfig log :
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDHHMM/adconfig.log
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDHHMM/NetServiceHandler.log

ii) Application Tier Autoconfig log - $INST_TOP/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log

Autoconfig context file location in R12 - $INST_TOP/apps/$CONTEXT_NAME/appl/admin/$CONTEXT_NAME.xml

E. Other log files in R12
1) Database Tier
1.1) Relink Log files :
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME /MMDDHHMM/ make_$MMDDHHMM.log

1.2) Alert Log Files :
$ORACLE_HOME/admin/$CONTEXT_NAME/bdump/alert_$SID.log

1.3) Network Logs :
$ORACLE_HOME/network/admin/$SID.log

1.4) OUI Logs :
OUI Inventory Logs :
$ORACLE_HOME/admin/oui/$CONTEXT_NAME/oraInventory/logs

2) Application Tier
$ORACLE_HOME/j2ee/DevSuite/log
$ORACLE_HOME/opmn/logs
$ORACLE_HOME/network/logs

Tech Stack Patch 10.1.3 (Web/HTTP Server)
$IAS_ORACLE_HOME/j2ee/forms/logs
$IAS_ORACLE_HOME/j2ee/oafm/logs
$IAS_ORACLE_HOME/j2ee/oacore/logs
$IAS_ORACLE_HOME/opmn/logs
$IAS_ORACLE_HOME/network/log
$INST_TOP/logs/ora/10.1.2
$INST_TOP/logs/ora/10.1.3
$INST_TOP/logs/appl/conc/log
$INST_TOP/logs/appl/admin/log


Instance Home Directory Structure

$INST_TOP/admin/scripts ($ADMIN_SCRIPTS_HOME): All AD scripts are located here
$INST_TOP/appl ($APPL_CONFIG_HOME) : For standalone envs, this is set to $APPL_TOP
$INST_TOP/appl/fnd/12.0.0/secure FND_SECURE: The dbc file is located here
$INST_TOP/appl/admin All the env config files are located here
$INST_TOP/certs SSL Certificates go here
$INST_TOP/logs LOG_HOME: Central log file location. All log files are placed here (except adconfig)
$INST_TOP/logs/ora ($ORA_CONFIG_HOME)
$INST_TOP/logs/ora/10.1.2 ‘C’ Oracle home config, Contains tnsnames and forms listener servlet config files
$INST_TOP/logs/ora/10.1.3 Apache & OC4J config home, Apache, OC4J and opmn. This is the ‘Java’ oracle home configuration for OPMN, Apache and OC4J
$INST_TOP/pids Apache/Forms server PID files are located here
$INST_TOP/portal Apache’s DocumentRoot folder


Admin node parameters
Provide the values required for creation of the new APPL_TOP Context file.

Target hostname (virtual or normal) [servername1]:

Target system database SID : TEST

Target system database server node [servername1] :

Target system base directory for source homes : /d01/oratst

Target system base directory for instance homes [/d01/oratst/inst] :

Target system service groups - Enable Root Service [disabled] :

Target system service groups - Enable Web Entry Point Services [disabled] :

Target system service groups - Enable Web Application Services [disabled] :

Target system service groups - Enable Batch Processing Services [enabled] :

Target system service groups - Enable Other Services [disabled] :

Do you want to preserve the Display set to cosxaor0k:0.0 (y/n) [y] ? :

Clone Context uses the same port pool mechanism as the Rapid Install.
Once you choose a port pool, Clone Context will validate the port availability.

Enter the port pool to be used for the target system node [0-99] :
1

Checking the port pool 1
done: Port Pool 1 is free
Report file located at /d01/oratst/inst/apps/TEST_servername1/admin/out/portpool.lst
Complete port information available at /d01/oratst/inst/apps/TEST_servername1/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /d01/oratst/inst/apps/TEST_servername1/appltmp
2. /usr/tmp
3. /d02/oratst/db/tech_st/10.2.0/appsutil/outbound/TEST_servername1
4. /d02/oratst/db/tech_st/10.2.0/appsutil/outbound/TEST_servername1
5. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 2


Web node parameters
Provide the values required for creation of the new APPL_TOP Context file.

Target hostname (virtual or normal) [servername1] :

Target system domain name : domainname

It is recommended that your inputs are validated by the program.
However you might choose not to validate your inputs under following circumstances:
-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.

Do you want the inputs to be validated (y/n) [n] ? : y

Target system service groups - Enable Root Service [disabled] : enabled

Target system service groups - Enable Web Entry Point Services [disabled] : enabled

Target system service groups - Enable Web Application Services [disabled] : enabled

Target system service groups - Enable Batch Processing Services [enabled] : disabled

Target system service groups - Enable Other Services [disabled] : enabled

Do you want to preserve the Display set to cosxaor0k:0.0 (y/n) [y] ? : n

Target system Display [servername1:0.0] :

RC-00217: Warning: Configuration home directory (s_config_home) evaluates to /d01/oratst/inst/apps/TEST_servername1. A directory with this name already exists and is not empty.

Do you want to continue (y/n) ? Type y to continue with current value of Configuration home. Type n to abort. : y
Database port is 1522

Do you want the the target system to have the same port values as the source system (y/n) [y] ? :
Complete port information available at /d01/oratst/apps/apps_st/comn/clone/bin/out/TEST_servername1/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /d01/oratst/inst/apps/TEST_servername1cosxaor0k/appltmp
2. /usr/tmp
3. /d02/oratst/db/tech_st/10.2.0/appsutil/outbound/TEST_servername1
4. /d02/oratst/db/tech_st/10.2.0/appsutil/outbound/TEST_servername1
5. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 2


Services
(new concept introduced in R12) define the set of processes that will be started on each application node. These services can be activated or deactivated on a specific application tier/node.


Type of Application Services
Application tier processes are broadlyclassified in to five type of Services

i) Root Service - Oracle Process Manager and Notification (OPMN) is part of Oracle Application Server 10G R2/R3. OPMN is used for inter process communication (between OC4J, HTTP Server), death detection and start/stop of Services for 10g R3.

ii) Web Entry Point Services - HTTP Server is part of Oracle Application Server 10G R3 and built on Apache (aka Oracle Apache. All web request to R12 first hit HTTP Server.

iii) Web Application Services - OACORE OC4J, Forms OC4J, OAFM OC4J - These are set of 3 OC4J (Oracle Container for J2EE) to run application.

iv) Batch Processing Services - This set of service consist of Apps Listener (FNDFS & FNDSM), Concurrent Manager, Fulfillment Server and Interaction Server

v) Other Services - Oracle Forms Service, Forms Metric Client/Server and Mobile Web Application (MWA)Service


Process—> Services –> StartupScript –>Context parameter
a) Oracle Process Manager - Root Service - adopmnctl.sh- s_root_status, s_opmnstatus
b) Oracle HTTP Server - Web Entry Point Service - adapcctl.sh- s_web_entry_status, s_oacorestatus
c) OACORE OC4J - Web Application Services - adoacorectl.sh- s_web_applications_status s_oacorectrl
d) FORMS OC4J - Web Application Services - adformsctl.sh- s_web_applications_status, s_formsstatus
e) OAFM OC4J - Web Application Services - adoafmctl.sh- s_web_applications_status, s_oafmstatus
f) Concurrent Manager - Batch Processing Service - adcmctl.sh- s_batch_status, s_concstatus
g) Apps Listener - Batch Processing Service - adalnctl.sh- s_batch_status, s_tnsstatus
h) Interaction Center (ICSM) - Batch Processing Service - ieoicsm.sh- s_batch_status, s_icsmctrl
i) Fulfillment Server - Batch Processing Service - jtffmctl.sh- s_batch_status, s_jtffsstatus
j) Forms Server - Other Service - adformsrvctl.sh- s_other_service_group_status , s_formsserver_status
k) Metric Client - Other Service - adfmcctl.sh- s_other_service_group_status , s_metcstatus
l) Metric Server - Other Service - adfmsctl.sh- s_other_service_group_status , s_metsstatus
m) Mobile Web Application (MWA) - Other Service - mwactlwrpr.sh- s_other_service_group_status , s_mwastatus


Important:
1) When you select Root services, Web Services are automatically selected i.e. First three Services Root, Web Entry Point and Web Application Services can only be enabled or disabled together.
If you want Web Entry Point Services, Web Application Services, and Root Services to be installed on different nodes then use autoconfig after installation.

2. In R12 with introduction of Services there is NO concept of Forms node or Web Node.

3. With default installation all services Root, Web Entry Point, Web Application Services, Batch Processing and Otherservices are enabled.

406558.1 Configuring Applications Node Services in Oracle Applications Release 12 (Metalink Note)
Chapter2 of "Oracle® Applications Installation Guide: Using Rapid Install Release 12" at http://download.oracle.com/docs/cd/B40089_10/current/acrobat/120oaig.pdf


JSP in R12
Here is the explaination why we need to compile jsp when ever we clear JCache.Here clearing JCache means removing class files from JSP pages which will be there under the directory called $COMMON_TOP/_pages.

So in Release 11i when ever we clear the JCache and after bouncing apache, new class files are created automatically when the JSP page is called from a browser session and JSP was rendered fine.
But incase of  Release 12 it's observed that when calling the JSP no class file is created in the diretciry $COMMON_TOP/_pages so we need to create it manually. We have an alternative method, but it is not recommended.

An alternative is to change the value for the main_mode parameter to recompile (instead of justrun)
This can be achieved with the following steps

Use the Context editor to change the value for "s_jsp_main_mode" in the .xml file used by autoconfig and change value from justrun to recompile
Run Autoconfig to propagate the changes to the configuration files
Verify that now the $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml  has
   
      
         main_mode
         recompile
      

   
Test the scenario failing before.
See that now a new _.class is created when the JSP page is called.
For production environment the manual 'ojspcompile.pl' method is recommended for the following reasons

With 'justrun' a fixed set of JSP is used which can not change due to maintenance actions. With 'recompile' the JSP pages replacing exsiting ones will recompile automatically while environment is up-and-running. This may lead to errors for the users when compilation fails or different version of the JSP being used within a single session.
Using 'justrun' skips the check if compilation is needed and therefor improves performance

Saturday, September 11, 2010

Datapump and export/import

Created user xxi and given necessaru priveliges.
And also created DIRECTORY=exp_dp_dir which is set to /d23/TEST/TEST_DVD_RESTORE/ICE. ( reqires for datapump)

Dmp files under /d23/TEST/TEST_DVD_RESTORE/ICE have been imported using data pump utility as below.


impdp system/xxx DIRECTORY=exp_dp_dir DUMPFILE=IGL_POS852_D012DMP.dmp logfile=imp_IGL_POS852_D012DMP.log REMAP_SCHEMA=xxi:xxz REMAP_TABLESPACE=APPS_TS_TX_DATA:USERS,APPS_TS_TX_IDX:USERS

impdp system/xxx DIRECTORY=exp_dp_dir DUMPFILE=IGL_POS852_D010DMP.dmp logfile=imp_IGL_POS852_D010DMP.log REMAP_SCHEMA=xxi:xxz REMAP_TABLESPACE=APPS_TS_TX_DATA:USERS,APPS_TS_TX_IDX:USERS

impdp system/xxx DIRECTORY=exp_dp_dir DUMPFILE=IGL_POS852_D001DMP.dmp logfile=imp_IGL_POS852_D001DMP.log REMAP_SCHEMA=xxi:xxz REMAP_TABLESPACE=APPS_TS_TX_DATA:USERS,APPS_TS_TX_IDX:USERS

impdp system/xxx DIRECTORY=exp_dp_dir DUMPFILE=IGL_POS852_H001.dmp logfile=imp_IGL_POS852_H001.log REMAP_SCHEMA=xxi:xxz REMAP_TABLESPACE=APPS_TS_TX_DATA:USERS,APPS_TS_TX_IDX:USERS


Dmp files under /d23/TEST/TEST_DVD_RESTORE/LEG have to be imported using imp utility.

Using below command,objects from WMS_LABEL_REQUESTS_HIST_WIP.dmp file have been imported.

$ imp userid=system/WEMXzX2X file=WMS_LABEL_REQUESTS_HIST_WIP.dmp log=imp_WMS_LABEL_REQUESTS_HIST.log fromuser=wms touser=xxz

one more eg:
"SQL> create or replace directory expdp_vrtx_dir as '/d01/VERTEXBKP/DUMPBKP';

Directory created.

SQL> grant read,write on directory expdp_vrtx_dir to system;

Grant succeeded.

$ expdp system/xxx DIRECTORY=expdp_vrtx_dir DUMPFILE=vertexo_expdp.dmp logfile=vertexo_expdp.log SCHEMAS=VERTEXO

Restore/Import VERTEXO schema
Note: VERTEXO schema will be imported only if its not there in SOURCE instance.
No need to import if below query returns rows in TARGET instance.
sqlplus ""/ as sysdba""
select object_type,count(*) from dba_objects where owner='VERTEXO'
GROUP BY OBJECT_TYPE;

OBJECT_TYPE COUNT(*)
------------------- ----------
SEQUENCE 12
TRIGGER 12
TABLE 325
INDEX 535
VIEW 7

Perform below steps to import VERTEXO schema only if no rows returned in above output.
$ sqlplus ""/as sysdba""

SQL> create or replace directory expdp_vrtx_dir as '/d01/VERTEXBKP/DUMPBKP';
Directory created.

SQL> grant read,write on directory expdp_vrtx_dir to system;

Grant succeeded.

CREATE TABLESPACE vertex_data datafile '/d03/ptch/db/apps_st/data/xxvertex_data01.dbf' SIZE 1000m
AUTOEXTEND ON
NEXT 500m
MAXSIZE 4096m;

CREATE TABLESPACE vertex_idx datafile '/d03/patch/db/apps_st/data/xxvertex_ind01.dbf' SIZE 1000m
AUTOEXTEND ON
NEXT 500m
MAXSIZE 4096m;
exit

# cd /d01/VERTEXBKP/DUMPBKP
impdp system/systempasswd directory=expdp_vrtx_dir dumpfile=vertexo_expdp.dmp SCHEMAS=VERTEXO



EXP/IMP examples:

exp eg:
$ exp transport_tablespace=y tablespaces=XXJDE_TS_DATA, XXJDE_TS_INDEX triggers=y constraints=y grants=y file=XXJDE.dmp log=XXJDE.log

exp and imp eg:
# more expLPSReviewTables.par
# Export of LPS Employee Review tables for support transition.
#
# Perform ""export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15"" prior to running.
#
# 20100603 BKWilson Recreated export After changing VARCHAR2(4000) columns
# into CLOB columns.
#
userid=fismim
FILE=exportLPSReviewTables.dmp
FULL=n
COMPRESS=N
GRANTS=N
INDEXES=N
CONSTRAINTS=N
CONSISTENT=Y
ROWS=Y
STATISTICS=NONE
TABLES=(FIS_MIM_RV_CONTROL,
FIS_MIM_RV_EMPL,
FIS_MIM_RV_OBJ,
FIS_MIM_RV_OBJ_TYPE,
FIS_MIM_RV_OBJ_NBR,
FIS_MIM_RV_RATING_TBL)
LOG=exportLPSReviewTables.log"
"$ more impReviewTable.par_bkp
# Import a FISMIM Review table into SYSADM schema as a test.
#
# ""export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15"", prior to running.
#
# 20100601 BKWilson Re-executed test with CLOB columns.
#
userid=mim
full=n
tables=(FIS_MIM_RV_CONTROL,FIS_MIM_RV_EMPL,FIS_MIM_RV_OBJ,FIS_MIM_RV_OBJ_TYPE,FIS_MIM_RV_OBJ_NBR,FIS_MIM_RV_RATING_TBL)
ignore=y
commit=y
statistics=none
buffer=50000000
file=exportLPSReviewTables.dmp
log=importLPSReviewTables.log"


to grant all privileges for all tables of a schema to another schema: SQL> begin
2 for i in (select distinct table_name from all_tables where owner='MIM')
3 loop
4 execute immediate 'grant all on '||i.table_name||' to apps';
5 end loop;
6 end;
7 /

PL/SQL procedure successfully completed."

Exporting a table and importing which belongs to apps schema

exp USERID=apps/apps file=CLX_value_set_update_temp_exp.dmp GRANTS=Y TABLE=CLX_VALUE_SET_UPDATE_TEMP

imp apps/st4ng file=CLX_value_set_update_temp_exp.dmp fromuser=apps touser=apps TABLES=CLX_VALUE_SET_UPDATE_TEMP

$ imp system/PcT3X45K FILE=expdat.dmp FULL=Y log=poimp.log

"Take export dump of concurrent tables
exp userid=applsys/qatapps09 file=conc.dmp log=exp.log
tables=FND_CONCURRENT_QUEUES,FND_CONCURRENT_QUEUES_TL,
FND_CONCURRENT_QUEUE_SIZE, FND_CONCURRENT_QUEUE_CONTENT



imp system/manager file=/d12/oradev/mine/XX_CASTLE.dmp fromuser=XX_CASTLE touser=XX_CASTLE log=XX_CASTLE_imp.log

imp sys/manager file=xxtm1.dmp fromuser=XXTM1 touser=XXTM1 log=xxtm1.imp.log

exp userid=system/password file=schema_name.dmp log=logfile owner=required schema

eg: How to Export a schema like MSDEM

exp userid=system/(passwd) file=msdem_CRP2.dmp log=msdem_CRP2.log direct=y feedback=1000 owner=MSDEM
exp " '/ as sysdba' " file=$REFRESH/msdem_CRP2.dmp log=$REFRESH/msdem_CRP2.log direct=y feedback=1000 owner=MSDEM

Application server

Start/Stop 10g AS

0g AS architecture consist of
infrastructure Services (Database & Identity Management)
&
Middle tier Services (Portal & Wireless or BI & Forms)
[j2ee & webcache type (which is third middle tier Installation type)]

Startup Sequence

--Start Database Listener
-- Start Database
-- Start Infrastructure Services
-- Start Middle Tier Services

Shutdown Sequence
-- Shutdown Middle Tier Services
-- Shutdown Infrastructure Services
-- Stop Database
-- Stop database listener

What utility I should use to startup / shutdown (Bouncing) for 10g AS ?
You can use iasconsole (Browser based console listening in default port 1156) to startup shutdown services
You can also use opmnctl ; command line tool (Oracle Process Management & Notification) control to startup shutdown services

dcmctl utility to start/stop services is now deprecated & should not be used

Startup
Start listener as - lsnrctl start [listener_name]
Start Database as - sqlplus ""/as sysdba""; SQL> startup
Start Infrastructure Services as - opmnctl startall (Make sure your are in Infra Home)
Start Middle Tier Services as - opmnctl startall (Make sure your are in Middle Tier Home)

Shutdown
Stop Middle Tier Services as - opmnctl stopall (Make sure your are in Middle Tier Home)
Stop Infrastructure Services as - opmnctl stopall (Make sure your are in Infra Home)
Stop Database as - sqlplus ""/as sysdba""; SQL> shutdown immediate
Stop listener as - lsnrctl stop [listener_name]

How to start/stop iasconsole ?
you can start/stop services using iasconsole but before that you have to start / stop iasconsole itself which you can do by emctl (em - enterprise manager)

emctl start iasconsole
emctl stop iasconsole

You can access ias console screen from browser by url
http://host.domain:em_port/emd (Default em port is 1156)
http://host.domain:1156/emd (This will prompt username password , use ias_admin)

How to start individual component ?
Step mentioned above are to stop/start all components in Middle Tier or Infrastructure Tier , what if I want to start/stop/restart only few components of a Tier ? You will use

opmnctl [startproc stopproc restartproc] ias-component=[component_name]
or
opmnctl [startproc stopproc restartproc] process-type=[process_name]

Where Component Name like - OC4J, OID, HTTP_Server, WebCache and
Process Type like - WebCacheAdmin, OC4J_Portal, OC4J_Security


How to start / stop webcache ?
To start/stop webcache with 10g AS, use
opmnctl startproc/stopproc ias-component=WebCache
For standalone J2ee & Webcache Installation use
webcachectl start/stop

How to troubleshoot Webcache Issues ?
Webcache logs are at $ORACLE_HOME/logs event_logs & access_log , all issues errors are recorded in event_logs so check this file any issues related to Webcache

OID
If you don't know which ports your OID is using refer
portlist.ini in $ORACLE_HOME/install (Note that this file will not list updated port if you change OID ports after Installation)
You should an entry like
Oracle Internet Directory port = 389
Oracle Internet Directory (SSL) port = 636


How to start OID ?
OID process is controlled by opmn (Oracle process monitor & notification server) so you by default use opmnctl command
To Start OID opmnctl startproc ias-component=OID
To Stop OID opmnctl stopproc ias-component=OID

OID can also be started without OPMN by
First start oidmon (OID Monitor Process)
Then use oidctl (OID control)
To stop OID without OPMN
First stop oid process using oidctl then stop oidmon (OID monitoring process)

When you start services using opmnctl , it inturn start oidmon & oidctl


SSO login URL
User can login to E-Business Suite Locally (NO SSO, directly from FND_USER) or to SSO (authentication via SSO) or BOTH. Set profile option "Applications SSO Login Types" to LOCAL or BOTH at userlevel and use
http(s)://(hostname).(domainname):(port)/ OA_HTML/ AppsLocalLogin.jsp
For SSO authentication use URL
http(s)://(hostname).(domainname):(port)/oa_servlets/AppsLogin

10g as version:
/d01/oradev/OraHomeAS/config
"$ grep -i version ias.properties
Version=10.1.2.2.0


Discoverer values setup in context file
1. Check the following are set

oa_disco_server>
disco_portrange oa_var="s_disco_servlet_portrange" oa_type="PORT">17011-17020
disco_ver_comma oa_var="s_disco_ver_comma">10,1,2
oem_web_port oa_var="s_oemweb_port" oa_type="PORT">10307
osagent_port oa_var="s_osagent_port" oa_type="PORT">10308
disco_nprocs oa_var="s_disco_nprocs" osd="Linux">0
disco_eul_prefix oa_var="s_disco_eul_prefix">EUL5
disco_node_weight oa_var="s_disco_node_weight" osd="Linux">0
discoinstancename oa_var="s_discoinstanc">hostname.domainname_10315
disco_standalone oa_var="s_disco_standalone">true
disco_protocol oa_var="s_disco_protocol">http
disco_machine oa_var="s_disco_machine">discovererhostname.domainname
disco_port oa_var="s_disco_port" oa_type="PORT">7778
disco_ipaddress oa_var="s_disco_ip_addr">"xxx.xx.xx.xxx"
disco_ORBalwaysProxy oa_var="s_disco_ORBalwaysProxy">no
disco_jretop oa_var="s_disco_jretop" osd="Linux">/d01/oravis/visora/806/jre1183o
disco_jvm_options oa_var="s_disco_jvm_options" osd="unix"/>
disco_oad_executable oa_var="s_disco_oad_executable">oad
oa_disco_server>

appserverid_authentication oa_var="s_appserverid_authentication">OFF

Run autoconfig.

Check the following profile options

ICX: Discoverer Launcher http://discovererhostname.domainname:7778/discoverer/plus?Connect=[APPS_SECURE]
ICX: Discoverer Parameters ICX: Discoverer Release 10
ICX: Discoverer Viewer Launcher http://discovererhostname.domainname:7778/discoverer/viewer?Connect=[APPS_SECURE]
ICX: Discoverer use Viewer Yes


To check current Oracle Application Server Patchset version i.e. if 10.1.3.0 or 10.1.3.1 or 10.1.3.2
a) Using runInstaller
–Invoke runInstaller from 1013_ORACLE_HOME/oui/bin
–Click on Installed Products.
–Select the 10.1.3 Oracle Home and expand the tree. You should see Oracle Application Server Patchset 10.1.3.X patch in the list.

b) Using Opatch
Run the command ‘opatch lsinventory -detail‘
Look for ‘Oracle Application Server PatchSet‘ in the ‘Product‘ column.


OC4JADMIN password.
If your source oracle home version is 10.1.3.0 then password for oc4jadmin is secret else (for 10.1.3.1/2/3) password is oafm

To know 10g discoverer version
To get the existing version name of Discoverer Server on Unix, go to $ORACLE_HOME/bin and run the command:
strings -a dis51ws | grep ""Discoverer Version:""
Otherwise you can start Discoverer Plus/Viewer and check the version.


To unlock ias_admina nd orcladmin a/c ---> 280116.1
Just go to the directory

$ORACLE_HOME/sysman/j2ee/conf. In this directory you'll find the configuration file

jazn-data.xml. Inside this configuration file you'll find the definition of the

ias_admin user including his encrypted password:

* snippet from jazn-data.xml

...

ias_admin
{903}YdvTMA...


Inside the tag you see the encrypted password of the ias_admin. To reset the password, just change the value inside the tag as follows:

snippet from jazn-data.xml

...

ias_admin
!mynewpassword1


The new password you have to provide in clear text has to start with a ""!"". Be aware that the new password must match the password rules: minimum 6 signs and one sign must be a number. After your changes, stop the ASC and restart it with following commands:

* emctl stop iasconsole
* emctl start iasconsole

Now you can login with your new password and inside the jazn-data.xml the provided
password in clear text is automatically changed into an encrypted password.


for orcladmin
How to Unlock/Reset Super User cn=orcladmin When the ODS's Password Has Been Forgotten or is Unknown? [ID 472752.1]
Unlocked the orcladmin account using following command.
oidpasswd connect=dtst unlock_su_acct=true

check if orcladmin account is locked. Use the following command to check if account is locked.
$ORACLE_HOME/bin/ldapbind -p 389 -D cn=orcladmin -w welcome1

OC4jADMIN password reset
466246.1 How To Reset The Password Of The oc4jadmin Account For Enterprise Manager
576587.1 How to change the OC4Jadmin Password
556031.1 How To Have The Password In Clear Text In Jazn-data.xml?
403678.1 How To Change The Passwords For BPELADMIN / OC4JADMIN / SOA Suite

http://download.oracle.com/docs/cd/B25221_04/core.1013/b25209/trouble_asc.htm#BCEDHFEI
http://onlineappsdba.com/index.php/2008/06/03/changereset-oc4jadmin-password/


Rotating oc4j and opmn log on SOA nodes

The below changes has to be made in opmn.xml file.

a. The below tag has to be added as a part of the start-parameters category id for ias component SOA_GROUP and for process type OC4J_SOA.
( In our case we can find it at line
data id=""oc4j-options"" value=""-out /d11/oraias/prodias/10.1.3/opmn/logs/mylog.out -err /oracle/101202J2EE/opmn/logs/mylog.err"" />

b.Change the line
log path=""$ORACLE_HOME/opmn/logs/opmn.log"" comp=""internal;ons;pm""
rotation-size=""1500000"" to
log path=""$ORACLE_HOME/opmn/logs/opmn.log"" comp=""internal;ons;pm""
rotation-hour=""0""

2. opmnctl stopall
3. backup of the log files.
4. opmnctl startall