Friday, March 14, 2008

How to find which is the latest patch applied ?

select * from ( select patch_name,creation_date from ad_applied_patches order by creation_date desc ) where rownum <2

Friday, March 7, 2008

How to know what is the version of Unix,machine Name, Processor info etc

On HP unix -> uname -r

on Linux cat /proc/version

If you want to know if its RISC based processor or Intexl X-86 processor then file /stand/vmunix On HP-ux -> /stand/vmunix: PA-RISC1.1 executable -not stripped On Linux -> cat /proc/cpuinfo For futher information cd /proc and do a ls you will good source of information about system settings like memory , cpu , swapsize, version, uptime, etc info.


For more details check man uname on that unix box


When you execute the command uname -a, it produces output like the following:
HP-UX myhost A.09.01 C 9000/750 2015986034 32-user license
The displayed fields are interpreted as follows:
HP-UX The operating system name (option -s).
myhost The UUCP network system name by which the system is known (-n).
B.11.00 The operating system release identifier (-r).
A The operating system version identifier (-v).
9000/889 The machine and model numbers (-m).
2015986034 The machine identification number (-i).
32-user license The operating system license level (-l).

How to know if unix is 32 bit or 64 bit

getconf KERNEL_BITS

Thursday, March 6, 2008

Quick Unix commands Reference

Visit this URL for cross sections of various unix commands

http://www.unixguide.net/unixguide.shtml

R12 architecture

R12 Architecture
----------------


In this post I am going to cover R12 architecture. Discernible change from its predecessors is INST_TOP.

R12 file system has come up with new model - Code, Data, Configurations are segregated nicely to have easy maintenance, to avert NFS mount issues on shared appltier configuration systems. Autoconfig will not write anything in appltop, commontop area in R12. All instance specific configurations, log files are written in INST_TOP area. Instance Home provides the ability to share Applications and technology stack code among multiple instances. I have highlighted the INST_TOP in the box. In the forthcoming posts I will clearly explain the in depth of INST_TOP(As a DBA you will spend much time in INST_TOP area when you comes to application tier node management ( e.g checking logs, starting/stopping services, ssl certificates management, CONTEXT_FILE modification etc.)

Techstack Components:

DB_TIER:
10.2.0.2 RDBMS ORACLE_HOME

APPL-TIER

10.1.2 C ORACLE_HOME / FORMS ORACLE_HOME (8.0.6 ORACLE HOME equivalence)
10.1.3 Java ORACLE_HOME/OC4J ORACLE_HOME (iAS ORACLE_HOME equivalence)

INST_TOP
---------

I have briefed R12 architecture in my last post( R12 architecture ).
I described that INST_TOP is the most descernible changes that R12 is having from its predecessors. I am going to cover INST_TOP here.

INST TOP directory:

(applmgr) - ls
admin/ appl/ certs/ logs/ ora/ out/ pids/ portal/ rgf/
(applmgr) -

The Whys and wherefores:

You may get a question why is the change??

There is a need to separate

Code
Data
Config

to ease maintenance of the system. To avoid NFS/MUTEX related issues. Above issue will get resolved if the configuration/lcck files are stored in local system. Another advantage is to gain performance accessing local file system is better than NFS file system.

This directory $INST_TOP got introduced newly in R12. Instance top contains all the config files, log files, ssl certificates, document root etc. Addition of this directory makes the middle-tier more organised, since data is kept separate from config/log files. Another advantage is that, multiple instances can easily share the same middle tier. To create a new instance that shares an existing middle-tier, just create a new instance_top with proper config files and NFS mount the middle tier in the server.


$INST_TOP: APPS_BASE/inst/apps/CONTEXT_NAME/

/admin



/scripts

ADMIN_SCRIPTS_HOME: Find all AD scripts here

/appl

APPL_CONFIG_HOME. For standalone envs, this is set to $APPL_TOP

/fnd/12.0.0/secure

FND_SECURE: dbc files here

/admin

All Env Config files here

/certs

SSL Certificates go here

/logs

LOG_HOME: Central log file location. All log files are placed here (except adconfig)

/ora

ORA_CONFIG_HOME

/10.1.2

'C' Oracle home config, Contains tnsnames and forms listener servlet config files

/10.1.3

Apache & OC4J config home, Apache, OC4J and opmn
This is the 'Java' oracle home configuration for OPMN, Apache and OC4J

/pids

Apache/Forms server PID files here

/portal

Apache's DocumentRoot folder

AD Scripts
------------


$ADMIN_SCRIPTS_HOME: $INST_TOP/admin/scripts
adautocfg.sh
run autoconfig
adstpall.sh
stop all services
adstrtal.sh
start all services
adapcctl.sh
start/stop/status Apache only
adformsctl.sh
start/stop/status OC4J Forms
adoacorectl.sh
start/stop/status OC4J oacore
adopmnctl.sh
start/stop/status opmn
adalnctl.sh
start/stop RPC listeners (FNDFS/FNDSM)
adcmctl.sh
start/stop Concurrent Manager
gsmstart.sh
start/stop FNDSM
jtffmctl.sh
start/stop Fulfillment Server
adpreclone.pl
Cloning preparation script
adoafmctl.sh adoafmctl.sh to start/stop/status OC4J oafm
(webservice, mapviewer)
adexecsql.pl
Execute sql scripts that update the profiles in an AutoConfig run
java.sh
Call java executable with additional args, (used by opmn, Conc. Mgr)



Log Files
-------------

Location of various log files
AD Script log files (adapcctl.sh,...)
$INST_TOP/logs/appl/admin/log
CM Log Files ($APPLCSF/$APPLLOG)
$INST_TOP/logs/appl/conc/log
AD tools log files (adpatch, ...)
$APPL_CONFIG_HOME/admin/$TWO_TASK/log
OPMN Log Files (Text & ODL)
$INST_TOP/logs/ora/10.1.3/opmn
Apache Log Files (Text & ODL)
$INST_TOP/logs/ora/10.1.3/Apache
OC4J Log Files (Text)
$INST_TOP/logs/ora/10.1.3/j2ee/oacore/
OC4J Log Files (ODL)
$INST_TOP/logs/ora/10.1.3/j2ee/oacore/log/oacore_default_group_1/oc4j


Certificates
------------------

$INST_TOP/certs

/Apache/ewallet.p12

/opmn/cwallet.sso

/opmn/ewallet.p12

certs is the default directory for SSL or any other certificate files
used by this instance. To use a centrally staged certificate, change
the appropriate context file and run autoconfig

Wednesday, March 5, 2008

Oracle R12 log file ( Patch logs, Clone logs etc )

A. Startup and Shutdown log files

Instance Top is new TOP added in R12

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_

—–
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

Of Versions and Figuring Them Out

  • Oracle Applications Components
  • Oracle Database Components
  • Operating System and Utilities
Oracle Applications Components

Oracle Applications version.
You may never need this but in case you are looking at a new environment then the simplest way to figure out your application version is by navigating to
Help-> About Oracle Applications from any of the forms sessions.

Version of a Oracle Applications Form (fmx) or report
To find the version of any oracle applications files
strings -a ICQTYED.fmx | grep Header
alternatively you can also use the adident command

Version of a Java class File
To find the version of a java class file
$ strings | grep '$Header'

JDBC version
In your middle tier, edit the jserv.properties file located in the iAS_ ORACLE_HOME/Apache/Jserv/etc directory
- Locate the wrapper.classpath that is pointing to the jdbc zip file
/u01/applsam/samcomn/java/jdbc14.zip

How to find the Apache version?
Go to the $iAS/Apache/Apache/bin directory and enter the following command:
$ httpd -version

Version Of The OA Framework
To find out the version of your Oracle appplication Framework
http://[host].[domain]:[portnumber]/OA_HTML/OAInfo.jsp
OA Framework Version Information
OA Framework Version 11.5.10.2CU.
MDS Version 9.0.5.4.81 (build 481)
UIX Version 2.2.18
BC4J Version 9.0.3.13.51

Oracle Application Product Version or Patch Set Level.
One of the most common things you will asked by your support engineer is the version or commonly known as the patch set level of your Oracle Applications product, while or after raising your service request. You can query this by logging on to your application database as the apss user.
select patch_level from fnd_product_installations where patch_level like '%AD%';

OJSP Version
Log in to the application server as the applmgr user
cd $OA_HTML
edit the jtflogin.jsp file to add the following line
OJSP Version: <%= application.getAttribute("oracle.jsp.versionNumber") %>
clear your cache and bounce your apache server
soruce the jtflogin.jsp from your browser
http://hcslnx03.satyam.com:8002/OA_HTML/jtflogin.jsp
OJSP Version: 1.1.3.5.2

XML Parser Version
You can find out the version of your XML Parser using the following query
SQL> select WF_EVENT_XML.XMLVersion() XML_VERSION
2 from sys.dual;
XML_VERSION
--------------------------------------------------------------------------------
Oracle XDK Java 9.0.4.0.0 Production

XML Publisher Version
To check weather XML publisher is installed or not you can query the FND_PRODUCT_INSTALLATIONS table or you can lookup the
reports in Oracle Applications Manager. You can find out the version for your XML publisher from the output of your report or from MetaInfo.class file.
$OA_JAVA/oracle/apps/xdo/common/MetaInfo.class.

WorkFlow Version
You can find out the version of your workflow using the following query
SQL> select TEXT Version from WF_RESOURCES
2 where TYPE = 'WFTKN' and NAME = 'WF_VERSION';
VERSION
--------------------------------------------------------------------------------
2.6.0

Oracle Database Components

Oracle RDBMS Version
You can query the version of your database user the dynamic view V$VERSION
SQL> SELECT * FROM V$VERSION;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for Solaris: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production

Version of OPATCH
$ perl $ORACLE_HOME/OPatch/opatch.pl version
/oracle/product/v9.2.0.6_doeb10s/OPatch/opatch.pl version: 1.0.0.0.51

Listener Version
$ lsnrctl version
LSNRCTL for Solaris: Version 9.2.0.6.0 - Production on 06-JUL-2007 09:34:53
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=samsolx)(PORT=1527))
TNSLSNR for Solaris: Version 9.2.0.6.0 - Production
TNS for Solaris: Version 9.2.0.6.0 - Production
Unix Domain Socket IPC NT Protocol Adaptor for Solaris: Version 9.2.0.6.0 - Production
Oracle Bequeath NT Protocol Adapter for Solaris: Version 9.2.0.6.0 - Production
TCP/IP NT Protocol Adapter for Solaris: Version 9.2.0.6.0 - Production,,
The command completed successfully

Operating Systems and Utilities

Sun Solaris Version
To check the version of you Solaris you can use the following file.
$ cat /etc/release
Solaris 8 2/02 Fujitsu_3 s28s_u7fjsv3wos_04 SPARC
Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
Assembled 08 December 2002

RedHat Linux Version
You can check the version and release of Linux from the following file
view /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

Perl Version
You can use the perl -v or the perl - version command to find out the version of perl on your environment.
$ perl -version
This is perl, version 5.005_03 built for sun4-solaris
Copyright 1987-1999, Larry Wall

Java Version
To fine the version of Java used
$ java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

Version of Installed packages on Solaris
To find the version of the packages on Solaris
$ pkginfo -i|grep perl
application MCperl584 PERL 5.8.4 with Modules 64bit with Threads
optional VRTSperl Perl 5.8.6 for VERITAS

Version of Installed packages on Linux
To find the version of the packages on linux
rpm -qa|grep

Kernel Version of Unix
You can find the version of your kernel on UNIX by the following command
uname -a

Bit of Operating System
You can check the bit size of your OS by using the following command
$ isainfo -b
64

Bit of your Oracle Software
To check if your Oracle Binary is 32 bit or 64 bit you can use the file command on any of the oracle executables like
$ file $ORACLE_HOME/bin/oracle
/oracle/product/v9.2.0.6_doeb10s/bin/oracle: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped

Monday, March 3, 2008

How to find Oracle Apps Version

SQL> select RELEASE_NAME from fnd_product_groups;
You should see output like
RELEASE_NAME
-----------------------
11.5.10.2

Which means you are on Apps Version 11.5.10.2