Monday, July 7, 2014

ORA-00353: log corruption near block

SQL> startup;

ORACLE instance started.

Total System Global Area 1570009088 bytes

Fixed Size 2221840 bytes

Variable Size 989858032 bytes

Database Buffers 553648128 bytes

Redo Buffers 24281088 bytes

Database mounted.

ORA-03113: end-of-file on communication channel

Process ID: 35389500

Session ID: 331 Serial number: 3

Alert log shows as

Incomplete read from log member '/ora_lcd11/db01/lcd11/db/apps_st/data/log03a.dbf'. Trying next member.
ARC0: Log corruption near block 117330 change 7887289606 time ?
CORRUPTION DETECTED: thread 1 sequence 42 log 3 at block 117330. Arch found corrupt blocks
Errors in file /ora_lcd11/db01/lcd11/db/tech_st/11203/admin/lcd11_ora-lcd11/diag/rdbms/lcd11/lcd11/trace/lcd11_arc0_64028940.trc (incident=90522):
ORA-00353: log corruption near block 117330 change 7887289606 time 07/04/2014 13:06:54
ORA-00312: online log 3 thread 1: '/ora_lcd11/db01/lcd11/db/apps_st/data/log03b.dbf'
ORA-00312: online log 3 thread 1: '/ora_lcd11/db01/lcd11/db/apps_st/data/log03a.dbf'
Incident details in: /ora_lcd11/db01/lcd11/db/tech_st/11203/admin/lcd11_ora-
lcd11/diag/rdbms/lcd11/lcd11/incident/incdir_90522/lcd11_arc0_64028940_i90522.trc
Incomplete read from log member '/ora_lcd11/db01/lcd11/db/apps_st/data/log02a.dbf'. Trying next member.
Incomplete read from log member '/ora_lcd11/db01/lcd11/db/apps_st/data/log02b.dbf'. Trying next member.
ARCH: Log corruption near block 670320 change 7886861019 time ?
CORRUPTION DETECTED: thread 1 sequence 41 log 2 at block 670320. Arch found corrupt blocks
Errors in file /ora_lcd11/db01/lcd11/db/tech_st/11203/admin/lcd11_ora-lcd11/diag/rdbms/lcd11/lcd11/trace/lcd11_ora_60883278.trc (incident=90514):
ORA-00353: log corruption near block 670320 change 7886861019 time 07/03/2014 11:06:05
ORA-00312: online log 2 thread 1: '/ora_lcd11/db01/lcd11/db/apps_st/data/log02b.dbf'
ORA-00312: online log 2 thread 1: '/ora_lcd11/db01/lcd11/db/apps_st/data/log02a.dbf'
Incident details in: /ora_lcd11/db01/lcd11/db/tech_st/11203/admin/lcd11_ora-
lcd11/diag/rdbms/lcd11/lcd11/incident/incdir_90514/lcd11_ora_60883278_i90514.trc
ARC0: All Archive destinations made inactive due to error 354
ARC0: Closing local archive destination LOG_ARCHIVE_DEST_1: '/ora_lcd11/df01/bkp/arch_42_1_851175866.arc' (error 354) (lcd11)
Committing creation of archivelog '/ora_lcd11/df01/bkp/arch_42_1_851175866.arc' (error 354)




SQL> startup nomount;



Fixed Size 2221840 bytes

Variable Size 989858032 bytes

Database Buffers 553648128 bytes

Redo Buffers 24281088 bytes

SQL> alter database mount;

SQL> select name,open_mode from v$database;

NAME OPEN_MODE

--------- --------------------
LCD11 MOUNTED

SQL> alter database clear unarchived logfile group 2;
Database altered.

SQL> alter database clear unarchived logfile group 3;
Database altered.

SQL> alter database open;
SQL> select name,open_mode from v$Database;

NAME OPEN_MODE --------- --------------------
LCD11 READ WRITE

Monday, June 23, 2014

Patch Analysis Report

Patch Impact Analysis (or) Object Impact Analysis:-


set lines 300 column site_version format a30 column patch_version format a30


select f.bug_number "BUG_NBR", a.filename "FILE_NAME", substr(c.version,1,20) "PATCH_VERSION", substr(d.version,1,20) "SITE_VERSION", b.executed_flag, b.creation_date "PATCH_DATE" from ad_files a,ad_patch_run_bug_actions b, ad_file_versions c,ad_file_versions d, ad_patch_run_bugs e,ad_bugs f where a.file_id=b.file_id and c.file_version_id=b.patch_file_version_id and d.file_version_id=b.onsite_file_version_id and b.executed_flag = 'Y' and e.bug_id=f.bug_id and e.patch_run_bug_id=b.patch_run_bug_id and f.bug_number='&Patch_number' order by b.creation_date desc;


Sometimes, the requester may ask us which patch has affected a particular file. we can use the following query to find the answer


set lines 300 column site_version format a30 column patch_version format a30


select f.bug_number "BUG_NBR", a.filename "FILE_NAME", substr(c.version,1,20) "PATCH_VERSION", substr(d.version,1,20) "SITE_VERSION", b.executed_flag, b.creation_date "PATCH_DATE" from ad_files a, ad_patch_run_bug_actions b, ad_file_versions c, ad_file_versions d, ad_patch_run_bugs e, ad_bugs f where a.file_id=b.file_id and a.filename like '&FILE_NAME' -- use % and c.file_version_id=b.patch_file_version_id and d.file_version_id=b.onsite_file_version_id and b.executed_flag = 'Y' and e.bug_id=f.bug_id and e.patch_run_bug_id=b.patch_run_bug_id order by b.creation_date desc;


How To Use Patch Wizard Without Setting Up Internet Connection (Doc ID 741129.1)


Thursday, October 10, 2013

How to hold the concurrent programs

1) To hold the specific concurrent program
Hold


update fnd_concurrent_requests set HOLD_FLAG='Y' where PHASE_CODE='P' and CONCURRENT_PROGRAM_ID = (select CONCURRENT_PROGRAM_ID from FND_CONCURRENT_PROGRAMS_VL where CONCURRENT_PROGRAM_NAME like '%FNDSCURS%');


FNDSCURS ----> Short Name of the concurrent Program


Release


update FND_CONCURRENT_REQUESTS set HOLD_FLAG='N' where PHASE_CODE='P' and CONCURRENT_PROGRAM_ID = (select CONCURRENT_PROGRAM_ID from FND_CONCURRENT_PROGRAMS_VL where CONCURRENT_PROGRAM_NAME like '%FNDSCURS%');


2) To hold the program for a user

update APPS.FND_CONCURRENT_REQUESTS set HOLD_FLAG='Y' where PHASE_CODE='P' and REQUEST_ID in (SELECT req.request_id FROM apps.fnd_concurrent_programs_tl prg , apps.fnd_concurrent_requests req , apps.fnd_user fus , apps.fnd_conc_release_classes crc WHERE 1=1 AND prg.application_id = req.program_application_id AND prg.concurrent_program_id = req.concurrent_program_id AND req.requested_by = fus.user_id AND req.phase_code = 'P' AND req.requested_start_date > sysdate AND prg.language = 'US' AND crc.release_class_id(+) = req.release_class_id and CRC.APPLICATION_ID(+) = REQ.RELEASE_CLASS_APP_ID and FUS.USER_NAME in ('USER1','USER1'));


To release the jobs


update APPS.FND_CONCURRENT_REQUESTS set HOLD_FLAG='N' where PHASE_CODE='P' and REQUEST_ID in (SELECT req.request_id FROM apps.fnd_concurrent_programs_tl prg , apps.fnd_concurrent_requests req , apps.fnd_user fus , apps.fnd_conc_release_classes crc WHERE 1=1 AND prg.application_id = req.program_application_id AND prg.concurrent_program_id = req.concurrent_program_id AND req.requested_by = fus.user_id AND req.phase_code = 'P' AND req.requested_start_date > sysdate AND prg.language = 'US' AND crc.release_class_id(+) = req.release_class_id and CRC.APPLICATION_ID(+) = REQ.RELEASE_CLASS_APP_ID and FUS.USER_NAME in ('YYY0M29'));


3) To get the all the child request id from parent request ID -- pass parent request id

select /*+ ORDERED USE_NL(x fcr fcp fcptl)*/ fcr.request_id "Request ID", fcr.requested_by "User", substr(DECODE (FCR.DESCRIPTION, NULL, FCPTL.USER_CONCURRENT_PROGRAM_NAME, FCR.DESCRIPTION||' ('||FCPTL.USER_CONCURRENT_PROGRAM_NAME||')'),1,80)"Program Name", (fcr.actual_completion_date - fcr.actual_start_date)*1440 "Elapsed Time", oracle_process_id "Trace File ID" , fcr.phase_code "Phase", fcr.status_code "Status", to_char(fcr.request_date,'DD-MON-YYYY HH24:MI:SS') "Submitted", (fcr.actual_start_date - fcr.request_date)*1440 "Delay", to_char(fcr.actual_start_date,'DD-MON-YYYY HH24:MI:SS') "Start Time", to_char(fcr.actual_completion_date, 'DD-MON-YYYY HH24:MI:SS') "End Time", fcr.argument_text "Parameters" from (select /*+ index (fcr1 FND_CONCURRENT_REQUESTS_N3) */ fcr1.request_id from fnd_concurrent_requests fcr1 where 1=1 start with fcr1.request_id = &parent_request_id connect by prior fcr1.request_id = fcr1.parent_request_id) x, fnd_concurrent_requests fcr, fnd_concurrent_programs fcp, fnd_concurrent_programs_tl fcptl where fcr.request_id = x.request_id and fcr.concurrent_program_id = fcp.concurrent_program_id and fcr.program_application_id = fcp.application_id and fcp.application_id = fcptl.application_id and fcp.concurrent_program_id = fcptl.concurrent_program_id and fcptl.language = 'US' order by 1;





Terminate the Request as follows


update fnd_concurrent_requests set status_code='X', phase_code='C' where request_id='request_id';


Friday, October 14, 2011

Status code and Phase code from fnd_concurrent_requests

How To Find the Meanings of Various Status Codes (Doc ID 297909.1)

FND_CONCURRENT_REQUESTS

STATUS_CODE Column:
A Waiting
B Resuming
C Normal
D Cancelled
E Error
F Scheduled
G Warning
H On Hold
I Normal
M No Manager
Q Standby
R Normal
S Suspended
T Terminating
U Disabled
W Paused
X Terminated
Z Waiting.

PHASE_CODE column.
C Completed
I Inactive
P Pending
R Running

Tuesday, May 24, 2011

Responsibility Issue

TROUBLESHOOTING: RESPONSIBILITY NOT VISIBLE BY USER AFTER UNENDATE
≡ Category: Oracle EBS | ≅ Leave a Comment
It can happen that after unendating a responsibility assignment, the user cannot see that responsibility. To solve this problem there are 2 procedures that can help:
1. Run the request ‘Sync responsibility role data into the WF table’.
2. Run the request “Synchronize WF LOCAL tables”.
3. Run the request “Workflow Directory Services User/Role Validation” (with parameters 10000, yes,
yes, yes).
4. Have the user log off and back on and verify that the responsibility appears.
If after that the problem is not solved yet, then it’s possible to use the System Administrator responsibility: Workflow -> Oracle Applications Manager -> Workflow Manager


Selecting ‘Service Components’ and starting the following listeners:
- Workflow Deferred Notification Agent Listener
- Workflow Error Agent Listener
- Workflow Java Deferred Agent Listener
- Workflow Java Error Agent Listener


The user should then be able to use the unendate responsibility.
What Parameters Should Be Passed For "Workflow Directory Services User/Role Validation" Program? [ID 418765.1]

If does not solve the issue
update apps.wf_local_user_roles wur set wur.EFFECTIVE_END_DATE = to_date('01/01/9999','DD/MM/YYYY')
where role_end_date is null and expiration_date is null and USER_NAME = 'USERID'
Query to get the list of user having particular responsibility
select responsibility_key,RESPONSIBILITY_NAME,RESPONSIBILITY_ID from FND_RESPONSIBILITY_VL where responsibility_name = 'Service Contracts Manager';

Monday, May 16, 2011

Daily use scripts for Apps DBA

/* To find the latest application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE updated,ROW_SOURCE_COMMENTS "how it is done",BASE_RELEASE_FLAG "Base version" FROM AD_RELEASES where END_DATE_ACTIVE IS NULL

/* Query to find out if any patch except localisation patch is applied or not, if applied, that what all drivers it contain and time of it's application*/

select A.APPLIED_PATCH_ID, A.PATCH_NAME, A.PATCH_TYPE, B.PATCH_DRVIER_ID, B.DRIVER_FILE_NAME, B.ORIG_PATCH_NAME, B.CREATION_DATE, B.PLATFORM, B.SOURCE_CODE, B.CREATIONG_DATE, B.FILE_SIZE, B.MERGED_DRIVER_FLAG, B.MERGE_DATE from AD_APPLIED_PATCHES A, AD_PATCH_DRIVERS B where A.APPLIED_PATCH_ID = B.APPLIED_PATCH_ID and A.PATCH_NAME = ''

/* To know that if the patch is applied successfully, applied on both node or not, start time of patch application and end time of patch application, patch top location , session id ... patch run id */

select D.PATCH_NAME, B.APPLICATIONS_SYSTEM_NAME, B.INSTANCE_NAME, B.NAME, C.DRIVER_FILE_NAME, A.PATCH_DRIVER_ID, A.PATCH_RUN_ID, A.SESSION_ID, A.PATCH_TOP, A.START_DATE, A.END_DATE, A.SUCCESS_FLAG, A.FAILURE_COMMENTS from AD_PATCH_RUNS A, AD_APPL_TOPS B, AD_PATCH_DRVIERS C, AD_APPLIED_PATCHES D where A.APPL_TOP_ID = B.APPL_TOP_ID AND A.PATCH_DRIVER_ID = C.PATCH_DRIVER_ID and C.APPLIED_PATCH_ID = D.APPLIED_PATCH_ID and A.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = '')) ORDER BY 3;

/* to find the base application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES where BASE_RELEASE_FLAG = 'Y'


/* To find all available application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, END_DATE_ACTIVE "when lasted", CASE WHEN BASE_RELEASE_FLAG = 'Y' Then 'BASE VERSION' ELSE 'Upgrade' END "BASE/UPGRADE", ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES


/* To get file version of any application file which is changed through patch application */

select A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME, max(B.VERSION) from AD_FILES A, AD_FILE_VERSIONS B where A.FILE_ID = B.FILE_ID and B.FILE_ID = 86291 group by A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME


/* To get information related to how many time driver file is applied for bugs */

select * from AD_PATCH_RUN_BUGS where BUG_ID in (select BUG_ID from AD_BUGS where BUG_NUMBER = ''

/* To find latest patchset level for module installed */

select APP_SHORT_NAME, max(PATCH_LEVEL) from AD_PATCH_DRIVER_MINIPKS GROUP BY APP_SHORT_NAME

/* To find what is being done by the patch */

select A.BUG_NUMBER "Patch Number", B. PATCh_RUN_BUG_ID "Run Id",D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACTION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and A.BUG_NUMBER = '' and B.PATCH_RUN_BUG_ID = ' < > ' and C.EXECUTED_FLAG = 'Y' GROUP BY A.BUG_NUMBER, B.PATCH_RUN_BUG_ID, D. APP_SHORT_NAME, D>SUBDIR, D.FILENAME, E.ACTION_CODE


/* To find Merged patch Information from database in Oracle Applications */

select bug_number from ad_bugs where bug_id in ( select bug_id from ad_comprising_patches where patch_driver_id =(select patch_driver_id from ad_patch_drivers where applied_patch_id =&n) );

/* Second Query to know, what all has been done during application of PATCH */

Select J.PATCh_NAME, H.APPLICATIONS_SYSTEM_NAME Instance_Name, H.NAME, I.DRIVER_FILE_NAME, D.APP_SHORT_NAME appl_top,D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B,AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F, AD_PATCH_RUNS G,
AD_APPL_TOPS H, AD_PATCH_DRIVERS I, AD_APPLIED_PATCHES J where A.BUG_ID = B.BUG_ID and
B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACTION_ID = C.COMMON_ACTION_ID
and D.FILE_ID = F.FILE_ID and G.APPL_TOP_ID = H.APPL_TOP_ID and G.PATCH_DRIVER_ID = I.PATCH_DRIVER_ID and
I.APPLIED_PATCH_ID = J.APPLIED_PATCH_ID and B.PATCH_RUN_ID = G.PATCH_RUN_ID and C.EXECUTED_FLAG = 'Y' and
G.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID
in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = 'merged'))
GROUP BY J.PATCH_NAME, H.APPLICATIONS_SYSTEM_NAME, H.NAME, I.DRIVER_FILE_NAME, D.APP_SHORT_NAME, D.SUBDIR,
D.FILENAME, E.ACTION_CODE


/* Script to find out Patch level of mini Pack */

Select product_version,patch_level from FND_PROUDCT_INSTALLATIONS where patch_level like '%&shortname%';

Replace short name by name of Oracle Apps Minipack for which you want to find out Patch level . ex.
AD - for Applications DBA
GL - for General Ledger
PO - Purchase Order


Where is Concurrent Manager Node ? If you don't know where is your CM here are few ways to find your it .

SQLPLUS> select node_name from apps.fnd_nodes where support_cp='Y';


Here I am listing Unix/Linux commnads which might be useful while troubleshooting Oracle Apps.


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 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 {} \;
*Check carefully & run it first from logs or dump directory


How to find a class inside a set of Jar files


for i in 'find .-name *.jar'
do
if test 'jar -tvf $i|grep QualityObject.class'
then
ls $i
fi
done


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 check if a Port is listening for any Service

netstat -an | grep $PORTNO

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



Profile Options Useful for Oracle Apps DBA

Here is the list of few profile options which Apps DBA use frequently. It is not necessary that you as Apps DBA must know all profile options, it depends on your implemnetation. I am going going to update more about Profile Options.

Applications Help Web Agent
Applications Servlet Agent
Applications Web Agent
Concurrent: Active Request Limit
Concurrent: Hold Requests
Concurrent: Multiple Time Zones
Concurrent: Report Access Level
Concurrent: Report Copies
Concurrent: Request priority
Database Instance
Enable Security Group
FND: Debug Log Filename
FND: Debug Log Level
Forms Runtime Parameters
Gateway User ID
ICX: Discoverer Launcher
ICX: Forms Launcher
ICX: Report Launcher
ICX: Limit Connect
ICX: Limit time
ICX: Session Timeout
MO Operating Unit
Node Trust Level
RRA: Delete Temporary Files
RRA: Enabled
RRA: Service Prefix
RRA: Maximum Transfer Size
Self Service Personal Home Page Mode
Sign-On: Audit Level
Signon Password Failure Limit
Signon Password Hard to Guess
Signon Password Length
Signon Password No Reuse
Site Name
Socket Listener Port
TCF: Host
TCF: Port
TWO TASK
Viewer: Text


Below you will find commonly asked questions about various component Version in Oracle Applications & way to find them which might be helpful in Apps DBA Job. Most of these are for Unix / Linux.


Q: How to find Oracle Applications Web Server Version ?
Q: How to find Version of Apache used with oracle apps 11i ?

Log to Application tier as Operating System Usually called as APPLMGR ; go to location $IAS_ORACLE_HOME/Apache/Apache/bin and run command
./httpd -version
You will see output like

Server version: Oracle HTTP Server Powered by Apache/1.3.19 (Unix)
Server built: Dec 6 2005 14:59:13 (iAS 1.0.2.2.2 rollup 5)
Which means you are on iAS Version 1.0.2.2.2 with patchset rollup 5 with Apache Version 1.3.19


Server version: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server

Above is output If you have installed 10g Application Server with 11i


Q: How to find Jinitiator Version ?

Check for file like appsweb_SID_HOSTNAME.cfg under $OA_HTML/bin defined by environment variable FORMS60_WEB_CONFIG_FILE & search for entry like jinit_ver_name , you will see entry like
jinit_ver_name=Version=1,3,1,23
which means Jinitiator version is 1.3.1.23 ; if your version is 1.3.1.18 you will see entry like 1,3,1,18


Q: How to find Forms Version in 11i ?

Login to forms from frontend , on top menu bar of forms click on "Help" & Select "About Oracle Applications" go to "Forms Server " section. You should see entry like below depending on your forms version
Oracle Forms Version : 6.0.8.26.0
Which mean you are on forms version 6.0.8.26 . If you want to know whats your forms patchset level then subtract 9 from fourth digit which means for above case form patchset 17 is applied.


Q: How to find Forms Version in Apps from command Line ?

Enter "f60gen" on Forms Server and check for first line in output like
Forms 6.0 (Form Compiler) Version 6.0.8.26.0 (Production)
This confirms that you are on forms server version 6.0.8.26.0 and patch set 17. ( Patch Set = Fourth Digit - 9)


Q: How to find Version of any file in Oracle Apps 11i ? or
Q: How to find any Reports Version 11i ? or

In Oracle Applications under ad utilities there is utility called as adident Used for Identification purpose or to find out file version use
adident Header
for ex. inorder to to find file version of one AR form i.e. ARXGLCOR.fmx
adident Header ARXGLCOR.fmx
You should see output like
$Header APPSTAND.fmb 115.33 2002/04/04 11:13:40 pkm ship
$ $Header ARXGLCOR.fmb 115.15 2005/01/31 13:48 mraymond ship
Which means above form executable consist of two forms whose version is 115.33 & 115.15 resp. Similarly you can use adident to find version of any report in 11i.


Q: How to find Operation System Version (Unix/Linux) ?

For solaris use command
uname -a
You will see output like
For Solaris SunOS servername 5.8 Generic_117350-23 sun4u sparc SUNW,Sun-Fire-V240
For RedHat Linux use command
cat /etc/*release*
You will see output like
Red Hat Enterprise Linux AS release 3 (Taroon Update 6)

Which means you are on Solaris 5.8 or Linux AS 3 resp.

Q: How to find if your Operating System is 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


Q: How to find Operating System version ?

For solaris use command
uname -a
You will see output like
For Solaris SunOS servername 5.8 Generic_117350-23 sun4u sparc SUNW,Sun-Fire-V240
For RedHat Linux use command
cat /etc/*release*
You will see output like
Red Hat Enterprise Linux AS release 3 (Taroon Update 6)

Which means you are on Solaris 5.8 or Linux AS 3 resp.

Q: How to find if your Operating System is 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



Q: Can I run 64 bit application on 32 bit Operating system ?

You can run 32 bit application (like oracle application server, web server, all oracle application server are 32 bit ) on both 32 /64 bit operating system but a 64 bit application like 64 bit database can run only on 64 bit operating system.

Q How to find if your database is 32 bit or 64 bit(Useful in applying Patches) ?


execute "file $ORACLE_HOME/bin/oracle" , you should see output like
/u01/db/bin/oracle: ELF 64-bit MSB executable SPARCV9 Version 1
which means you are on 64 bit oracle
If your oracle is 32 bit you should see output like
oracle: ELF 32-bit MSB executable SPARC Version 1


Q. How to find Version of Apps 11i ?

Run following SQL from apps user

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

Q: Can I run 64 bit application on 32 bit Operating system ?

You can run 32 bit application (like oracle application server, web server, all oracle application server are 32 bit ) on both 32 /64 bit operating system but a 64 bit application like 64 bit database can run only on 64 bit operating system.


Q How to find if your database is 32 bit or 64 bit(Useful in applying Patches) ?

execute "file $ORACLE_HOME/bin/oracle" , you should see output like
/u01/db/bin/oracle: ELF 64-bit MSB executable SPARCV9 Version 1
which means you are on 64 bit oracle
If your oracle is 32 bit you should see output like
oracle: ELF 32-bit MSB executable SPARC Version 1
Now you know what should be bit of patch to download



Q How to Discoverer Version installed with Apps ?

Discoverer with Apps installed in ORACLE_HOME same as 806 is usually 3i or 4i. To find Version login to Application Tier & go to $ORACLE_HOME/discwb4/bin and execute
strings dis4ws | grep -i 'discoverer version'
You should see output like
Discoverer Version:Session 4.1.47.09.00

Q. How to find Workflow Version embedded in Apps 11i ?

Run following SQL from apps user ;
SQL>select TEXT from WF_RESOURCES where NAME='WF_VERSION';

You should see output like
TEXT
-----------------------
2.6.0
Which means you are on Workflow Version 2.6.0


You can also use script wfver.sql in FND_TOP/sql to find version of workflow in Apps.


Q: How to find version of JDK Installed on Apps ?

There might be multiple JDK installed on Operating System . Like JDK 1.3.1, 1.4.2 or 1.5 but in order to find which Version of JDK your Apps is using
Open your Context File $SID_$HOSTNAME.xml under $APPL_TOP/admin and look for variable
JDK_TOP oa_var="s_jdktop" what so ever value assigned against that parameter go to that directory & cd bin & execute command
./java -version so lets assume entry above is /usr/jdk then cd /usr/jdk/bin & ./java -version , you will see output like

java version "1.4.2_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)

Friday, April 15, 2011

R12 logs--454178.1





OPMN errors at startup

Possible symptoms:

  • A failure is noted in "$ADMIN_SCRIPTS_HOME/adstrtal.sh",
  • Attempts to start the opmn using "$ADMIN_SCRIPTS_HOME/adopmnctl.sh" fail
  • "$ADMIN_SCRIPTS_HOME/adopmnctl.sh status" fails

Useful log files:

Examine opmn.log, opmn.out

HTTP Server fails at startup

Possible symptoms:

  • "$ADMIN_SCRIPTS_HOME/adopmnctl.sh status" indicates the HTTP Server is down
  • "$ADMIN_SCRIPTS_HOME/adapcctl.sh start" fails

Useful log files:

Examine HTTP_Server~<#>, error_log

OC4J Applications Module (oacore, forms, oafm) fails at startup

Possible symptoms:

  • Executing "$ADMIN_SCRIPTS_HOME/adopmnctl.sh status" indicates the module is down
Note:The forms module will show as down, if forms are configured to run in socket mode (this is not an error)

  • Script adctl.sh start fails
    • Example: "$ADMIN_SCRIPTS_HOME/adoacorectl.sh start"

Useful log files:

Examine: OC4J~~default_group~<#>, std.out, std.err

HTML requests complete, Java requests do not

  • "$ADMIN_SCRIPTS_HOME/adopmnctl.sh status" shows the oacore module(s) alive
  • http:///OA_HTML/jsp/fnd/aoljtest.jsp returns no page

Useful log files:

Examine: OC4J~~default_group~<#>, std.out, std.err, application.log

Additional debugging steps:

  • set s_jsp_dbg_mode in $CONTEXT_FILE to true
  • Run Autoconfig $ADMIN_SCRIPTS_HOME/adautocfg.sh
  • Stop then Start $ADMIN_SCRIPTS_HOME/adoacorectl.sh service
  • Examine application.log for missing jsp files (see Known Issues)

HTML requests complete, Java requests complete, Applications Login page fails

Useful log files:

Examine: application.log , $APPLRGF/javacache.log (see Known Issues)

Additional debugging steps:

If the Applications Login page is returned or an error message such as: "You have encountered an unexpected error. Please contact the System Administrator for assistance" then the problem is with Oracle Applications setup rather than Oracle Application Server.
  • Examine the output from aoljtest.jsp
    • http:///OA_HTML/jsp/fnd/aoljtest.jsp
  • Enable AFLogging
    • Open the file $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config/oc4j.properties in a text editor
    • Add:the following values:
      • AFLOG_ENABLED=true
      • AFLOG_LEVEL=statement
      • AFLOG_MODULE=% (% captures all - preferable to use products such as fnd, ies, por)
      • AFLOG_FILENAME=/tmp/1.log
    • Stop then restart $ADMIN_SCRIPTS_HOME/adoacorectl.sh service, reproduce the issue, and examine the log file denoted by AFLOG_FILENAME

Applications Login Page is displayed, Login Fails

Debugging steps:

  • Examine the output from aoljtest.jsp
    • http:///OA_HTML/jsp/fnd/aoljtest.jsp
  • Enable AFLogging
    • Edit $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config/oc4j.properties
    • Add: values
      • AFLOG_ENABLED=true
      • AFLOG_LEVEL=statement
      • AFLOG_MODULE=% (% captures all, better to use products i.e fnd,ies,por,etc..)
      • AFLOG_FILENAME=/tmp/1.log
    • Stop then Start $ADMIN_SCRIPTS_HOME/adoacorectl.sh service, recreate issue, examine log file denoted in AFLOG_FILENAME..
Return to Top

Oracle Application Server Diagnostic Tools

The tools, techniques, and examples shown below should be used in conjunction with the supporting documentation, which gives more detail of the options available. If in doubt how to proceed, post your questions in an OracleMetalink Forum or open a service request with Oracle Support.
Recommendation: Do not enable debug settings indiscriminately. Standard logging should be used first, to determine which of the tools below is most suited to help uncover the source of a particular problem.

OPMN

The OPMN server provides a means to enhance debug logging during runtime if needed. Higher logging levels may be set for the ons (Oracle Notification Server) or the pm (Process Manager).
Example: Enabling debug values for OPMN in a UNIX environment at runtime. The log values will be disabled upon restart.
prompt> . $INST_TOP/ora/10.1.3/.env
prompt> opmnctl query target=log
prompt> internal;ons;pm -------------(default Applications response)
prompt> opmnctl set target=debug comp="ons[all];pm[all]"
A full list of query options is available in Oracle® Process Manager and Notification Server Administrator's Guide 10g Release 3 (10.1.3), Chapter 6
Log file: opmn.dbg
Recommendation: Enable usage of the opmn.dbg file only after checking with Oracle Support. The opmn.dbg file is used by Support to debug and diagnose OPMN issues. Messages that are contained in the opmn.dbg file are typically not readily comprehensible to the user.
Return to Top

Java Object Cache Monitor

In distributed mode (the Applications Release 12 default mode), the Java Object Cache can share objects and communicate with other caches running either locally on the same system or remotely across the network. Object updates and invalidations are propagated between communicating caches. Distributed mode supports object persistence across system shutdowns and program failures. It may become necessary to review information in regards to the controller and objects cached. Oracle Application Server provides a cache monitoring utility available at the operating system level for Applications Release 12.
Example: Initializing CacheWatchUtil in a UNIX environment
prompt >. ./$APPL_TOP/APPS(sid).env
prompt >java -jar $ORACLE_HOME/../10.1.3/javacache/lib/cache.jar watch \
> java -jar $ORACLE_HOME/../10.1.3/javacache/lib/cache.jar watch -config=$ORA_CONFIG_HOME/10.1.3/javacache/admin/javacache.xml
cache >
An explanation of values and options may be found in Oracle® Containers for J2EE Services Guide 10g Release 3 (10.1.3):Chapter 7 Java Object Cache:Monitoring and Debugging
Return to Top

Applications Server Forms Servlet Debug

Applications Release 12 provide Forms Servlet architecture by default through Rapid Install. This information is specific to the servlet itself: issues with Forms and forms architecture should be addressed using Forms Tracing and JVM Client Tracing
  • To test the j2ee Forms Module configuration: http://yourserver/forms
  • To debug runtime issues within the Forms Servlet:
    • Edit the profile option ICX:Forms Launcher (user level)
      • Values available: [reference]
        • http://yourserver/forms/frmservlet?serverURL=/forms/lservlet/session --- Log messages are written whenever a Forms session starts or ends. These give the host name and IP address of the client (the computer on which the user's web browser is running), the runtime process id, and a unique internal session id number.
        • http://yourserver/forms/frmservlet?serverURL=/forms/lservlet/sessionperf --- Performance summary statistics are included with the session end message.
        • http://yourserver/forms/frmservlet?serverURL=/forms/lservlet/perf --- A performance message is written for every request from the client.
        • http://yourserver/forms/frmservlet/debug?serverURL=/forms/lservlet/debug --- Full debug messages. Other debug messages are written in addition to the messages mentioned above. This logging level is very verbose and is intended mainly for debugging and support purposes.
Log file: application.log
Forms Servlet Documentation: Oracle® Application Server Forms Services Deployment Guide 10g Release 2 (10.1.2) Chapter 8
Return to Top

Class Loaders Debugging

To provide a generic summary of Class Loading as it applies to Oracle Applications Release 12, the following paragraph has been extracted from Oracle® Containers for J2EE Developer's Guide 10g Release 3, and paraphrased appropriately.
Standard classloaders are linked together in a parent-child hierarchy, with each classloader having an associated parent classloader. This hierarchy represents a tree structure, in which a child classloader imports a set of classloaders from its parent loader. In the OC4J context, all J2EE Applications Modules running within an OC4J instance are children of the system application. These Web Modules use multiple class loaders in place of a single system loader. Each deployed application (OACore, OAFM, Forms) has at least one loader, separate from all other applications; this means that each also has a distinct class-path. For each class lookup, the search begins at a specific loader level, and can normally only visit loaders "above" it. This means that a search starting at the Applications Web Module loader level would have a very different class-path than one starting at the system loader level.
Detailed information on on Class Loading within the J2EE Module may be found in Chapter 3 of Oracle® Containers for J2EE Developer's Guide 10g Release 3 (10.1.3).
Debugging Class Loaders in Applications Release 12 requires manual editing of the relevant files. The following example illustrates how to enable debug values for the Applications Module oacore in opmn.xml:
 ---------- excerpt ----------





data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Dclass.load.log.level=finest -Dclass.load.trace=loader-create -Dclass.load.log.file=/oracle/test.log -Doracle.security.jazn.config=/oracle/inst/apps/VIS_treebeard/ora/10.1.3/j2ee/oacore/config/jazn.xml"/>
---------- end excerpt ----------
-Dclass.load.log.level=
  • For debugging information the level should be set at "all" or below default
  • Available values
    • all - Output all log messages.
    • severe - Output messages at the SEVERE level only.
    • warning - Output messages at the WARNING level or above.
    • info - Output messages at the INFO level or above. Note that if the log level is set below "info" - for example, to "finer", then trace output will be filtered from the logger output.
    • config - Output messages at the CONFIG level or above. This is the default log level.
    • fine - Output messages at the FINE level or above.
    • finer - Output messages at the FINER level or above.
    • finest - Output messages at the FINEST level or above.
    • off - Suppress all logging messages.
-Dclass.load.trace=[[:[,]] | [~]]
There are many variations of values that may be used, depending upon the circumstances and issue. Further details on available events, may be found at: in Oracle® Containers for J2EE Developer's Guide 10g Release 3 (10.1.3): Chapter 3 Utilizing the OC4J Class Loading Framework: Table 3-13 class.load.trace System Property Values
Return to Top

Log Files

Log files provide an insight into the configuration and health of the Oracle Application Server. The tables below list the log file locations and provide a short description of the type of information recorded in each file.
Oracle Applications Release 12 allows application tiers to be shared. As part of this strategy, log files are in a central location for the specific Applications instance. Oracle Application Server log files referred to in this article are located on the application tier under $LOG_HOME/ora/10.1.3. The $LOG_HOME environment variable is defined in the Applications context file (which is pointed to by the environment variable $CONTEXT_FILE).
Note: It is not advisable to access files and alter logging levels that are not defined in the $CONTEXT_FILE (and therefore controlled through AutoConfig), unless requested by Oracle Support or Development for debugging purposes. If direct access is required to a file variable that is not editable, an enhancement request should be logged outlining the requirement and business need.

OPMN

Log File
Location
Description
Associated File and values
$CONTEXT_FILE Variable
opmn
Contains messages useful for monitoring the operations of the OPMN server. Output written to the opmn.log file contains the exit status of a child OPMN process. A status code of 4 indicates a normal reload of OPMN.
opmn.xml
none
opmn
Capture debug messages for Notification Server and Process Manager.
opmn.xml
none
opmn
Contains the standard output (stdout) and standard error (stderr) logs of OPMN. Also referred to as the OPMN "console log". After a certain point in OPMN initialization, nothing else will be written to this file.
none
none
OC4J~~default_group~<#>
example:
OC4J~forms~default_group~1
opmn
Process Control log file Standard out/err for j2ee Components
(shows GC size and timing)
none
none
opmn
Process Control log file Standard out/err for Component - http
none
none
std.err
example:
oacorestd.err
opmn/
_default_group_<#>
example:
opmn/oacore_default_group_1
Records standard out information from the OC4J runtime process designated
System.out
opmn.xml
none
std.out
example:
oacorestd.out
opmn/
_default_group_<#r>
example:
opmn/oacore_default_group_1
records standard error output from the OC4J runtime process designated
System.err
opmn.xml
none
Return to Top

HTTP Server

Log File
Location
Description
Associated File and Values
$CONTEXT_FILE variable
access_log.xxxxx
Apache/logs
Records all requests processed by the server.
No debug levels available
N/A
Contains diagnostic information, record any errors encountered when processing requests. It is the first place to look when a problem occurs with starting the Application server or with operation of the Application server, since it will often contain details of what went wrong.
httpd.conf
Directive:
Variable: LogLevel
Values: debug, info, notice, warn, error, crit, alert, emerg.
s_apache_loglevel
mod_rewrite.log
Records server rewrite actions.
httpd.conf
Directive: mod_rewrite Variable:RewriteLogLevel
Values: 0-9
None: default value 0
sec_audit.log
Used for auditing connections/requests.
security.conf
Directive: mod_sec Variable:SecAuditEnginel
Values: on, off, relevant
None: default value off
sec_debug.log
Debug security filter issues.
security.conf
Directive:mod_sec
Variable:SecFilterDebugLevel
values: 0-9
None: default value 0
ssl_engine.log
SSL connection requests/negotiation.
ssl.conf
Directive: mod_ssl
Variable: SSLLogLevel
values: none, error, warn, info, trace, debug
s_apache_loglevel
Return to Top

J2EE Applications Modules

Two types of log files can be generated by OC4J:
  • Plain text log files are the default log files used for OC4J components, and are ideal for use in a development environment. The messages logged in these text files can be read with any editor, including the Oracle Enterprise Manager 10g Application Server Control Console
  • Oracle Diagnostic Logging (ODL) log files use an XML format that is accessible via Oracle Applications Manager (requires OracleAS 10.1.3.1)
Note: ODL logging is not currently enabled or configurable using AutoConfig.
Log File
Location
Description
Associated File and Values
$CONTEXT_FILE variable
j2ee//_default_group_#
example:
j2ee/oacore/oacore_default_group_1
Text log file -- records actions specific to the application examples: servlet and jsp initializations.
system-application.xml
none
When true adds stack trace for certain runtime exceptions, shows full path from missing jsp files.
orion-web.xml
s_jsp_dbg_mode
default: false
global-application.log
j2ee//_default_group_#
example:
j2ee/oacore/oacore_default_group_1
Text Log File - records information related to all deployed J2EE Application Components start/stop
application.xml
none
system-application.log
Text Log File - records internal system J2EE application initialization.
system-application.xml
none
server.log
Text Log File - records Notification server (ons) actions.
server.xml
none
jms.log
Text Log File - records JMS (Java Messaging Service) actions
for distributed environments.
jms.xml
none
rmi.log
Text Log File - records RMI (Remote Method Invocation) actions
for distributed environments.
rmi.xml
none
log.xml
ODL Logging
j2ee-logging.xml
By default, currently commented out in configuration files.
system-application.xml
application.xml
server.xml
jms.xml rmi.xml
Return to Top

Known Issues

JOC fails to initialize

Errors:
Browser:
500 Internal ServerError
java.lang.NoClassDefFoundError at oracle.apps.fnd.sso.AppsLoginRedirect.AppsSetting(AppsLoginRedirect.java:120) at oracle.apps.fnd.sso.AppsLoginRedirect.init(AppsLoginRedirect.java:161)
Application.log:
html: Error initializing servlet
java.lang.NoClassDefFoundError
at oracle.apps.fnd.sso.AppsLoginRedirect.AppsSetting(AppsLoginRedirect.java:120)
at oracle.apps.fnd.sso.AppsLoginRedirect.init(AppsLoginRedirect.java:161)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.findServlet(HttpApplication.java:4617)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.findServlet(HttpApplication.java:4541)
The issue above has been observed both intermittently and at startup. In both cases the issue is with the port value for the java object cache. Either a port conflict at startup or multiple instances with JOC in distributed mode attempting to use the same port resulting in intermittent errors.
Solution:
Choose another value for $CONTEXT_FILE variable: s_java_object_cache_port

Compiled JSP files are removed or corrupted

In Applications Release 12, class files for .jsp's are not compiled at runtime for performance reasons. If the files are removed, directories may be changed or files may become corrupted
Example Error in Debug Mode:
Missing class: _OA
Missing class: _AppsLocalLogin
Missing class: _OAInfo
Missing class: _jsp._fnd._aoljtest
javax.servlet.ServletException: oracle.classloader.util.AnnotatedClassNotFoundException:
Solution:
Compile associated class files using ojspCompile.pl:
$FND_TOP/patch/115/bin/ojspCompile.pl ojspCompile.conf --compile --flush -p 20
OracleMetaLink Note 215268.1 contains complete syntax and definition

JOC fails in distributed mode when registering group members on AIX

This problem may be noted after a restart of the oacore process.
Error noted in $APPLRGF/javacache.log:
Cache initialization failed: reason
java.lang.ClassCastException: java.lang.Long incompatible with
oracle.ias.cache.group.Address
at oracle.ias.cache.group.Address.equals(Unknown Source)
at java.util.Hashtable.contains(Hashtable.java:347)
Error noted in application.log:
IAS Cache initialization failed. The Distributed Caching System failed to initialize on port: xxxxxx.The list of hosts in the distributed caching system is: Yourmachine.domain.com. The port xxxxx should be free on each host running the JVM's. The default port xxxxx can be overridden using -Doracle.apps.jtf.cache.IASCacheProvidercacheProvider.port=
Error noted in browser:
500 Internal Server Error

java.lang.NoClassDefFoundError: oracle.apps.fnd.profiles.Profiles (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:123)
at oracle.apps.fnd.sso.AppsLoginRedirect.AppsSetting(AppsLoginRedirect.java:120)
at oracle.apps.fnd.sso.AppsLoginRedirect.init(AppsLoginRedirect.java:161)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
Solution:
Apply patches 5261515 and 5946958
Bug 5968938 has been filed to include 5946958 in OracleAS 10.1.3.4

OPMN-controlled service will not start (Apache/OAcore/Any)

Error in std.err file:
Error initializing server: Error initializing ejb-modules: Resource exception(OracleASjms) for MessageDrivenBean event during endpoint activation: failure looking up ConnectionFactoryJndiName:jms/XAQueueConnectionFactory: javax.naming.NameNotFoundException: jms/XAQueueConnectionFactory not found
Solution:
Remove any *.lock files in $ORA_CONFIG_HOME/10.1.3/j2ee//persistence//
This issue is commonly found when the operating system is shut down without shutting down the Oracle Application Server, or where the instance is a clone made from a source where OracleAS was running.

Tuesday, January 11, 2011

Clearing cache for specific Component/Application in R12

Clearing cache for specific Component/Application in R12

Login as sysadmin
Select “Functional Administrator” responsibility
Go to Core Services ==> Caching Framework ==> Tuning
Query the application (for example iStore) or by Name or code.
Select the component and clear the cache.

Note: For some specific configuration changes, we need to bounce Apache also.

Clearing Global Cache in R12

a) Go to Functional Administrator Responsibility
b) Go to Core Services ==> Caching Framework
c) Go to Global configuration and clear all the cache from there.(Only If you want to clear all the  cache)


http://forums.oracle.com/forums/thread.jspa?threadID=527239

R12 Clear Cache is Required to See Supplie Site Updates [ID 1203685.1]

Tuesday, August 10, 2010

Compile Forms and Reports in 11.5.10.2

1) How to compile a form?

A) Open the source code in the client PC using X-Server
---------------------------------------------------------
i) Configure X-Server to access the GUI of the server.
ii) Open the form from the X-Server by using f60desm
iii) Make the changes in the forms according to your needs and save the form. The form will be saved in the server itself.
iv) Compile and generate the forms by using f60gen from the Putty / telnet session by using the following syntax.
f60gen module=form_name.fmb userid=apps/apps
or
f60gen module=form_name.fmb userid=apps/apps output_file=form_name.fmx
module_type=form batch=yes compile_all=special

v) f60gen will generate the run time executable .fmx file, move the file to the appropriate product top.

2) How To Compile Reports for Release 11i Applications?

A)
1. cd to where the .rdf files reside.
$cd /reports

2. Logon as applmgr

3. Use rwcon60 syntax for converting a .rdf file to a .rex file:

$ rwcon60 userid=/ source=< report name>.rdf
stype=rdffile dtype=rexfile dest=.rex overwrite=yes batch=yes

4. Use rwcon60 syntax for converting a .rex file back to a .rdf file:

$ rwcon60 userid=/ source=< report name>.rex
stype=rexfile dtype=rdffile dest=.rdf overwrite=yes batch=yes

5. Refer to the following example:

*Note: userid is the schema owner;
If the report is a GL report then the userid will be gl/gl
If the report is a FND report then the userid will be apps/apps

For the FNDSCURS.rdf example the report reside in:
cd $FND_TOP/reports

Logon as applmgr

The command line syntax is:

rwcon60 userid=apps/apps source=FNDSCURS.rdf stype=rdffile dtype=rexfile
dest=FNDSCURS.rex overwrite=yes batch=yes

rwcon60 userid=apps/apps source=FNDSCURS.rex stype=rexfile dtype=rdffile
dest=FNDSCURS.rdf overwrite=yes batch=yes

****************************************************************************
How To Generate A Report ( .RDF File) From The Unix Command on Release 11.5.X [ID 132638.1]

How To Customize And Compile An Application Seeded Form (FMB) Or Library (PLL)? [ID 427879.1]

Monday, July 5, 2010

Temp usage SQL's

Script to find the temp usage

SELECT S.sid,S.serial# sid_serial,S.INST_ID, S.username, S.osuser, P.spid, S.module,S.program, SUM (T.blocks) * TBS.block_size / 1024 / 1024 mb_used, T.tablespace,COUNT(*) sort_ops
FROM v$sort_usage T, v$session S, dba_tablespaces TBS, v$process P
WHERE T.session_addr = S.saddr
AND S.paddr = P.addr
AND T.tablespace = TBS.tablespace_name
GROUP BY S.sid, S.serial#, S.username, S.osuser, P.spid, S.module,S.INST_ID,
S.program, TBS.block_size, T.tablespace
ORDER BY sid_serial;

To get the SQL running in the temp tablespace

SELECT S.sid || ',' || S.serial# sid_serial, S.username,
T.blocks * TBS.block_size / 1024 / 1024 mb_used, T.tablespace,
T.sqladdr address, Q.hash_value, Q.sql_text
FROM v$sort_usage T, v$session S, v$sqlarea Q, dba_tablespaces TBS
WHERE T.session_addr = S.saddr
AND T.sqladdr = Q.address (+)
AND T.tablespace = TBS.tablespace_name
ORDER BY S.sid;


How Do You Find Who And What SQL Is Using Temp Segments (Doc ID 317441.1)

SELECT a.username, a.sid, a.serial#, a.osuser, a.program, a.module, d.spid, b.tablespace, b.blocks, c.sql_text
FROM v$session a, v$tempseg_usage b, v$sqlarea c, v$process d
WHERE a.saddr = b.session_addr
AND a.paddr= d.addr
AND c.sql_id = b.SQL_ID_TEMPSEG
ORDER BY b.tablespace, b.blocks;


SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, b.blocks, c.sql_text
FROM v$session a, v$tempseg_usage b, v$sqlarea c
WHERE a.saddr = b.session_addr
AND c.address= a.sql_address
AND c.hash_value = a.sql_hash_value
ORDER BY b.tablespace, b.blocks;

Friday, April 9, 2010

Tracing

10046 Trace Level Description
1 Basic trace level. Like the standard SQL_TRACE trace file. Provides statistics for parse, execute, fetch, commit and rollback database calls.
4 Displays bind variables
8 Displays wait statistics
12 Displays wait statistics and bind variables


ALTER SESSION SET
EVENTs=’10046 trace name context forever, level 12’;


Concurren tprogram trace--level 8


How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]
TKProf Interpretation (9i and below) [ID 32951.1]

**************************************************************************
Login as Sysadmin -> System Administrator -> Concurrent : Program -> Define
Press F11 -> Enter the COncurrent Program Name (Eg. Active Users) -> Press Ctrl + F11
Enable the check box “Enable Trace” above “Copy To” button.
Click on Save.
Close the window.
Select Requests -> Run
Submit the concurrent request.

After completion or during execution of the request, you should see a trace file generated on the database server under udump directory.

SQL to identify the trace file

select oracle_process_id from fnd_concurrent_requests where request_id=[request_id];

DB Node
cd $ORACLE_HOME/admin/[SID]_[hostname]/udump
ls -latr *[oracle_process_id]*.*

Thursday, April 8, 2010

What is enq: TX - row lock contention

Enqueues are locks that coordinate access to database resources. enq: wait event indicates that the session is waiting for a lock that is held by another session. The name of the enqueue is as part of the form enq: enqueue_type - related_details.

The V$EVENT_NAME view provides a complete list of all the enq: wait events.

TX enqueue are acquired exclusive when a transaction initiates its first change and held until the transaction does a COMMIT or ROLLBACK.

Several Situation of TX enqueue:
--------------------------------------
1) Waits for TX in mode 6 occurs when a session is waiting for a row level lock that is already held by another session. This occurs when one user is updating or deleting a row, which another session wishes to update or delete. This type of TX enqueue wait corresponds to the wait event enq: TX - row lock contention.

The solution is to have the first session already holding the lock perform a COMMIT or ROLLBACK.

2) Waits for TX in mode 4 can occur if a session is waiting due to potential duplicates in UNIQUE index. If two sessions try to insert the same key value the second session has to wait to see if an ORA-0001 should be raised or not. This type of TX enqueue wait corresponds to the wait event enq: TX - row lock contention.

The solution is to have the first session already holding the lock perform a COMMIT or ROLLBACK.

3)Waits for TX in mode 4 is also possible if the session is waiting due to shared bitmap index fragment. Bitmap indexes index key values and a range of ROWIDs. Each ‘entry’ in a bitmap index can cover many rows in the actual table. If two sessions want to update rows covered by the same bitmap index fragment, then the second session waits for the first transaction to either COMMIT or ROLLBACK by waiting for the TX lock in mode 4. This type of TX enqueue wait corresponds to the wait event enq: TX - row lock contention.

Troubleshooting:

for which SQL currently is waiting to,

select sid, sql_text
from v$session s, v$sql q
where sid in (select sid
from v$session where state in ('WAITING')
and wait_class != 'Idle' and event='enq: TX - row lock contention'
and (
q.sql_id = s.sql_id or
q.sql_id = s.prev_sql_id));

The blocking session is,
SQL> select blocking_session, sid, serial#, wait_class, seconds_in_wait from v$session
where blocking_session is not NULL order by blocking_session;



select a.sid, a.event, a.total_waits, a.time_waited, a.average_wait
from v$session_event a, v$session b
where time_waited > 0
and a.sid=b.sid
and b.username is not NULL
and a.event='enq: TX - row lock contention';


Select blocking_session, sid, serial#, wait_class,seconds_in_wait
From v$session where blocking_session is not NULL
order by blocking_session;

Saturday, January 2, 2010

CM scripts

CMCLEAN.sql Non Destructive Script to Clean Concurrent Manager Tables
ICMLOG.sql This Script will provide the location for Retrieving the Internal
Manager log file.
CMLOGS.txt Script for Retrieving Log files associated to a Concurrent Request.
CCM.sql This script will diagnose Concurrent Managers and Concurrent
Requests.
REQCHECK.sql  Script for diagnosing problematic Concurrent Requests.
ANALYZEPENDING.sql Script for diagnosing Pending Concurrent Requests.
WHOCANRUN.sql  Script that lists Responsibilities that can Run a Given
Concurrent Program.

Friday, January 1, 2010

How to find the versions

Q. How to find Apps Version (11i/R12/12i).
A. 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
Q. Web Server/Apache or Application Server in Apps 11i/R12
A. 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
Q. Forms & Report version (aka developer 6i) in 11i
A. 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)

Q. Forms & Report version in R12/12i
A. Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/rwrun | grep Release
Output should be like
Report Builder: Release 10.1.2.2.0
You can safely ignore warnings
Q. Database Version in 11i/R12/12i
A. Go to database section below.
Q. Oracle Jinitiator in 11i/R12/12i
A. 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 )
Q. Oracle Java Plug-in in 11i/R12/12i
A. Log in as Application user, set environment variable and run below query
grep plugin $CONTEXT_FILE
Q. File Version on file system
adident Header
or
strings | grep Header
Here adident is AD Utility (Oracle Apps) and strings is Unix utility
Q. 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 $’);
Q. OA Framework Version
A.http:// hostname.domainName:port/OA_HTML/OAInfo.jsp (Only for 11i)
A. 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
Q. Discoverer Version for 11i (3i or 4i)
A. Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/disc4ws | grep -i Version
Q. Discoverer Version for 11i or R12 (10g AS)
Check under Application Server Section as 10g AS Discoverer is on standalone
Q. Workflow Version with Apps
A. 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 mon jul 14 14:14:21 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
C. Application Server
1. Oracle Application Server 10g Rel 3 (10.1.3.X)
cat $ORACLE_HOME/config/ias.properties | grep Version
Version=10.1.3.0.0
2. For Oracle Application Server 10.1.2 (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;
AOC4J (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

Plan SQL's

SELECT sql_id, plan_hash_value, executions, inst_id FROM gv$sql WHERE sql_id='bhwamkg4y2pxb'; SELECT ...