Oracle applications - Surendranath Subramani: May 2015

Tuesday, May 19, 2015

Oracle Patch Impact analysis

Objective:

Oracle always provides patch to fix bugs, add more features, improvements and so on.
So while implementing patch in development environment everyone wants to know the impact of the patch, what objects are impacted, how many files are added or changed etc.

Various method:

There are 2 methods this can be achieved.

  1. adpatch
  2. Patch wizard
1. adpatch:

You can install patch with apply mode=no (by default it is yes).
apply=no mode will provide a snap shot of what the patch will do (like introducing new file, changing exisitng files and so on) but it will not apply the patch.

The syntax for using this mode is: 
$ adpatch apply=no 

Problem with this method:

The major issue with this method is lets say if you are applying patch set which involves 500+ objects then reading log file (log file which generated from adpatch) will be a big hassle because you will have to go through each object one by one and get the complete list of impacted objects. Also it will not tell you whether it has modified or creating.

2. Patch wizard:

This method is easy to use and efficient way to get impact analyzed.

Steps to follow:

a. You can analyze patch either having Patch wizard itself download patch from metalink.oracle.com for you and then do the analysis [or] you can download patch manually and then have patch wizard do analyze for you.

We will talk more about how to analyze patch after downloading manually patch from metallic.oracle.com

a. Login as SYSADMIN and navigate to patch wizard

























b. Naviage to site map tab --> maintenance (sub tab) -->  patch wizard



c. Change preference (this is one time setup)






d. Provide staging directory in the preference.
Remember this location should have full access.
























e. create ad directory within staging location. <staging directory>/ad
Move patch.zip file to <staging directory>/ad
e.g.: /patches12/ad

f. Move InfoBundleR12.zip file to staging directory. Patch wizard requires this file because this stores the meta data for analyzes.

g. Give patch # and perform the analysis.




























h. Once analyse is done you can click on the details to find more about the impacts like
       a. No of file changed
       b. No of files newly added
       c. Object type
       e. Impacted modules, etc...



Using below query you can get the list of patches analyzed and other details:

select
adp.bug_number patch_name,
adp.product_family_abbreviation ,
ad_pa_validate_criteriaset.get_cs_prod_fam_abbr(adp.product_abbreviation) product_family_abbreviation,
nvl(adp.product_abbreviation, ' ') ,
adp.bug_description ,
INITCAP(NVL(adp.patch_type,'User Request')) Patch_Type ,
(SELECT COUNT(*) FROM ad_pa_anal_run_bug_prereqs aparbp
WHERE adb.analysis_run_bug_id = aparbp.analysis_run_bug_id ) prereq_cnt,
DECODE (adh.bug_number, NULL, 'N', 'Y'),
adt.name ,
adb.analysis_run_id ,
analysis_run_bug_id ,
ads.snapshot_id ,
ad_pa_validate_criteriaset.get_cs_prod_fam_name(adp.product_abbreviation) product_family_name ,
appi.product_name ,
(SELECT COUNT(*) FROM ad_pa_anal_run_bug_codelevels aparbc
WHERE adb.analysis_run_bug_id = aparbc.analysis_run_bug_id ) level_cnt ,
decode (adb.analysis_status,'MISSING','Missing','READY','Unapplied','APPLIED','Applied',adb.analysis_status) patch_status ,
nvl(decode(adp.has_msi_steps,'Y','Yes','N','No',adp.has_msi_steps), ' ') hasMsiSteps ,
adp.baseline ,
adp.entity_abbr ,
adp.patch_id
from
ad_pm_patches adp ,
ad_appl_tops adt ,
ad_pa_analysis_run_bugs adb ,
ad_pm_product_info appi ,
ad_snapshots ads
,ad_hidden_patches adh
where
1=1--adb.analysis_run_id = 402352 --<request_id>
--and adb.analysis_status in ('MISSING','READY','APPLIED')
--and ads.SNAPSHOT_TYPE = 'G'
--and adt.NAME ='GLOBAL'
and adb.appl_top_id = adt.APPL_TOP_ID
and ads.appl_top_id = adt.APPL_TOP_ID
and appi.product_abbreviation = adp.product_abbreviation
and adb.bug_number = adp.BUG_NUMBER
and adb.baseline = adp.baseline
--and adp.patch_metadata_key = 'DEFAULT'
--and adp.is_code_level = 'Y'
and adh.bug_number(+) = adp.BUG_NUMBER
order by patch_name;

Tuesday, May 12, 2015

Oracle Purchasing: Buyer Work Center (Bulkload /update feature in Blanket Agreements BPA)

Objective:

In this article we will see what is buyer work center and its benefits and talk more on "Upload feature in  Agreements"

What is buyer work center:

Buyer work center is a web application application. it is a new feature in R12.
It can be accessed through Purchasing super user responsibility.

Benefits:
  1. Gives buyer handy way to access demand workbench (PO, Requisition) in a simple view and easy access.
  2. Can create standard PO, Blanket Purchase agreements, etc.
  3. Easy to create and maintain day-to-day activities.

Bulload or Update Agreements:


Prior to R12 if buyer want to update 100+ lines on the agreement he had to either update each line manually or IT had to create some custom upload functionality and use standard APIs to create upload feature to correct multiple lines on the agreement.

In R12 oracle has given bulk feature to create or update multiple lines on an agreements.

How can this be achieved?

Detail information can be found in Oracle document ID: 1309351.1

Monday, May 11, 2015

OAF - Startup (Setup Jdeveloper and configure tutorial workspace)

Objective:


Once you install JDeveloper there are various questions raised on how to configure JDev and how to run sample (tutorial) workspace to make sure install is right.



Steps to follow:

  1. Install JDeveloper (See Note 416708.1 How to find the correct version of JDeveloper to use with eBusiness Suite)
  2. Create JDEV_USER_HOME environment variable (JDEV_USER_HOME=C:\Suren\JDEV 10.1.3.3 OAF\jdevbin\jdev) (See image below A)
    1. Oracle has recommended to use jdevhome directory to set environment but while i was working in 10.1.3.3.03 jdeveloper myproject was in jdevbin and all other lib are in jdevbin so i have use jdevbin to set in environment variable and it worked fine.
  3. Assigned below responsibility to my user account
    1. OA Framework ToolBox Tutorial (responsibility key is FWK_TBX_TUTORIAL)
    2. OA Framework ToolBox Tutorial Labs (responsibility key is FWK_TOOLBOX_TUTORIAL_LABS)
  4. Get .dbc file from server ($FND_SECURE)
  5. FTP .dbc file to C:\Suren\JDEV 10.1.3.3 OAF\jdevhome\jdev\dbc_files\secure\
    1. Note: you can find dbc_files folder in multiple locations like (C:\Suren\JDEV 10.1.3.3 OAF\jdevbin\oaext\dbc_files\secure) but do not get diverted use the one mentioned above.
  6. Enabled Tools->change 'Embedded OC4J Server Preferences' to 'Default Local IP Address' (see image below B).
Run sample (tutorial workspace):
  1. By default JDeveloper comes with tutorial workspace and its dependent files.
  2. You can find them under jdevbin/Tutorial.zip
    1. You will find 3 folder under Tutorial.zip 
      1. dbc_files
      2. myhtml
      3. myprojects
    2. unzip myhtml file under \jdevbin\jdev\myhtml
    3. unzip myproject folder under \jdevbin\jdev\myprojects
  3. Open JDeveloper and click file open >> toolbox.jws 
  4. once you open the file you will get popup message saying "Open warning window" "You are about to migrate the application to new version of JDeveloper". 
  5. Click Yes/ Ok.
  6. Expand the workspace and click on project property (2 options are there, 1. you can double click on project or right click and say project property)
  7. 3 basic things to be done to the project property. (see Image below C)
    1. DB connection
    2. Run time options
    3. Run time connection 
  8. Right click on Tutorial project to Rebuilt
  9. Run "test_fwktutorial.jsp" you will see window like shown in image D.
  10. If you see '500 page does not display" error make sure you delete myclasses folder and rebuit the projects.



Image A


Image B


Image C




Image D