Wednesday, 7 January 2015

oracle apps adpatch interview question and common information's

Patching:
==========
 

The best place to start about adpatch is Note:181665.1 know more about adpatch basics. ***
Please go thought the document to get basic and in depth knowledge of adpatch.

We have below type of drives
No of drives ==> u, or c( copy driver), d(Database driver) and g(Generate dreiver)


Files:
=====

Apps patch log file:
====================

11g:APPL_TOP/admin/SID/log

R12:$APPL_TOP/admin/$TWO_TASK/log

Following are some log files that may also be updated by the patch.
 adlibin.log (libin commands)
 adlibout.log (libout commands)
 admvcode.log (copying files to destination)
 adrelink.log (relinking executables)
 adwork01.log (adwork02.log, adwork03.log, etc. Depending on # workers used.
Generated by the D and G drivers)
req files (Some processes may generate .req files. There are numerous different commands that generate a .req file. Below is one example. This line was found in a adwork01.log file.


OPatch log file:
=================

Unix: $ORACLE_HOME/.patch_storage/<patch_id>/<logfile>

++ AD_TOP/bin  ==> is the loction of adadmin,adpatch and all other ADutitlities

Prior to AD Minipack E, patch history was stored in a text file called applptch.txt in the $APPL_TOP/admin/<SID> directory. AutoPatch appended the applptch.txt file with information about each patch applied.

With AD Minipack E, the new Patch History feature stores all patch information in database tables. If the information cannot be written to the database, it is stored in files in the file system, and is automatically loaded to the database the next time AutoPatch is run. In AD Minipack E, the temporary patch history file was named applptch.txt. In AD Minipack H (and later), there are two patch history files: javaupdates<timestamp>.txt to record patch history about changes to Java files, and adpsv<timestamp>.txt to record patch history about changes to all non-Java files.

The best way to review patch history information is to use the Applied Patches search pages provided by Oracle Applications Manager. The patch history database feature allows you to query on patches or files applied and filter by patch number or file name, as well as date, product, APPL_TOP name, server type, or language



Question:
========

patch with unified driver we want to apply the patch with only generate driver, and  how to apply?

Answer:
=========

Use the options nocopyportion and nodatabaseportion.

Way to apply patch in multi node
================================

we have 2 node installation
node1 contains----->admin,cm,reports,database
node2 contains------>forms,web
so i shall apply c driver and g driver on node 1 and node 2 and d driver on node 1. and the sequence should be same like first c driver on node1 and node 2,d driver on node 1 and g driver on node1 and node 2

Question:
===========

How to stop the worker
Ans:
===

adctrl utility which allows you to terminate a work if necessary
Hiden option is used to skip the worker

Question:
=========

What are the LDT,LCT and ODF files?
Ans:
====

ODF-means object description files..it contains descriptions about objects

LCT,LDT are metadata files..

Most of patches contains lct,ldt files...

Question:
========

I check that my instance has all the latest patches ?
Ans:
====


To see if you have all the latest patches installed you can use the patchset.sh utility that can be downloaded from Oracle's website.

Another alternative is to use the OAM Patch wizard.


Question:
=========

i had applied some 4 different patches and some objects got invalid.how can i find due to which particular patch the object became invalid
Ans:
=====

This is one way of checking this. Get the filename of the object which is invalid. Suppose a procedure has become invalid, get the filename of the procedure and check for the file name in any of the patches that you had applied. If you find it, check the patch log to see if that file was indeed executed (sometimes the patch might have a equal or lower version of the same file in which case it would not have been copied and executed). If you find this file has been executed in the patch log, then I guess this would have answered your question.
Question:Error:
===============


while applying a patch, u get a failure message " cannot regenerate JAR files."

Ans:
====

Check patch log file to find cause of failure in regeneration of Jar file , you can continue with patch (by skiping this message, when prompted : Consider this patch failure Yes or No select No and continue with patch)

Run adadmin to generate jar file manually and fix any issues regarding jar files looking at logs.

Most common reason for this kind of error is wrong classpath or wrong java pointer
Ans-B:
======

Another common reason is a missing identity.obj file in $HOME.

Question:
========

node1 contains----->admin,cm,reports,database
node2 contains------>forms,web

If you have only u driver, you need to apply them in both the nodes. U driver is unified driver which is a combination of c,d and g.

If I apply like this below.

adpatch driver=u1234567.drv

Ans:
===

when you apply u driver, you have to use option=nodatabaseportion in node 2.
And in node 1, you just apply u driver, it ll do all the jobs of c, d and g driver.

Question:
=========

Apply=no?
ANs:
====

If you apply the patch with apply=no.....it will not apply the patch, but it will specify, which files it will copy, change, update, which profile options will be changed..all information will be stored in patch log file, lgi files which will be stored in $APPL_TOP/admin/<SID>/log directory..

Question:
=========

How to apply stack patch


Question:
=========

How to upgrade from 11.5.10.2 from 11.5.10.
Ans:
===

If you want to move from 11.5.10 to 11.5.10.2.....

Apply the CU2 for 11.5.10...

Check the fnd_product_groups which is the version you have

If it dispaly  11.5.10.1  then its CU1 then you have to apply cu2

Ques:
=====

In the mid of main patch you got error for applying pre patch,So How to apply the pre_patch?
Ans:
===

http://oracletechdba.blogspot.com/2015/01/in-mid-of-main-adpatch-you-got-error.html

1.take Backup of fnd_install_process,ad_deffered_jobs table and .rf9 files..
2.after taking backup drop those tables and .rf9 files
3.apply the prerequisite patch through adpatch only
4.after completion of prerequisite patch..restore those two tables and .rf9 files.
5.after restoring run the command adpatch
in this case it will ask for the previous session was not copleted..do u wish to continue ..like that..there u enter yes.than it will automatically start the main patch from where u stoped..


Tips:
=====

Applying patch RUP2 in R12 ==>Normally it take 6 hrs,But it still running
1.Check the status of worker in the adctrl ==> running
2.check the log file
3.Check the alert log
4.Check the job remaining
5.check the CPU usage
6.Check the process in the OS level for the application

Tips while applying RUP2 patch

1) Before applying the RUP2, check whether the downloaded files are able to extract in local windows. Because due to Internet Slag, sometimes the downloaded zip may show the bytes perfect but some files will be missing.

Hence i always suggest you to download in best bandwidth

2) Ensure to take complete backup of the Environment

3) Patch applying may consume more than 9 hrs (minimum). Our Server has 8 GB RAM & Dual Xeaon Processor, with single instance running

4) Ensure that there are no Invalid objects in the DB

5) As per the Patch Readme doc apply the patch.

6) During the process, observe two things

a) Server Process status. i.e DB & APP OS user activity shoudl be active

b) Thru <adctrl> command observe the workers status ( For our application there were 8 workers )

If the are followed, hope patch applying will be successfull.

Note:- This patch has rectified our minor error. Since we are at early stage of Apps setting, we couldn't see significant implication. But as this RUP we have installed.


Tips-2:
======

In windows the patchset.sh is not working so try this

Here type the command env shell
D:\apps\visappl> envshell
-> A new window spawns with the correct env settings
D:\apps\visappl> sh
$
d) Run the patchsets program from the APPL_TOP/admin/ directory
$ cd /admin/$SID

Script:
======

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

SQL>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_ACION_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 = '<Patch Number>')) GROUP BY J.PATCH_NAME, H.APPLICATINS_SYSTEM_NAME, H.NAME, I.DRIVER_FILE_BNAME, D.APP_SHORT_NAME, D.SUBDIR, D.FILENAME, E.ACTION_CODE


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

SQL>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

Recently oracle released this utility as per the
docuent ( 139684.1). patchsets.sh utility from Oracle Support Service. ( patchsets comparision utility). Any how this is taken from AD_BUGS and AD_APPLIED_PATCHES.

SQL>select PATCH_LEVEL, LAST_UPDATE_DATE from fnd_product_installations where patch_level like '%&Product_short_name%'
Enter value for product_short_name: AD

column Product format a6
column patch_id format a15
set head off
set pagesize 2000
select distinct b.application_short_name     product,
 ap.patch_name patch_id, trunc(pr.end_date)                
from ad_bugs b,
  ad_applied_patches ap,
  ad_patch_drivers pd,
  ad_patch_runs pr
where
b.bug_number = ap.patch_name
and pr.patch_driver_id = pd.patch_driver_id
and pd.applied_patch_id = ap.applied_patch_id
and ap.patch_name != 'merged'
order by 2,1,3;
quit

=============================================================
Before applying the patch please check with the below query,If the patch is applied or not
=============================================================
http://oracletechdba.blogspot.com/2015/01/oracle-apps-how-to-find-adpatch-is.html


select ab.bug_number, ab.creation_date
from ad_bugs ab
where ab.bug_number = '&Patch_no';


select aap.patch_name, aat.name, apr.end_date
from ad_applied_patches aap,
ad_patch_drivers apd,
ad_patch_runs apr,
ad_appl_tops aat
where aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and aat.appl_top_id = apr.appl_top_id
and aap.patch_name = '&Patch_no';


select distinct aprb.application_short_name as "Affected Modules"
from ad_applied_patches aap,
ad_patch_drivers apd,
ad_patch_runs apr,
ad_patch_run_bugs aprb
where aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and apr.patch_run_id = aprb.patch_run_id
and aprb.applied_flag = 'Y'
and aap.patch_name = '&Patch_no';

============

LINKS:
======

Note 457566.1 Oracle Applications Patching FAQ for Release 11i
Note 459156.1 Oracle Applications Patching FAQ for Release 12
Note:181665.1 to know more about adpatch basics. ***
Note:39684.1  patchsets.sh utility from Oracle Support Service.
Note:130369.1  HRMS PATCH INSTALL FAQ
Note:145837.1 Latest HRMS (HR Global) Legislative Data Patch Available
Note 340169.1 to get the patch list
Note 175485.1-How to Apply an 11i Patch When adpatch is Already Running



Note 225165.1 Oracle Applications Release 11i Patching Best Practices and Reducing Downtime
Note 242480.1 Using a Staged Applications System to Reduce Patching Downtime

Note 242480.1 Using a Staged Applications System to Reduce Patching Downtime

Note 236469.1 Using Distributed AD in Applications Release 11.5.

Note 60766.1 11.0.x : Patch Installation Frequently Asked Questions
Note 60765.1  Patch Installation Frequently Asked Questions - Part II

Note 69798.1 Basics of Relinking an Executable or Binary in an Oracle  Developer Environment


Information Center: Patching E-Business Suite Utilities (AD, Clone, Autoconfig) [1377810.2]
12c:
Oracle E-Business Suite Release 12.2: Online Patching FAQ (Doc ID 1583902.1)
Document 1584097.1, Oracle E-Business Suite Release 12.2: Backup and Recovery Guidelines For Online Patching Cutover
Document 1355068.1, Oracle E-Business Suite 12.2 Patching Technology Components Guide
Document 1577661.1, Deploying Customizations in Oracle E-Business Suite Release 12.2

No comments: