Friday, 13 September 2013

I faced issue while applying R12.1.3 upgrading patch and and also it ll come 11i itself.
This issue will come on only OEL5/RHEL5.

To BottomTo Bottom

Jan 25, 2013PROBLEMPUBLISHED3
There are no commentsComments (0)Rate this documentEmail link to this documentOpen document in new windowPrintable Page

In this Document
Symptoms
Cause
Solution
References


APPLIES TO:

Oracle Advanced Supply Chain Planning - Version 12.0 to 12.1.3 [Release 12 to 12.1]
Linux x86-64
Linux x86
*** Checked for relevance on 06-May-2011 ***


SYMPTOMS

When attempting to relinking any MSC executables via adadmin or manually the following error is visible in the log file :
Relinking module 'MSCNSP' in product msc ...

make -f /u01/oracle/EMMA/apps/apps_st/appl/admin/EMMA/out/link_msc_26274.mk
/u01/oracle/EMMA/apps/apps_st/appl/msc/12.0.0/bin/MSCNSP

Starting link of msc executable 'MSCNSP' on Tue Feb 10 10:16:53 CET 2009
g++ -L/u01/oracle/EMMA/apps/tech_st/10.1.2/lib
-L/u01/oracle/EMMA/apps/tech_st/10.1.2/lib/stubs -lclntsh -o
/u01/oracle/EMMA/apps/apps_st/appl/msc/12.0.0/bin/MSCNSP
/u01/oracle/EMMA/apps/apps_st/appl/msc/12.0.0/lib/mscnsp.o \
/u01/oracle/EMMA/apps/apps_st/appl/msc/12.0.0/lib/libmsc.a
/u01/oracle/EMMA/apps/apps_st/appl/mso/12.0.0/lib/libmso.a
/u01/oracle/EMMA/apps/apps_st/appl/msc/12.0.0/lib/libmsc.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libschedule.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libsolveriim.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libconcertext.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libsolver.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libconcert.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libilocplex.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libcplex.a
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/ilog/6.2/libcplex.a \

/u01/oracle/EMMA/apps/apps_st/appl/fnd/12.0.0/lib/libfnd.a -lsql10 -lclntsh
`cat /u01/oracle/EMMA/apps/tech_st/10.1.2/lib/ldflags` -lnsslb10
-lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat
/u01/oracle/EMMA/apps/tech_st/10.1.2/lib/ldflags` -lnsslb10 -lncrypt10
-lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10
-lcommon10 -lgeneric10 -lmm -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10
-lcore10 -lnls10 `cat /u01/oracle/EMMA/apps/tech_st/10.1.2/lib/ldflags`
-lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat
/u01/oracle/EMMA/apps/tech_st/10.1.2/lib/ldflags` -lnsslb10 -lncrypt10
-lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10
-lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10
-lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10
-lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat
/u01/oracle/EMMA/apps/tech_st/10.1.2/lib/sysliblist` -ldl -lm -lpthread
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/stubs/libstdc++.so
/u01/oracle/EMMA/apps/apps_st/appl/sht/12.0.0/lib/stubs/libgcc_s.so.1
`.gnu.linkonce.t._ZN17SCOProfileOptionsC1Ev' referenced in section `.rodata'
of /u01/oracle/EMMA/apps/apps_st/appl/mso/12.0.0/lib/libmso.a(msopomdl.o):
defined in discarded section `.gnu.linkonce.t._ZN17SCOProfileOptionsC1Ev' of
/u01/oracle/EMMA/apps/apps_st/appl/mso/12.0.0/lib/libmso.a(msopomdl.o)
collect2: ld returned 1 exit status
make: *** [/u01/oracle/EMMA/apps/apps_st/appl/msc/12.0.0/bin/MSCNSP] Error 1
Done with link of msc executable 'MSCNSP' on Tue Feb 10 10:16:55 CET 2009

Relink of module "MSCNSP" failed.
See error messages above (also recorded in log file) for possible
reasons for the failure. Also, please check that the Unix userid
running adrelink has read, write, and execute permissions
on the directory /u01/oracle/EMMA/apps/apps_st/appl/msc/12.0.0/bin,
and that there is sufficient space remaining on the disk partition
containing your Oracle Applications installation.

CAUSE

The issue is caused because an incorrect package binutils-2.17.50.0.6-6.el5 is installed on OEL5/RHEL 5 32-bit. This can also occur on the 64-bit version.

The requirements for Linux (32-bit) are similar and documented in Note 402310.1 Oracle Applications Installation and Upgrade Notes Release 12 (12.0.4) for Linux (32-bit) under the Required Packages for Oracle Enterprise Linux 5* and Red Hat Enterprise Linux 5* (base and Advanced Platform):

The following i386 packages are not part of the OS distribution media and must be downloaded separately (from http://oss.oracle.com/projects/compat-oracle/files/Enterprise_Linux for both OEL 5 and RHEL 5) and installed manually:

openmotif21-2.1.30-11.EL5.i3861
xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386
binutils-2.17.50.0.6-6.0.1.i3862

SOLUTION

-- To implement the solution, please execute the following steps:
  1. Download the binutils-2.17.50.0.6-6.0.1.x86_642 package if using OEL 5.2 (64-bit) or binutils-2.17.50.0.6-6.0.1.i386 if using OEL 5.2 (32-bit) from: http://oss.oracle.com/projects/compat-oracle/files/Enterprise_Linux/
  2. Install binutils-2.17.50.0.6-6.0.1.el5.x86_64.rpm or binutils-2.17.50.0.6-6.0.1.el5.i386.rpm using the following command:

    rpm -U binutils-2.17.50.0.6-6.0.1.el5.x86_64.rpm
    or
    rpm -U binutils-2.17.50.0.6-6.0.1.el5.i386.rpm

    If a higher version of the binutils has already been installed, downgrade using the following command:

    rpm -Uvh --oldpackage binutils-2.17.50.0.6-6.0.1.el5.i386.rpm
    or
    rpm -Uvh --oldpackage binutils-2.17.50.0.6-6.0.1.el5.x86_64.rpm
  3. You can use a command like the following to check the version:

    rpm -qa |grep binutils
  4. Retest the issue.
  5. Migrate the solution as appropriate to other environments.
  6. See Important notes below if you still encounter a failure - especially Note 1273390.

Monday, 24 June 2013


Steps for finding password of a User in Oracle Apps R12

THIS WORKS WITH ORACLE R12


Here is a wonderful oracle seeded Procedure fnd_web_sec.get_guest_username_pwd which will help us to find out user password.

Please use with this care and don't misuse this.
Kindly Follow the below mentioned steps:

Login to Apps user

Step 1:

--Package Specification
CREATE OR REPLACE PACKAGE get_pwd
AS
   FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
      RETURN VARCHAR2;
END get_pwd;
/

Step 2:
--Package Body
CREATE OR REPLACE PACKAGE BODY get_pwd
AS
   FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
      RETURN VARCHAR2
   AS
      LANGUAGE JAVA
      NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
END get_pwd;
/

Step 3:
Query to get password for apps user.

SELECT
(SELECT get_pwd.decrypt (UPPER ((SELECT UPPER (fnd_profile.VALUE ('GUEST_USER_PWD')) FROM DUAL)), usertable.encrypted_foundation_password) FROM DUAL) AS apps_password
 FROM fnd_user usertable
WHERE usertable.user_name LIKE UPPER ((SELECT SUBSTR (fnd_profile.VALUE ('GUEST_USER_PWD') ,1 , INSTR (fnd_profile.VALUE ('GUEST_USER_PWD'), '/') - 1 ) FROM DUAL))
Step 4:
 --Query for finding any application user
SELECT usr.user_name,
       get_pwd.decrypt
          ((SELECT (SELECT get_pwd.decrypt
                              (fnd_web_sec.get_guest_username_pwd,
                               usertable.encrypted_foundation_password
                              )
                      FROM DUAL) AS apps_password
              FROM fnd_user usertable
             WHERE usertable.user_name =
                      (SELECT SUBSTR
                                  (fnd_web_sec.get_guest_username_pwd,
                                   1,
                                     INSTR
                                          (fnd_web_sec.get_guest_username_pwd,
                                           '/'
                                          )
                                   - 1
                                  )
                         FROM DUAL)),
           usr.encrypted_user_password
          ) PASSWORD
  FROM fnd_user usr
 WHERE usr.user_name = '&USER_NAME';
Workflow Structure in R12



How to apply patch while you are in the middle of patching

Sometimes when you are in the middle of applying a patch you may get adworkers errors or you can find out that a patch is missing. So you need to apply a second patch (which solves the problem) in the middle of a running patch.

1. Use adctrl (option 3) to tell all the existing workers to QUIT

2. Use adctrl (option 5) to tell managers that all workers have QUIT. (Adpatch session ends!)

3. Backup tables applsys.ad_deferred_jobs and applsys.fnd_install_processes.


Login as APPLSYS user and execute:

ALTER "TABLE" applsys.ad_deferred_jobs "RENAME" TO ad_deferred_jobs_old;

ALTER "TABLE" applsys.fnd_install_processes "RENAME" TO fnd_install_processes_old;

ALTER "INDEX" applsys.ad_deferred_jobs_u1 "RENAME" TO ad_deferred_jobs_u1_old;

ALTER "INDEX" applsys.fnd_install_processes_u1 "RENAME" TO fnd_install_processes_u1_old;


4. Go to $APPL_TOP/admin/SID/ for example $APPL_TOP/admin/TEST/ and rename the existing directory "restart"

$mv restart restart.old


5. Use adpatch to apply the second/other patch.


6. Login as APPLSYS and revert back to the original tables, ad_deferred_jobs and fnd_install_processes

ALTER "TABLE" applsys.ad_deferred_jobs_old "RENAME" TO ad_deferred_jobs;

ALTER "TABLE" applsys.fnd_install_processes_old "RENAME" TO fnd_install_processes;

ALTER "INDEX" applsys.ad_deferred_jobs_u1_old "RENAME" TO ad_deferred_jobs_u1;

ALTER "INDEX" applsys.fnd_install_processes_u1_old "RENAME" TO fnd_install_processes_u1;


7. Replace the original restart directory:

cd $APPL_TOP/admin/SID/ for example $APPL_TOP/admin/TEST/

mv restart restart_new

mv restart.old restart


8. Run adpatch to continue the first patch (with continue session?Yes)


9. Use adctrl (option 2, will change status to “Fixed/Restart”) to restart the failed workers for first patch

Thursday, 13 June 2013

Cloning Steps in Oracle Applications

Hello all,

Troubleshooting RapidClone issues with Oracle Applications 11i [ID 364565.1]

The above ID will be more helpful for Depth process of cloning.

As per the request and with experience I am again returning to Cloning of Oracle Application. I know most of them know what exactly happens in cloning but still here I am trying to touch the depths.

Before starting I want to ask question. Why you need to do cloning ? Why we need to duplicate Oracle Application.

We need cloning for various of reasons. suppose I have got production instance and want to test some application. Now here I want to test the application, need to apply some product specific patches which might affect whole application then I have to give downtime which will affect business. So if I had the same this on which I can play and test my application or code or say I can apply some patches and at the same time business also run then nothing like it. This can be achieved by cloning or duplicating the application.

Duplicating the application is not easy or its just not simply copy the application, it wont work in any case. Logically it sounds fine just to copy the file system and re-link it and start the application but its not that easy.

Basically for cloning Oracle Application it can be categorized into three major categories.

-Preparing the Source System
-Copy the file System
-Preparing or say Configuring the Target System

You can achieve first and third steps using a Rapid Clone utility which Oracle provides for cloning

There can be many ways and methods to clone Oracle Application which many organisations follows but the only supported method provided by Oracle is using Rapid clone.

Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install.

Basically there are two cloning methodology using Autoconfig and without using autoconfig. First one that is using autoconfig is completely replaced by Rapidclone.

Non-autocofig cloning methodology was generally used before 11.5.5 that is non autoconfig enabled system.

Here I will discuss Rapid Clone method of cloning and also throw some light on cloning 11.0.3 oracle application as some users are still using that.

So first about the Rapid clone method.

In Category 1 that is first you need to make source for clone. You need to dress up Source system so that only configuration files and not the whole file system is copied.

Pre-requisite Steps

To start with cloning you need to first check about some pre-requisites some utilities should be of required version

Here are they,

Oracle Universal Installer should be of 2.2.0.19 version
Perl should be of 5.005 version minimum
JRE 1.1.8 and 1.3.1
JDK 1.3.1
Zip utility of version 2.3 minimum
Latest Autoconfig Templates patches are applied. TXK-O is the latest till date.
Latest Rapid Clone patches should be applied. Latest is ADX.F till date.

After checking the pre-requisites now your system is ready to clone.

Preparing the Source system:

After checking the above mentioned pre-requisites now you have to prepare the source system which need to be cloned.

In a broad way what this step will do is this will create the staged clone directory which will be having the driver files and configuration file of the source.

So what exactly is going to happen in this step. Lets get in more details

Basically you have to run the adpreclone.pl script once for Application tier and one for the datbase (even if you are on single node ! )

Lets first check for the Database tier

On Source system, run following as ORACLE user

cd <RDBMS Oracle_Home/appsutil/scripts/context_name/
perl adpreclone.pl dbTier

After running this it goes in two stages

dbTechstack and Database

What exactly it will do is
It will create stage cloned area at $ORACLE_HOME/appsutil/clone This clone directory has got following main directories
data,jre,bin,db,html,context

It will prepare datbase techstack at dbTechStack stage. Major activities it will take care of at this stage.

-Creates template files at $ORACLE_HOME/appsutil/template
-Creates driver files at $ORACLE_HOME/appsutil/driver/instconf.drv
-Converts inventory from binary to xml

It will prepare datbase at the database stage. Major activities includes

-Create datbase control file script
$Oracle_Home/appsutil/clone/context/data/stage/addbhomsrc.xml
$Oracle_Home/appsutil/clone/context/data/stage/adcrdb.zip
adcrdbclone.sql

-Generates database creation driver file
$Oracle_Home/appsutil/clone/context/data/driver/data.drv

-Copy JDBC Libraries
$Oracle_Home/appsutil/clone /clone/jlib/classes111.zip

So all this happens on database side

Now lets concentrate on Application tier side. Again it goes almost in the same way that is in two stages.

As a APPLMGR user on application tier this script is run
cd $COMMON_TOP/admin/scripts/_perl ./adpreclone.pl appsTier

It will also create the staged clone directory at $COMMON_TOP/clone
It goes in two stages. Lets see one by one

atTechStack that is Application tier techstack.

- Creates template files for
Oracle_iAS_Home/appsutil/template
Oracle_806_Home/appsutil/template

-Creates Techstack driver files for
Oracle_iAS_Home/appsutil/driver/instconf.drv
Oracle_806_Home/appsutil/driver/instconf.drv

appltop preparation

-It will create application top driver file
$COMMON_TOP/clone/appl/driver/appl.drv

-Copy JDBC libraries
$COMMON_TOP/clone/jlib/classes111.zip

So this all happens in dressing the source system

After then we need to copy the files.

Copy following files

APPL_TOP
OA_HTML ($COMMON_TOP/html)
JAVA_TOP
COMMON_TOP/util
COMMON_TOP/clone
8.0.6 ORACLE_HOME
iAS ORACLE_HOME
DB ORACLE_HOME
dbf files

After this stage now you need to configure the Target node. Basically you will run adcfgclone.pl same for databse tier and for application tier.
Let go in bit more detail:

First we will see for the database tier

On the target node you will run
ORACLE_DB_HOME/appsutil/clone/bin/perl adcfgclone.pl dbTier

Again there are two stages :

First will look at dbTechstack
It will use the driver files and templates which were created at source and has been copied to target.

Following scripts are run
-adchkutl.sh
-adclonectx.pl
-runInstallConfigDriver —- located in $Oracle_Home/appsutil/driver/instconf.drv
-Relinking $Oracle_Home/appsutil/install/adlnkoh.sh

Now for database
-Driver file
$Oracle_Home/appsutil/clone/context/data/driver/data.drv
-Create database adcrdb.zip
-Autoconfig is run
-Control file creation adcrdbclone.sql

Now on application tier
from COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier

Stage at TechStack
-Creates context file for target adclonectx.pl
-Run driver files
$Oracle_806_Home/appsutil/driver/instconf.drv
$Oracle_iAS_Home/appsutil/driver/instconf.drv

Relinking of Oracle Home
$Oracle_806_Home/bin/adlnk806.sh
$Oracle_iAS_Home/bin/adlnkiAS.sh

at the end for ApplTop stage
It runs driver and then autoconfig

So this will totally configure your application which has been copied.

At the end you have to some finishing tasks

-Update Printer settings
-Update Workflow Configuration settings
-Update Profile options

This completes you application cloning completely.

So Happy reading folks !!!!


Ref : http://onlineappsdba.com/index.php/2008/04/10/back-to-basics-of-cloning/

Database Recovery using Logfile without taking backup

SQL> startup
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2166536 bytes
Variable Size             457179384 bytes
Database Buffers          595591168 bytes
Redo Buffers               14000128 bytes
Database mounted.
ORA-01113: file 181 needs media recovery
ORA-01110: data file 181: '/sr12/d02/oracle/sr12/db/apps_st/data/tx_data51.dbf'

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 10132238055147 generated at 06/13/2013 11:32:44 needed for
thread 1
ORA-00289: suggestion :
/sr12/d02/oracle/sr12/db/apps_st/data/archive/1_483_776833270.dbf
ORA-00280: change 10132238055147 for thread 1 is in sequence #483

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00308: cannot open archived log
'/sr12/d02/oracle/sr12/db/apps_st/data/archive/1_483_776833270.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

ORA-00308: cannot open archived log
'/sr12/d02/oracle/sr12/db/apps_st/data/archive/1_483_776833270.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/sr12/d02/oracle/sr12/db/apps_st/data/sys1.dbf'

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 10132238055147 generated at 06/13/2013 11:32:44 needed for
thread 1
ORA-00289: suggestion :
/sr12/d02/oracle/sr12/db/apps_st/data/archive/1_483_776833270.dbf
ORA-00280: change 10132238055147 for thread 1 is in sequence #483

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/sr12/d02/oracle/sr12/db/apps_st/data/log1.dbf
ORA-00279: change 10132238085255 generated at 06/13/2013 11:39:47 needed for
thread 1
ORA-00289: suggestion :
/sr12/d02/oracle/sr12/db/apps_st/data/archive/1_484_776833270.dbf
ORA-00280: change 10132238085255 for thread 1 is in sequence #484
ORA-00278: log file '/sr12/d02/oracle/sr12/db/apps_st/data/log1.dbf' no longer
needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/sr12/d02/oracle/sr12/db/apps_st/data/log2.dbf
ORA-00310: archived log contains sequence 482; sequence 484 required
ORA-00334: archived log: '/sr12/d02/oracle/sr12/db/apps_st/data/log2.dbf'

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/sr12/d02/oracle/sr12/db/apps_st/data/sys1.dbf'

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 10132238085255 generated at 06/13/2013 11:39:47 needed for
thread 1
ORA-00289: suggestion :
/sr12/d02/oracle/sr12/db/apps_st/data/archive/1_484_776833270.dbf
ORA-00280: change 10132238085255 for thread 1 is in sequence #484

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/sr12/d02/oracle/sr12/db/apps_st/data/log3.dbf
Log applied.
Media recovery complete.

SQL> alter database open resetlogs;

Database altered.

SQL>

Wednesday, 12 June 2013



LOGFILE REMOVAL SCRIPT FOR 30 DAYS

find $LOG_HOME/ora/10.1.3/Apache -name "*.log" -mtime +30 -exec rm -f {} \;
find $LOG_HOME/ora/10.1.2/reports/cache -name "o*.txt" -mtime +30 -exec rm -f {} \;
find $LOG_HOME/ora/10.1.2/reports/cache -name "o*.eps" -mtime +30 -exec rm -f {} \;
find $LOG_HOME/ora/10.1.2/reports/cache -name "o*.xml" -mtime +30 -exec rm -f {} \;
find $LOG_HOME/ora/10.1.2/forms -name "em_*.rti" -mtime +30 -exec rm -f {} \;
find $LOG_HOME/ora/10.1.2/forms -name "frmweb_dump" -mtime +30 -exec rm -f {} \;
find $APPLTMP -name "OF*.t" -mtime +30 -exec rm -f {} \;

UNWANTED LOG FILE REMOVAL
http://dbataj.blogspot.in/2011/07/housekeeping-of-r12-application.html