Thursday, March 30, 2017

Which device is mapped Oracle ASM disk?

[root@rac2 ~]# oracleasm listdisks
CRSVOL1
DATAVOL1
FRAVOL1

[root@rac2 ~]# oracleasm querydisk -d  DATAVOL1
Disk "DATAVOL1" is a valid ASM disk on device [8,33]

[root@rac2 ~]# ls -ld /dev/*|grep "8,  33"
brw-rw----  1 root disk      8,  33 Mar 29 19:09 /dev/sdc1

Monday, March 20, 2017

R12.2 Upgrade Miscellaneous Stuffs

Autopatch Preinstall Mode:

Pre-install mode is generally used during the upgrade process to update AD utilities, apply pre-upgrade patches, or work around other patching issues. AutoPatch asks all startup questions except those relating to the database.

Note: Run AutoPatch in pre-install mode only if the patch readme instructs you to do so.
To run AutoPatch in pre-install mode, include preinstall=y on the AutoPatch command line. It performs the following actions:

  • Compares version numbers
  • Copies files
  • Relinks FND and AD executables
  • Saves patch information to the file system
Because AutoPatch does not read driver files in pre-install mode, it copies all product files in the patch to the APPL_TOP directory. Additionally, even if a file in the patch should be both in the APPL_TOP and in another directory (such as in $OA_HTML), AutoPatch copies the file only to the APPL_TOP.

Each patch run in pre-install mode will have its driver staged to a predetermined directory under the APPL_TOP. This allows AD Merge Patch to be run once for all pre-install updates, and merging with the upgrade driver only. See AD Merge Patch Enhancements for further details.

In preinstall mode, AutoPatch validates codelevels against the files Preinstall_Codelevel_AD.txt and Preinstall_Codelevel_MP.txt. These files are located in the $APPL_TOP/admin directory, and contain codelevel information about AD and other products registered in the database tables.

Since no database connection is available in pre-install mode, AutoPatch tries to validate whether the current patch should be applied based on the codelevel information in these two files, as follows:

  • If Preinstall_Codelevel_AD.txt is missing from the APPL_TOP, AutoPatch will apply the patch in pre-install mode without validating the patch for codelevel compatibility.
  • If Preinstall_Codelevel_MP.txt is missing from the APPL_TOP, AutoPatch will proceed with patch application without validating the patch for codelevel compatibility of the entities.
  • If both files are missing, AutoPatch will not validate codelevels in pre-install mode.


AD Merge Patch Enhancements:

-preinstall

This option is used to run AD Merge Patch in pre-install mode, where it will only merge the patch driver files present in the $APPL_TOP/admin/$TWO_TASK/preinstall directory. The -preinstall option implicitly enables the -driveronly option, and takes the source directory as $APPL_TOP/admin/$TWO_TASK/preinstall directory.

The -s option can be used in conjunction with the -preinstall option to specify the source directory and merge critical driver files. As pre-install upgrade driver files are copied to the pre-install directory when AutoPatch is used in pre-install mode, the combination of these options merges pre-install upgrade driver files with the master upgrade driver file.

The -preinstall option means that there are associated changes in how AutoPatch is used. These are described in Pre-Install Mode.

--master
This option is used to specify the master upgrade driver that is to be merged with the pre-install upgrade drivers. It is only valid with the -preinstall or -driveronly options.

-admode
AD Merge Patch is now restricted to merge either AD-only patches or non-AD patches. By default, AD Merge Patch will run in non-AD mode unless the –admode option is specified. In non-AD mode, AD Merge Patch will merge the non-AD patches present in either the source directory specified by the -s option, or the pre-install directory if -preinstall is specified.

Note: When merging patches, AD patches present in the source directory are ignored in non-AD mode.

Examples

Merging the non-AD patch driver files that are present under the patchtop:
admrgpch -s source -d dest -driveronly

Merging the non-AD patch driver files with the non-AD upgrade driver file found under upg:
admrgpch -s source -d dest -driveronly –master upg/upgrade.drv

Merging non-AD patch driver files present in the "preinstall" directory with non-AD upgrade driver files, in pre-install mode:
admrgpch -preinstall -d dest -master upg/upgrade.drv

Merging AD patch driver files with AD upgrade driver files in pre-install mode:
admrgpch -preinstall -d dest -master upgrade/upgrade.drv –admode 

Monday, March 6, 2017

How to Create Defaults file in R12 for adadmin?

Note: Default file location should be $APPL_TOP/admin/$TWO_TASK in R12.2

adadmin defaultsfile=$APPL_TOP/admin/DSDEV/adadmin_defaults.txt


Answer the questions below:

Your default directory is '/app/dsdev/fs1/EBSapps/appl'.
Is this the correct APPL_TOP [Yes] ? 

AD Administration records your AD Administration session in a text file
you specify.  Enter your AD Administration log file name or press [Return]
to accept the default file name shown in brackets.

Filename [adadmin.log] : 

You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ? 

Please enter the batchsize [1000] : 


Applications System Name [DSDEV] : DSDEV *


You are about to use or modify Oracle E-Business Suite product tables
in your ORACLE database 'DSDEV'
using ORACLE executables in '/app/dsdev/fs1/EBSapps/10.1.2'.

Is this the correct database [Yes] ? 

AD Administration needs the password for your 'SYSTEM' ORACLE schema
in order to determine your installation configuration.

Enter the password for your 'SYSTEM' ORACLE schema:  


The ORACLE username specified below for Application Object Library
uniquely identifies your existing product group: APPLSYS

Enter the ORACLE password of Application Object Library [APPS] :  

AD Administration is verifying your username/password.

Backing up restart files, if any......Done.

         Generate Applications Files
   ----------------------------------------

   1.    Generate message files

   2.    Generate form files

   3.    Generate report files

   4.    Generate product JAR files

   5.    Return to Main Menu


Now Press ctrl +c or ctrl+d

Here after you can use the below command to call adadmin

adadmin defaultsfile=$APPL_TOP/admin/DSDEV/adadmin_defaults.txt  logfile=arall.log

Types of Patches in Oracle Apps 11i/R12

E-Business Suite patching is very broad topic. so Decided to split it into two logical parts.


Part 1) Oracle E-Business Suite patch terminology

patch type hierarchy

patch naming convention

naming differences between 11i and R12


Part 2) Querying patches, patchsets, family packs

how to check if a patch was applied

what patchset am I on?

what family pack am I on?


Patch hierarchy in 11i:

One-off Patches:The One-off patch category was common in the older versions R11 (11.0.x) and early releases of 11i. Typically, they fix single or isolated set of bugs. They are less and less common these days. Unless they fix a very critical and isolated bug, Oracle won’t release patches as standalone, but will consolidate them into larger bundles.


Product Patchsets (formerly known as Minipacks):Standalone patchsets were common in early releases of 11i. They can enhance functionality and typically fix a large number of bugs for a single product. Once a patchset is applied, it increments the patchset level of a product (the product is sometimes also referred to as module). There are around 200 products integrated in EBS, and each product has specific patchset level. For most products, patchsets are no longer distributed as standalone (which means you won’t be able to download them from metalink), but are grouped into Family Packs.


Rollup Patches: Roll-up patches are a special kind that started to become more common as 11i matured. They are collection of bugfixes for a specific product and relate to specific patchset level. They are released outside of a patchset release cycle. If a particular patchset turns out to be buggy it can have several roll-up patches, which are usually cumulative. These patches are sometimes referred to as a number after a patchset letter, as in case of 11i.AD.I.4.


Family Packs:As the complexity and dependencies between individual products increased, it became more and more difficult to release isolated patchsets for each product. Oracle grouped all interrelated products into families fulfilling a specific functional purpose. Family packs are seta of product patchsets for a particular family (such as Financials, Project Suite, Applications Technology, and so on). The family pack’s advantage is that the patchset levels were tested together, and should therefore be more stable and require fewer pre-requisites. Despite that fact, applying a family pack is a major change to the system, and should be rolled out carefully.


Consolidated Updates: As the EBS product matured in version 11i, Oracle started to release consolidated updates. These are huge updates similar to maintenance packs. They introduce change the fourth version number. You can think of it as a set of compatible family packs. The best-known consolidated update is CU2 which upgrades your system to version 11.5.10.2.


Maintenance Packs (in R12 Release Update Packs):Maintenance packs deliver a new version of a product. Unlike major release upgrades, maintenance packs change the release number, which is the third number in a version name (for 11i). They are still considered patches, but the changes they introduce are system-wide. Often they also bring in brand new products.


Patch naming conventions:

Every patch, irrespective of kind, has an identifier in form of a seven-digit number, that particular identifier corresponds with a bug number. The bug can be just a placeholder for the consolidation of other patches that are eventually merged into a bigger patchset, family pack etc.

For one-off patches, the 7-digit number is their only identifier.

There are around 200 products in E-Business Suite, and each product has a specific product name and product abbreviation. The Patchset level naming convention has an alternative to the patch number for easier identification. It consists of version number, product abbreviation, and a letter.

For example: 11i.FND.H refers to patchset H for product FND for version 11i and it can be found under patch number 3262159.

Family packs add an additional component to the short name which is “_PF” after the product name abbreviation.

For example: the Application Technology family pack is referred to as 11i.ATG_PF.H (which corresponds with patch number 3438354), and the Financial suite family pack is referred to as 11.FIN_PF.G etc.

Consolidated updates were introduced after release 11.5.10. They append another number after the version number. So consolidated update 2 is referred to as 11.5.10.2 or simply CU2 (or as patch number 3480000).

Maintenance packs are the last piece in the puzzle. Their alternative names are same as the version number, so it’s 11.5.9, 11.5.10 etc.


Changes with R12 and new facts in the patch naming conventions

R12 introduces some new terms—codeline and codelevel—and changes the meaning of several established terms.

codeline: This refers to a point release. Every codeline delivers a unique set of features. So release 12.0 is a understood as codeline A; release 12.1 is understood as codeline B; release 12.2 will be understood as codeline C, and so on.

codelevel: Codelevel can resemble patchset level from 11i. For each codeline, there can be a set of updates, which deliver mostly bugfixes and reflects the particular product codelevel after the codeline letter.For example: R12.AP.A.4 means Account Payables product on codeline A (Release 12.0) on codelevel 4 (Part of release 12.0.4).

The important thing to understand is that if you install a specific R12 release such as 12.0.4, all products will not only be on the same codeline (A), but also on the same codelevel (4). Further updates for a specific codelevel are delivered in form of delta updates. So instead of going from 12.AD.A.4 to 12.AD.A.5 as you’d expect from 11i, you’d go from 12.AD.A.4 to 12.AD.A.4.delta1, 12.AD.A.4.delta2, and so on. The codelevel is incremented via Release Update Packs.


Release Update Packs:What was formerly known as a maintenance pack is now called a Release Update Pack with short name of RUP. This could be confused with another RUP (Roll-Up) as it was used in context of 11i. RUPs actually upgrade all products to higher codelevel. These point release upgrades can introduce substantial changes to the system, therefore need to be carefully planned.For example: RUP2 is equivalent to R12.0.2, RUP6 is equivalent to R12.0.6 etc.

The final note for R12 is that patch numbers no longer have to be unique: the same patch can be released in multiple shapes for different codelevels.

How to check current SCN ?

SQL> select timestamp_to_scn(to_timestamp('01/01/2017 00:30:00','DD/MM/YYYY HH24:MI:SS')) as scn from dual;

       SCN
----------
6.4792E+12

SQL> set numwidth 30
SQL> select timestamp_to_scn(to_timestamp('01/01/2017 00:30:00','DD/MM/YYYY HH24:MI:SS')) as scn from dual;

                           SCN
------------------------------
                 6479247526568

SQL> select scn_to_timestamp(6479247526568) from dual;

SCN_TO_TIMESTAMP(6479247526568)
---------------------------------------------------------------------------
01-JAN-17 12.29.58.000000000 AM

SQL> 

Friday, March 3, 2017

Installing EBS R12.2.6 on Linux

Please follow the steps from R12.2 Installation Document to install R12.2.0


Once we have installed R12.2.0,Please follow below steps to upgrade to R12.2.6.

HOW TO UPGRADE FROM R12.2.0 TO R12.2.6:

A) Upgrade Database to 11.2.0.4 or higher --> Our version is 12.1.0.2

B) Fusion Middleware Technology Stack (FMW) 11.1.1.7 (11gR1 PS6) or higher.

Note: We used StartCD 12.2.0.51. StartCD 51 installs Oracle Fusion Middleware 11g PS7 (11.1.1.9.0) & database 12.1.0.2.

C) Apply Required Database Patches

i) Before you apply the AD and TXK Delta 10 release update packs (RUPs), you must run the latest version (available via Patch 17537119) of the EBS Technology Codelevel Checker (ETCC). Use the command checkDBpatch.sh (on UNIX) or checkDBpatch.cmd (on Windows).

ii) Check that all the required database patches have been applied.To learn more about the prerequisite database patches needed for applying the Delta 8 RUPs, refer My Oracle Knowledge Document 1594274.1, Oracle E-Business Suite Release 12.2: Consolidated List of Patches and Technology Bug Fixes.

Note:Ensure all the required ETCC database objects will be found by the Delta 8 RUP installation process. This means that even if you already have all the required database patches installed, you must still run the latest version of ETCC on your database.

RUN ETCC on DB Tier:

mkdir $ORACLE_HOME/appsutil/etcc
cd $ORACLE_HOME/appsutil/etcc
unzip /home/oracle/1226/ETCC/p17537119_R12_GENERIC.zip
 ./checkDBpatch.sh contextfile=/u01/oracle/TEST/12.1.0/appsutil/TEST_acsebs.xml


It will give us list of patches which needs to be applied before we proceed with upgrade. Instead of downloading individual patches

you can  download Patch 26781264 [EBS RELEASE 12.2 CONSOLIDATED DATABASE FIXES FOR AUG 2017] which contains all the required patches.

Download and unzip under $ORACLE_HOME/appsutil/etcc. then apply the required patches after bringing down db & application.


D) Set Database Parameter

Oracle Database 12c Release 1 uses cost based optimization. If you are using Oracle Database 12.1.0.2, the following optimizerparameter should always be set to 'false'. This setting should be completed before proceeding with the next steps and should not be changed thereafter. Set it in spfile or pfile and bounce the database.

optimizer_adaptive_features=false


E) Apply Consolidated Seed Table Upgrade Patch

Note: This step is applicable only for new installation customers and customers upgrading from Oracle E-Business Suite Release 12.2.2 to Release 12.2.6.

Note: If the Release 12.2.0 Vision or PROD instance (New Installation) was created using startCD 12.2.0.51 (Patch22066363), you must apply Consolidated Seed Table Upgrade Patch 17204589:12.2.0 by merging with Patch21900871:12.2.0 on the run file system using adop hotpatch mode.

sh $ADMIN_SCRIPTS_HOME/adstpall.sh
sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh start
adop phase=apply patches=17204589,21900871 merge=yes hotpatch=yes patchtop=/1226/SEED_TABLE_CUP


F) Apply latest AD & TXK Patches:

i) Run ETCC tool on application Tier and apply missing patches..It will list the patches for below components.

Oracle Forms and Reports 10.1.2.3.0
Oracle Fusion Middleware (FMW) - Web Tier.
Oracle Fusion Middleware (FMW) - oracle_common
Oracle WebLogic Server (WLS)

We have one consolidated  patch which will have all the mandatory patches. Apply the patches listed by ETCC.

 Patch 26328262 - EBS RELEASE 12.2 CONSOLIDATED FMW FIXES FOR JUL 2017

 a) Apply patches on 10.1.2 Home.by default our env will be pointing to 10.1.2 ORACLE_HOME.NO need to change anything.

 b) To Apply Patch in webtier home ,Set env variables below.
export ORACLE_HOME=$IAS_ORACLE_HOME;
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH 

 c)To apply patch in Fusion middleware ORACLE_COMMON home,Set env variables below
 export ORACLE_HOME=$FMW_HOME/oracle_common;
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

 d)Apply weblogic patches
 unzip patch $FMW_HOME/utils/bsu/cache_dir
 cd $FMW_HOME/utils/bsu
 ./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=K25M -prod_dir=$FMW_HOME/wlserver_10.3

 If there are any conflict ,You can use below syntax to remove conflict patches.
 ./bsu.sh -remove -patchlist=1LRI,2GYW,CW9T,VKXF,BLTG -prod_dir=$FMW_HOME/wlserver_10.3

iii) Apply latest  25820806 (R12.AD.C.Delta.10) and Patch 26720905:R12.AD.C in hotpatch mode.

Execute adgrants by following the instructions in the readme of Patch 25820806 (R12.AD.C.Delta.10).
adgrants.sql file in database tier before applying this patch

If Patch 25525148 (Rapid Install consolidated one-off bundle on top of startCD51) was not used while installing your Oracle E-Business Suite Release 12.2 system, apply the patches in the following order:

a. Apply Patch 25820806 (R12.AD.C.Delta.10)
adop phase=apply patches=25820806 hotpatch=yes patchtop=/shared/custom/1226/AD_TXK_LATEST workers=8

b. Apply Patch 26720905:R12.AD.C
adop phase=apply patches=26720905 hotpatch=yes patchtop=/shared/custom/1226/AD_TXK_LATEST workers=4

C. Apply AD crticical patches.
adop phase=apply patches=24591000,26482811 hotpatch=yes merge=yes patchtop=/shared/custom/1226/AD_TXK_LATEST workers=4

D. Apply TXK Delta 10 patch
adop phase=apply patches=25828573 hotpatch=yes patchtop=/shared/custom/1226/AD_TXK_LATEST workers=4

E.Apply TXK critical patches.
adop phase=apply patches=26400116,26720231,25994411 hotpatch=yes merge=yes patchtop=/shared/custom/1226/AD_TXK_LATEST workers=4

F. Run Middle Tier EBS Technology Codelevel Checker (MT-ETCC)
Execute the Middle Tier EBS Technology Codelevel Checker (MT-ETCC) utility checkMTpatch.sh

G. Stop Oracle WebLogic Server's Admin Server and Node Manager services.
sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh stop
sh $ADMIN_SCRIPTS_HOME/adnodemgrctl.sh stop

H. Update database tier with the latest patches

i) Source Run File sysem.
ii) perl $AD_TOP/bin/admkappsutil.pl
iii) On the database tier (as the ORACLE user):

a. Source the environment for RDBMS ORACLE_HOME.
b.Copy or FTP the appsutil.zip(appstier) file to <RDBMS ORACLE_HOME>.
c.cd $ORACLE_HOME; cp -r appsutil appsutil.bkup.nov14;unzip -o appsutil.zip
d. Run Autoconfig on db & apps tier(run).
sh $ORACLE_HOME/appsutil/scripts/${CONTEXT_NAME}/adautocfg.sh
sh $INST_TOP/admin/scripts/adautocfg.sh


I. Apply R12.2.6   Release updatePack

 . /u01/applmgr/TEST/EBSapps.env run
sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh stop
sh $ADMIN_SCRIPTS_HOME/adnodemgrctl.sh stop
adop phase=apply apply_mode=downtime patches=21900901

J. Start all application tier services on the run file system.
sh $ADMIN_SCRIPTS_HOME/adstrtal.sh

K. Perform adop cleanup action
adop phase=cleanup

L. Synchronize file systems
adop phase=fs_clone



Thursday, March 2, 2017

Reset Oracle Application User Password through API

DECLARE
flag_value BOOLEAN;
BEGIN
flag_value := fnd_user_pkg.changepassword(username=> 'RJAYANTH',newpassword => 'welcome1');
IF flag_value
THEN
DBMS_OUTPUT.PUT_LINE('The password reset successfully');
ELSE
DBMS_OUTPUT.PUT_LINE('The password reset has failed');
END IF;
END;
/
COMMIT;


How to Compile Forms , Reports & Custom.pll in R12.2

How to Compile Custom.pll   cd $AU_TOP/resource  cp CUSTOM.plx CUSTOM.plx_bkup  cp CUSTOM.pll CUSTOM.pll_bkup  frmcmp_batch module=CUSTOM.pl...