Friday, September 28, 2012

f60gen equalent in R12

Use the following syntax to generate any form in R12.
$ frmcmp_batch module= userid=apps/ output_file= compile_all=special batch=yes
As you can see , the syntax is pretty much the same as in 11i

Clearing JSP cache in R12 (s_jsp_main_mode)

There is a change in the default behaviour of handling JSP cache in R12 as opposed to 11i. Remember, JSPs were handled by Apache Jserv engine in 11i and is being handled by OC4J (10.1.3 AS) in R12.

In 11i, when we clear cache ($COMMON_TOP/_pages) and try to access JSP pages, it gets automatically recompiled. However, thisis not the case in R12 by default.So, in an R12 instance, if you clear _pages and restart apache,you will only get a blank screen since AppsLocalLogin.jsp wouldn’t get compiled by default. You will not even see a new _pages directory.To overcome this, as per Oracle, whenever JSP cache is cleared, we have to run“ojspcompile.pl” to recompile ALL jsp pages in the Application. This will take roughly around 15 to 20 mts. However, in the real world (atleast in the pre-production stage) this is not affordable.

The solution to this is to change the XML file parameter s_jsp_main_mode to a value of “recompile” from the default value of “justrun” and run autoconfig. JSP pages will be recompiled automatically after this change.

Versions of components in Oracle Apps

How to find versions of oracle components associated with Oracle Apps in Windows Environment
Many times we find ourselves in a situation where we just couldnt get the steps to ascertain the versions of components associated with our instance, be it on Unix/Windows. I had listed the steps below to ascertain the version for each component. All the steps can be used in both Unix/Windows environment , except for Developer6i version. We also have a shell script which will give all this information in a table format which was not tested till now on a Windows environment. If interested put a comment, we will write the script in a post.
Database
Connect as apps user;
. Alternatively you can also execute
Select * from v$version;


Apps Version

Connect as apps user
select release_name from apps.fnd_product_Groups;


Apache/iAS Version

%IAS_ORACLE_HOME%\Apache\Apache\apache.exe -version


Developer 6i PatchSet

cd %ORACLE_HOME% (806 Oracle Home)
cd bin
Ifrun60.exe help=yAbove command will pop-up a window simillar to this

Forms PatchSet WindowThumbrule : Subtract the fourth integer by 9 to get the patchset level.
Ie., 6.0.8.24.1
Fourth integer => 24
Dev6i PS => 24-9 = 15


Discoverer 4i Version

cd %APPL_TOP%\admin
grep -I s_disco_ver_comma **xml


Jinitiator Version

cd %APPL_TOP%\admin
grep -i s_jinit_ver_dot **xml


JDK/Java Version

java -version


OJSP Version

cd %OA_HTML%
echo “<%= application.getAttribute(“oracle.jsp.versionNumber”) %>” > test.jspLaunch Browser and enter urlhttp://.:port/OA_HTML/test.jsp


JDBC Version

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


OA Framework Version

Option 1http://.:port/OA_HTML/OAInfo.jspOption 2adident 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


AD PatchSet Level

Connect as apps user
select patch_level from fnd_product_installations where patch_level like ‘%AD%’;Note: above sql can be used to identify any modules patchset level by replacing AD with the module name eg., BNE


Portal Version

select fnd_oracle_schema.getouvalue(‘PORTAL’) from dual;FND_ORACLE_SCHEMA.GETOUVALUE(‘PORTAL’)
——————————————————————————–
PORTAL30 <= to retrieve the portal userselect version from PORTAL30.wwc_version$; VERSION
——————————————————————————–
3.0.9.8.1


How to enable trace with BIND variables and WAITs for a concurrent program?

Scenario
X submitted a concurrent request and its running for a long time and never completes. X approached you to see what is the problem with the concurrent request.

Steps
1. Inform X to logout from his ERP session.
2. Login as sysadmin user
3. System Administrator -> Profile (System)
4. Values: User = X, Profile = Initialization SQL Statement – Custom (you can also mention Initialization%Custom)
5. Under user field enter the following
begin fnd_ctl.fnd_sess_ctl(”,”,’TRUE’,'TRUE’,'LOG’,'ALTER SESSION SET EVENTS=”10046 TRACE NAME CONTEXT FOREVER, LEVEL 12” TRACEFILE_IDENTIFIER=”[ANY_IDENTIFIER]“‘);end;
[ANY_IDENTIFIER] = Any value to identify the trace file.
LEVEL 12 – Both Binds and Waits
LEVEL 8 – Only WAITS
LEVEL 4 – Only BIND Variables
All above levels will include the sql statements being executed and not only the binds and waits.
6. If tracing had been enabled at the concurrent program level as mentioned in this link, please disable it by removing the check box. [IMPORTANT]. If you have trace enabled for the concurrent program, then it will take precedence for the profile option.
7. Kill / cancel the long running concurrent request (if its still running)
8. Request X to login to ERP and instruct X to submit the concurrent request again and logout. Nothing else. This will ensure we capture the trace information specific to the concurrent request and not for other actions.
At this stage, you will find a trace file generated at $ORACLE_HOME/admin/SID_Hostname/udump with [ANY_IDENTIFIER] as part of it.
Inside the trace file you will be able to see information about the bind variable values being passed to and used by the concurrent program.
Eg:
Bind#0
oacdty=12 mxl=07(07) mxlc=00 mal=00 scl=00 pre=00
oacflg=13 fl2=206001 frm=00 csi=00 siz=8 off=0
kxsbbbfp=9fffffffbf2e88d8 bln=07 avl=07 flg=09
value=”[BIND VARIABLE VALUE]“
Bind#1
oacdty=12 mxl=07(07) mxlc=00 mal=00 scl=00 pre=00
oacflg=13 fl2=206001 frm=00 csi=00 siz=8 off=0
kxsbbbfp=9fffffffbf2e88f8 bln=07 avl=07 flg=09
value=”[BIND VARIABLE VALUE]“
Note: Make sure you remove the profile option value for X after the job is done, else every action of X will generate a trace file in udump directory.

Single Putty Window – Multiple Tabs – for multiple server connections

Is it possible to have a tabbed putty like firefox or internet explorer?
Yes you can, check out below URL
http://www.thegeekstuff.com/2008/08/turbocharge-putty-with-12-powerful-add-ons-software-for-geeks-3/
Look for Putty connection Manager.

Oracle 11i forms crash in IE

Issue :
Unable to open forms due to IE Error in 11i or Forms crashes with IE Error or Jinitiator Issue
This is due to jvm incompatibility used by other Application or tools.
Solution :
a) Go to program files java ==> jre1.6.0_07 (Or recent jre you can download from java.sun.com)
Path : C:\Program Files\Java\jre1.6.0_07\bin\client
b) Copy the jvm.dll file
c) Go to C:\Program Files\Oracle\JInitiator 1.3.1.21\bin\hotspot
d) Take the backup of current jvm.dll file
e) Copy the jvm.dll file which you have copied from the above jre directory.
f) Close all the browsers and restart
g) You can access the forms now

Process exiting status in Oracle Application R12

Issue:
======
a) Unable to launch the application or Home page hangs in Oracle Application Release R12
b) If you check the services on the web/Admin node, you can see process
ps -ef | grep -i exiting
- 647302 – - – exiting
- 708754 – - – exiting
- 925856 – - – exiting
- 983252 – - – exiting
- 1044536 – - – exiting
- 1134628 – - – exiting
- 1138768 – - – exiting
You can’t kill these process also
Only workaround is rebooting the box and start the services and it works fine.
This Issue will occur again after 2 weeks or less.
Application log error shows like below…….
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:132)
at sun.nio.ch.IOUtil.write(IOUtil.java:103)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:329)
at java.nio.channels.Channels.write(Channels.java:74)
at java.nio.channels.Channels.access$000(Channels.java:61)
at java.nio.channels.Channels$1.write(Channels.java:148)
at com.evermind.server.http.AJPOutputStream.endRequest(AJPOutputStream.java:117)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:306)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:797)
Cause:
=======
pid directories are placed on shared mount point.
Solution:
=========
a) Make sure all your pid variables are pointing to local disk in Context File…
s_lock_pid_dir
s_pids_dir
s_web_pid_file
b) Change in all the nodes and run Autoconfig.
Note:
It is always better to keep the $INST_TOP on local disk to avoid performance Issues.

Where is OA_HTML defined in R12

OA_HTML is defined in $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config/oc4j.properties

What languages and currencies are enabled in EBS

select language_code
from fnd_languages
where installed_flag='I'

For currencies, In EBS all currencies are enabled.

select CURRENCY_CODE,symbol
from apps.fnd_currencies
where enabled_flag='Y'
 
select object_name,bytes
from dba_segments
order by bytes desc;

SQL> select currency_code,count(*)
from apps.gl_interface
group by currency_code; 2 3

CURRENCY_CODE COUNT(*)
--------------- ----------
VND xxx
EUR xxx
USD xxx
SGD xxx
JPY xxx


VND = Vietnamese Dollar
SGD = Singapore Dollar
JPY = Japanese Yen
EUR = Euro
USD = US Dollar

Query to check CPU patch level

After moving from CPU patches to PSU patches for Database, we no longer get the CPU information from the query:

SQL> select comments from registry$history;

SQL> select comments from registry$history;

COMMENTS
--------------------------------------------------------------------------------
CPUOct2008
CPUApr2008
view recompilation
Upgraded from 10.2.0.3.0
CPUJan2009
CPUJul2009
PSU 10.2.0.4.1
CPUOct2009
PSU 10.2.0.4.2
CPUJul2010
CPUOct2010
view invalidation
Upgraded from 10.2.0.4.0
Patchset 11.2.0.2.0
CPUApr2011
CPUJul2011
CPUOct2011
PSU 11.2.0.2.5

18 rows selected.

If you notice it only shows Patchset 11.2.0.2.5 instead of having two rows one for PSU and one for Jan 2012 CPU which is included in the PSU.

We always apply all CPU patches relevant to our techstack, which usually means the database patches applied with opatch and EBS patches applied with adpatch.  So I created a query based on the EBS patch numbers for CPUs from April 2011 - July 2012 CPU:

column BUG format a8;
column PATCH format a60;
set linesize 100;
set pagesize 200;
select b.bug_number BUG, b.LAST_UPDATE_DATE LDATE, decode(bug_number,
13979374, 'July 2012 CPU patch for 11i+RUP7',
13979377, 'July 2012 CPU patch for 11i+RUP6',
13979372, 'July 2012 CPU patch for R12.1+ATG_PF.B.Delta3',
13979375, 'July 2012 CPU for R12.0+ATG_PF.A.Delta6',
13621942, 'April 2012 CPU for R12.1+ATG_PF.B.Delta2',
13621941, 'April 2012 CPU for R12.0+ATG_PF.A.Delta6',
13621940, 'April 2012 CPU for 11i+RUP7',
13621939, 'April 2012 CPU for 11i+RUP6',
13322561, 'Jan 2012 CPU for R12.1+ATG_PF.B.Delta2',
12794416, 'Jan 2012 CPU for R12.0+ATG_PF.A.Delta6',
13322559, 'Jan 2012 CPU for 11i+RUP7',
13322557, 'Jan 2012 CPU for 11i+RUP6',
12794417, 'Oct 2011 CPU for R12.1+ATG_PF.B.Delta2',
12794416, 'Oct 2011 CPU for R12.0+ATG_PF.B.Delta6',
12794415, 'Oct 2011 CPU for 11i+RUP7',
12794414, 'Oct 2011 CPU for 11i+RUP6',
12406916, 'Jul 2011 CPU for R12.1',
12406915, 'Jul 2011 CPU for R12.0',
12406914, 'Jul 2011 CPU for 11i+RUP7',
12406913, 'Jul 2011 CPU for 11i+RUP6',
11660357, 'Apr 2011 CPU for R12.1',
11660356, 'Apr 2011 CPU for R12.0',
11660355, 'Apr 2011 CPU for 11i+RUP7',
11660354, 'Apr 2011 CPU for 11i+RUP6'
) PATCH
from APPS.AD_BUGS b
where b.BUG_NUMBER in ('13979374','13979377','13979372','13979375','13621942','13621941','13621940',
'13621939','13322561','12794416','13322559','13322557','12794417','12794416','12794415','12794414',
'12406916','12406915','12406914','12406913','11660357''11660356','11660355','11660354')
order by patch;

Result on the same instance:
BUG      LDATE           PATCH
-------- --------------- ------------------------------------------------------------
11660355 20-AUG-11       Apr 2011 CPU for 11i+RUP7
13322559 12-MAY-12       Jan 2012 CPU for 11i+RUP7
12406914 19-NOV-11       Jul 2011 CPU for 11i+RUP7
12794415 11-FEB-12       Oct 2011 CPU for 11i+RUP7

Buffer Overflow Error

Use the below statement to resolve the issue.
SET SERVEROUTPUT ON size '1000000'
and
DBMS_OUTPUT.ENABLE(1000000)