Tuesday, January 29, 2008

Clone and AutoConfig log files location in Oracle E-Business Suite Release 12

Where the logs for the adpreclone.pl are located?

On the database tier:
RDBMS $ORACLE_HOME/appsutil/log//StageDBTier_.log

On the application tier:
$INST_TOP/admin/log/StageAppsTier_.log

Where the logs for the admkappsutil.pl are located?

On the application tier:
$INST_TOP/admin/log/MakeAppsUtil_.log

Where is the logs for the adcfgclone.pl are located?

On the database tier:
RDBMS $ORACLE_HOME/appsutil/log//ApplyDBTier_.log

On the application tier:
$INST_TOP/admin/log/ApplyAppsTier_.log

Where the logs for the adconfig are located?

On the database tier:
RDBMS $ORACLE_HOME/appsutil/log///adconfig.log
RDBMS $ORACLE_HOME/appsutil/log///NetServiceHandler.log

On the application tier:
$INST_TOP/admin/log//adconfig.log
$INST_TOP/admin/log//NetServiceHandler.log

How to get the current Patchset level of Oracle Applications products in R12 ?

1) Login to OAM

(Responsibility "Oracle Applications Manager", menu "OAM Support Cart")

and Navigate: Support Cart -> Applications Signature -> Collect -> Check "Product Information" box -> Click on "View" (eyeglasses)

This will display the following patchset information :

Application Name
Current Patch Level
Product Version
Status (Installed, Shared Product, Inactive)

2) The patchset level information can be retrieved directly via sqlplus with the following diagnostic script :

$AD_TOP/sql/adutconf.sql

Wednesday, November 14, 2007

How to check if a certain Patch was applied to Oracle Applications instance using 'adpatch'?

There are few methods to check this.

Method 1

Check Patches applied in Oracle Applications Manager (OAM).

a) Connect to OAM:

http://hostname.domain:PORT/servlets/weboam/oam/oamLogin

Go to Site Map-->Maintenance-->Applied Patches

Enter Patch ID and press 'Go'

See if Patch was returned.

Method 2


Use 'adphrept' utility

Patch History report usage:

adphrept query_depth \
bug_number or ALL \
bug_product or ALL \
end_date_from (mm/dd/rr or ALL) \
end_date_to (mm/dd/rr or ALL) \
patchname/ALL \
patchtype/ALL \
level/ALL \
language/ALL \
appltop/ALL \
limit to forms server? (Y/N) \
limit to web server? (Y/N) \
limit to node server? (Y/N) \
limit to admin server? (Y/N) \
only patches that change DB? (Y/N)

Specify 1 or 2 or 3 for query_depth

1-> Details of patches only
2-> Details of patches and their Bug Fixes only
3-> Details of patches their Bug Fixes and Bug Actions

Example: To get the complete patch details for patches applied in Dec 2000:

On UNIX:

$ cd $AD_TOP/patch/115/sql
$ sqlplus /
SQL> @adphrept.sql 3 ALL ALL 12/01/00 12/31/00 ALL ALL ALL ALL ALL N N N N N

Method 3

Use the following sql.

set serveroutput on
DECLARE
TYPE p_patch_array_type is varray(10) of varchar2(10);
--
p_patchlist p_patch_array_type;
p_appltop_name varchar2(50);
p_patch_status varchar2(15);
p_appl_top_id number;
--
CURSOR alist IS
select appl_top_id, name
from ad_appl_tops;
--
procedure println(msg in varchar2)
is
begin
dbms_output.put_line(msg);
end;
--
BEGIN
open alist;
--
p_patchlist:= p_patch_array_type('','');
--
LOOP
FETCH alist INTO p_appl_top_id,p_appltop_name;
EXIT WHEN alist%NOTFOUND;
--
IF p_appltop_name NOT IN ('GLOBAL','*PRESEEDED*')
THEN
println(p_appltop_name || ':');
for i in 1..p_patchlist.count
loop
p_patch_status := ad_patch.is_patch_applied('11i',p_appl_top_id,
p_patchlist(i));
println('..Patch ' || p_patchlist(i) || ' was ' || p_patch_status);
end loop;
END if;
println('.');
END LOOP;
--
close alist;
END;
/

Note: Please enter Patch number in place of and , e.g '3240000'

Example Output

when p_patchlist:= p_patch_array_type('3240000','3460000','4204335','4125550','3942483','4733943'):

..Patch 3240000 was NOT_APPLIED
..Patch 3460000 was EXPLICIT
..Patch 4204335 was NOT_APPLIED
..Patch 4125550 was EXPLICIT
..Patch 3942483 was EXPLICIT
..Patch 4733943 was EXPLICIT
.
dcollierpc8:
..Patch 3240000 was NOT_APPLIED
..Patch 3460000 was EXPLICIT
..Patch 4204335 was NOT_APPLIED
..Patch 4125550 was EXPLICIT
..Patch 3942483 was NOT_APPLIED
..Patch 4733943 was NOT_APPLIED

Method 4

You might also use the following query, however the most reliable methods are the described above.

SQL> SELECT DISTINCT RPAD(a.bug_number,
11)|| RPAD(e.patch_name,
11)|| RPAD(TRUNC(c.end_date),
12)|| RPAD(b.applied_flag, 4) BUG_APPLIED
FROM
ad_bugs a,
ad_patch_run_bugs b,
ad_patch_runs c,
ad_patch_drivers d ,
ad_applied_patches e
WHERE
a.bug_id = b.bug_id AND
b.patch_run_id = c.patch_run_id AND
c.patch_driver_id = d.patch_driver_id AND
d.applied_patch_id = e.applied_patch_id AND
a.bug_number in ('','');
ORDER BY 1 DESC;


Note: Please enter Patch number in place of and , e.g '3453499'

Wednesday, November 7, 2007

Check Versions of Oracle Applications Components

Version of Oracle Applications

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.

Or

Connect as apps user
select release_name from apps.fnd_product_Groups;

Version of Applications Forms (fmb,fmx) or reports (rdf)

To find the version of any oracle applications files
strings -a ICQTYED.fmx | grep Header

Alternatively you can also use the adident command
adident Header ICQTYED.fmx

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

Version of JDBC

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/oracle/viscomn/java/jdbc14.zip

Or
http://.:port/OA_HTML/jsp/fnd/aoljtest.jsp
Look for String ” JDBC driver version” under Connection String

Version of Apache
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
Option 1
http://.:port/OA_HTML/OAInfo.jsp

Option 2
adident Header %FND_TOP%/html/OA.jsp
adident Header %OA_HTML%/OA.jsp

Note: OA.jsp should be of the same version in both the places

Version of Application Product 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 apps user.

select patch_level from fnd_product_installations where patch_level like '%AD%';

Version of Discoverer

cd $APPL_TOP/admin
grep -I s_disco_ver_comma **xml

Version of OJSP

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://vis.oneapps.com:8000/OA_HTML/jtflogin.jsp
OJSP Version: 1.1.3.5.2

Version of JSP

Log on to your HTTP Server node, and change to the OA_HTML directory.
Using a text editor, create a file called test.jsp with only the following line:
<%= application.getAttribute("oracle.jsp.versionNumber") %>

Access this JSP from a web browser, using the URL:
http://[your web server]:[your port]/OA_HTML/test.jsp

Version of Portal
select fnd_oracle_schema.getouvalue(’PORTAL’) from dual;

FND_ORACLE_SCHEMA.GETOUVALUE(’PORTAL’)
——————————————————————————–
PORTAL30 <= to retrieve the portal user

select version from PORTAL30.wwc_version$;

VERSION
——————————————————————————–
3.0.9.8.1

or

begin
execute immediate 'select fnd_oracle_schema.getouvalue(''PORTAL'') from
dual' into portal_user;
begin
execute immediate 'select user_name from fnd_user where user_name like
upper('''||portal_user||''')'
into portal_user_name;
if portal_user is not null then
execute immediate 'select version from '||portal_user||'.wwc_version$'
into portal_ver;
check_message := ' [PASS] Your Applications database contains
Portal version: '||portal_ver;
dbms_output.put_line(check_message);
end if;
exception
when no_data_found then
null;
end;
exception
when others then
null ;
end;

Version of XML Parser

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

Version of XML Publisher

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.

Version of WorkFlow

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

Version of Oracle Login Server

begin
execute immediate 'select fnd_oracle_schema.getouvalue(''LOGINSERVER'') from
dual' into sso_user;
begin
execute immediate 'select user_name from fnd_user where user_name like
upper('''||sso_user||''')' into
sso_user_name;
if sso_user is not null then
execute immediate 'select version from '||sso_user||'.wwc_version$' into
sso_ver;
check_message := ' [PASS] Your Applications database contains Login
Server version: '||sso_ver;
dbms_output.put_line(check_message);
end if;
exception
when no_data_found then
null;
end;
exception
when others then
null ;
end;

Developer Forms Patchset Level

For developer forms patch set level >> Click Here



Verify The Operation Of The Oracle Reports Server For eBusiness Suites 11i

On Oracle Applications 11i, the quickest method to check if the Oracle Reports server is functional is to "temporarily" enable the Oracle Reports Server diagnostic mode and bring up the "Environment" and "RWCGI Key Map" page via a web browser.

--> Enable the Oracle Reports Server diagnostic mode.


Comment out any reference to the REPORTS60_CGINODIAG and REPORTS60_OWSNODIAG parameters from the following files:

$APACHE_TOP/Apache/conf/apps.conf
$FND_TOP/resource/appsweb.cfg
$OAD_TOP/admin/scripts//adrepctl.sh

Bounce the Oracle Reports server and the Apache (Web) server.

--> Environment Check

http://://rwcgi60/showenv?server=

--> "RWCGI Key Map" Check

http://://rwcgi60/showmap?server=

An example is as follows: http://vis.oracle.com:8000/dev60cgi/rwcgi60/showenv?server=REP60_VIS
(The host and port is the same used for Apps login, the Web / Apache node)

If the Oracle Reports server installed with Oracle Applications 11i Succeeds to display the "Environment" and "RWCGI Key Map" page via a web browser, please check with the application product group who owns the troubled report for any required setup at the application level.

If the Oracle Reports server installed with Oracle Applications 11i Fails to display the "Environment" and "RWCGI Key Map" page via a web browser, please open a service request with the ATG group, upload a screen print of the error being encountered, and the following data:

1. Upload as a zip file with the following files.

a. The Apps 8.0.6 $TNS_ADMIN/tnsnames.ora file.
b. $APACHE_TOP/Apache/conf/apps.conf file
c. $ORACLE_HOME/reports60/server/CGIcmd.dat
d. $ORACLE_HOME/reports60/server/REP60_.ora
e. $FND_TOP/resource/appsweb.cfg
f. $OAD_TOP/admin/scripts//adrepctl.sh
(The exact adrepctl.sh file used to start the report server.)

2. Upload the report server's log files.

a. The Apps report server startup log file. The variable REPSRV_LOG within the adrepctl.sh points to the log file.

b. The Oracle Reports server log file.
$ORACLE_HOME/reports60/server/REP60_.log

3. Is the report server currently running; what is the output of ps -ef | grep rwmt ?

Java Version Used by JServ With Applications 11i

Perform the following steps to verify the version from the command prompt:

  1. Set the Applications environment by running the APPSORA.env (if not already set)
  2. Run the following command from the command prompt

MY_JAVA=`awk -F= '$1 ~ /^JSERVJAVA.*$/ {print $2}' \
$IAS_ORACLE_HOME/Apache/Apache/bin/java.sh`; \
$MY_JAVA -version

The output will be similar to the following:
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)

How to Check Whether an AOL Table is Locked

The sql statements below will help to determine if there is
a lock on the AOL table.


Checking for locked files
=========================

To check whether an AOL table is locked or not:

Sign on to sqlplus as the APPS account.

The example that is being used here is an attempt to modify a user's password
in System Administrator Responsibility, Users Define Form
(Navigation path: Security -> User -> define).

After modifying the password of a user in the User Define Screen:

SQL> select * from v$lock;

.... take note of the SID number (using '33' for this example)

SQL> select ADDR, KADDR, SID, TYPE, ID1, ID2, LMODE, REQUEST
from v$lock where sid=33;

Here's an example.

ADDR KADDR SID TY ID1 ID2 LMODE REQUEST
---------- ---------- --- -- ---------- ---------- ------ --------
010AB98C 010ABA58 33 TX 196618 107158 6 0
803CE1D8 803CE1EC 33 TM 4136 0 2 0

v$lock.type:
TX: Transaction enqueue
TM: DML enqueue

v$lock.lmode: Lock mode in which the session holds the lock:
0 means none
1 means null
2 means Row-S (SS)
3 means Row-X (SX)
4 means Share (S)
5 means S/Row-X (SSX)
6 means Exclusive (X)

v$lock.request: Lock mode in which the process requests the lock.

To find out which table is being locked by TM type lock:
(v$lock.id1 = dba_objects.object_id when v$lock.type = TM)

SQL> select object_name, owner from dba_objects where object_id=4136;

OBJECT_NAME OWNER
------------------------------ ---------------
FND_USER APPLSYS


To list the object which is being accessed by the session id 33:

SQL> select * from v$access where sid =33;

SID OWNER OBJECT TYPE
--- --------------- ------------------------------ ------------------------
33 APPLSYS ALR_PROFILE_OPTIONS TABLE
33 APPLSYS FND_APPLICATION TABLE
33 APPLSYS FND_ATTACHED_DOCUMENTS TABLE
33 APPLSYS FND_ATTACHMENT_FUNCTIONS TABLE
33 APPLSYS FND_CONCURRENT_PROGRAMS TABLE
33 APPLSYS FND_CONCURRENT_REQUESTS TABLE
33 APPLSYS FND_CONCURRENT_REQUESTS_S SEQUENCE
33 APPLSYS FND_CONC_REQUEST_ARGUMENTS TABLE
33 APPLSYS FND_DATA_GROUP_UNITS TABLE
33 APPLSYS FND_DOCUMENTS TABLE
33 APPLSYS FND_DOC_CATEGORY_USAGES TABLE
33 APPLSYS FND_FORM TABLE
33 APPLSYS FND_FORM_FUNCTIONS TABLE
33 APPLSYS FND_LANGUAGES TABLE
33 APPLSYS FND_LOGINS TABLE
33 APPLSYS FND_LOGINS_S SEQUENCE
33 APPLSYS FND_LOGIN_RESPONSIBILITIES CURSOR
33 APPLSYS FND_LOGIN_RESP_FORMS TABLE
33 APPLSYS FND_LOOKUP_VALUES TABLE
33 APPLSYS FND_ORACLE_USERID TABLE
33 APPLSYS FND_PRINTER TABLE
33 APPLSYS FND_PRINTER_INFORMATION TABLE
33 APPLSYS FND_PRINTER_STYLES TABLE
33 APPLSYS FND_RESPONSIBILITY TABLE
33 APPLSYS FND_SESSIONS CURSOR
33 APPLSYS FND_USER TABLE
33 APPLSYS FND_USER_RESPONSIBILITY TABLE
33 APPLSYS FND_USER_S SEQUENCE
.....
111 rows selected

To find out what is the last SQL statement issued:

SQL> select a.sql_text
2 from v$sqltext a, v$session b
3 where a.address = b.sql_address
4 and sid=33
5* order by piece;

SQL_TEXT
----------------------------------------------------------------
SELECT USER_NAME,DESCRIPTION,EMAIL_ADDRESS,FAX,PASSWORD_LIFESPAN
_DAYS,PASSWORD_LIFESPAN_ACCESSES,START_DATE,END_DATE,EMPLOYEE_ID
,PERSON_TYPE,USER_ID,ENCRYPTED_FOUNDATION_PASSWORD,PASSWORD_DATE
,PASSWORD_ACCESSES_LEFT,ENCRYPTED_USER_PASSWORD,SESSION_NUMBER,L
AST_UPDATE_DATE,LAST_UPDATED_BY,CREATED_BY,CREATION_DATE,LAST_UP
DATE_LOGIN FROM FND_USER WHERE ROWID=:1 FOR UPDATE OF USER_NAME
NOWAIT

7 rows selected.

Note: If you reissue the above sql statement after saving the changes
in the user define screen, you will see the following output:

SQL_TEXT
----------------------------------------------------------------
UPDATE FND_USER SET USER_NAME=:1,DESCRIPTION=:2,EMAIL_ADDRESS=:3
,FAX=:4,PASSWORD_LIFESPAN_DAYS=:5,PASSWORD_LIFESPAN_ACCESSES=:6,
START_DATE=:7,END_DATE=:8,EMPLOYEE_ID=:9,PERSON_TYPE=:10,USER_ID
=:11,ENCRYPTED_FOUNDATION_PASSWORD=:12,PASSWORD_DATE=:13,PASSWOR
D_ACCESSES_LEFT=:14,ENCRYPTED_USER_PASSWORD=:15,SESSION_NUMBER=:
16,LAST_UPDATE_DATE=:17,LAST_UPDATED_BY=:18,CREATED_BY=:19,CREAT
ION_DATE=:20,LAST_UPDATE_LOGIN=:21 WHERE ROWID=:22

7 rows selected.


To list the processes involved:

SQL> select distinct s.username, p.pid, osuser, p.spid, s.process, s.lockwait
2 from v$process p, v$session s, v$access a
3 where a.sid = s.sid
4 and p.addr = s.paddr
5 and s.username in ('APPS','APPLSYS')
6* and s.sid = 33;

USERNAME PID OSUSER SPID PROCESS LOCKWAIT
-------- ---------- --------------- --------- --------- --------
APPS 11 OraUser 7228 5791:01

SQL> select addr, pid, spid, username, serial#, program, latchwait
2* from v$process where pid = 11;

ADDR PID SPID USERNAME SERIAL# PROGRAM LATCHWAI
-------- ---- ----- -------- ------- ------------------------- --------
8018B174 11 7228 oracle7 100 oracle@suppue2(TNS V1-V3)

SQL> select distinct s.username, p.pid, osuser, p.spid, s.process, s.lockwait
2 from v$process p, v$session s, v$access a
3 where a.sid = s.sid
4 and p.addr = s.paddr
5 and s.username in ('APPS','APPLSYS')
6* and s.sid = 33

USERNAME PID OSUSER SPID PROCESS LOCKWAIT
-------- ---------- --------------- --------- --------- --------
APPS 11 OraUser 7228 5791:01

In the above example the LATCHWAIT and LOCKWAIT columns are blank
indicating there is no lock waiting.


At times, it may be difficult to find out the root cause of the "hanging"
problem within the application. The best starting point for this type of
issue is the v$session_wait view.