Wednesday, 20 March 2013

Oracle Apps: Kill FNDLIBR unix processes


ps -ef |grep FNDLIBR | grep -v grep | awk '{print $2}' | xargs kill -9

Thursday, 14 March 2013

Oracle 11i: Multi to single node cloning steps

We have application with two nodes. One for DB and Concurrent manager(bahix07) and second(bahix06) is for apllication server and other processes.

In this article we will do cloning multi node to single node cloning.

1- Run the preclone for Application and Database.
  A- On the application server bahix06 as an application user:
        cd $COMMON_TOP/admin/scripts/*
-----------------------------------------------------------------------------------

$ perl adpreclone.pl appsTier merge
Running adgenhfver.pl with command...
         perl /fmsappl/oracle/fmsprodappl/ad/11.5.0/bin/adgenhfver.pl isPrimary=y applsysusr=APPLSYS tempdir=/fmsappl/oracle/fmsprodcomn/temp

Please enter the APPS User [APPS]: apps
Please enter the APPS password:

This is the merge Primary node:
PLATFORM: aix
Current APPL_TOP: bahix06

APPL_TOPs belonging to FMSPROD, that can be merged with bahix06:
bahix07(ADMIN, CONCURRENT_PROCESSING)

Do you want to include bahix07 in the merge ? [y]:

Generating the high version files manifest. This will take some time, please wait...

sqlplus -s apps/xxxxxx @/fmsappl/oracle/fmsprodappl/ad/11.5.0/patch/115/sql/admsnlst.sql FMSPROD bahix06 bahix07,bahix06 APPLSYS /fmsappl/oracle/fmsprodappl/admin/FMSPROD/out/hfilever_appl_top.txt Y

Manifest located in: /fmsappl/oracle/fmsprodappl/admin/FMSPROD/out/hfilever_appl_top.txt

You can now go ahead and run the preparation on the subsequent node(s) while this process completes.

Running Rapid Clone with command...
        perl /fmsappl/oracle/fmsprodappl/ad/11.5.0/bin/adclone.pl java=/usr/java5 mode=stage stage=/fmsappl/oracle/fmsprodcomn/clone component=appsTier method=CUSTOM appctx=/fmsappl/oracle/fmsprodappl/admin/FMSPROD_bahix06.xml merge showProgress

Beginning application tier Stage - Tue Mar 12 12:43:41 2013
Log file located at /fmsappl/oracle/fmsprodappl/admin/FMSPROD_bahix06/log/StageAppsTier_03121243.log


Completed Merge APPL_TOP preparation for current Node...
Tue Mar 12 12:47:21 2013


Completed running perl /fmsappl/oracle/fmsprodappl/ad/11.5.0/bin/adclone.pl java=/usr/java5 mode=stage stage=/fmsappl/oracle/fmsprodcomn/clone component=appsTier method=CUSTOM appctx=/fmsappl/oracle/fmsprodappl/admin/FMSPROD_bahix06.xml merge showProgress ...
$
---------------------------------------------------------------------------------------------

     

  B- On the second node bahix07 as an application user:
    cd $COMMON_TOP/admin/scripts/*


$  perl adpreclone.pl appltop merge
Running adgenhfver.pl with command...
         perl /fmsprod/oracle/fmsprodappl/ad/11.5.0/bin/adgenhfver.pl isPrimary=n applsysusr=APPLSYS tempdir=/fmsprod/oracle/fmsprodcomn/temp

Please enter the APPS User [APPS]: apps
Please enter the APPS password: xxxxx

Current APPL_TOP: bahix07
This is a subsequent node to be merged into the primary node.
Downloading the high version files manifest from the database...

Found the manifest for merging bahix07,bahix06 using bahix06 as the Primary node.

sqlplus -s apps/xxxxxx  @/fmsprod/oracle/fmsprodappl/ad/11.5.0/patch/115/sql/admsnlst.sql FMSPROD bahix07 bahix07,bahix06 APPLSYS /fmsprod/oracle/fmsprodappl/admin/FMSPROD/out/hfilever_appl_top.txt N

Manifest located in: /fmsprod/oracle/fmsprodappl/admin/FMSPROD/out/hfilever_appl_top.txt
Running Rapid Clone with command...
        perl /fmsprod/oracle/fmsprodappl/ad/11.5.0/bin/adclone.pl java=/usr/java5 mode=stage stage=/fmsprod/oracle/fmsprodcomn/clone component=appltop method=CUSTOM appctx=/fmsprod/oracle/fmsprodappl/admin/FMSPROD_bahix07.xml merge showProgress

Beginning appltop Merge - Tue Mar 12 13:07:08 2013
Log file located at /fmsprod/oracle/fmsprodappl/admin/FMSPROD_bahix07/log/MergeApplTop_03121307.log


Completed Merge APPL_TOP preparation for current Node...
Tue Mar 12 13:22:08 2013


Completed running perl /fmsprod/oracle/fmsprodappl/ad/11.5.0/bin/adclone.pl java=/usr/java5 mode=stage stage=/fmsprod/oracle/fmsprodcomn/clone component=appltop method=CUSTOM appctx=/fmsprod/oracle/fmsprodappl/admin/FMSPROD_bahix07.xml merge showProgress ...
$


-------------------------------------------------------------------------------------------
Note: Copy the generated under $COMMON_TOP/clone/appl/bahix07 to the new server under the same target server path.
-------------------------------------------------------------------------------------------

C-  On the database node bahix07 as a database user:

    cd $ORACLE_HOME/appsutil/scripts/*

$   perl adpreclone.pl dbTier
Running Rapid Clone with command...
        perl /fmsprod/oracle/fmsproddb/appsutil/bin/adclone.pl java=/fmsprod/oracle/fmsproddb/jdk mode=stage stage=/fmsprod/oracle/fmsproddb/appsutil/clone component=dbTier method=CUSTOM dbctx=/fmsprod/oracle/fmsproddb/appsutil/FMSPROD_bahix07.xml  showProgress

Beginning database tier Stage - Tue Mar 12 13:28:54 2013
APPS Password : orasys2012
Log file located at /fmsprod/oracle/fmsproddb/appsutil/log/FMSPROD_bahix07/StageDBTier_03121329.log


Completed Stage...
Tue Mar 12 13:29:17 2013


Completed running perl /fmsprod/oracle/fmsproddb/appsutil/bin/adclone.pl java=/fmsprod/oracle/fmsproddb/jdk mode=stage stage=/fmsprod/oracle/fmsproddb/appsutil/clone component=dbTier method=CUSTOM dbctx=/fmsprod/oracle/fmsproddb/appsutil/FMSPROD_bahix07.xml  showProgress ...
$


-------------------------------------------------------------------------------------------

2- Copy the files to the target server:

Copy the generated directory from Secondery node to the primary node:
BAHIX07: scp -rp  $COMMON_TOP/clone/appl/bahix07 applprod@bahix06:/fmsappl/oracle/fmsprodcomn/clone/appl/

After copying the new directory we will archive bahix06 directories:
On bahix06: tar cvf - fmsprodappl  fmsprodcomn  fmsprodora | gzip > appltop.tar.gz

Move the archived files, DB home and data files to the target server. In our case we are copying the latest backup of the data files.

$ tar cvf - fmsprodappl  fmsprodcomn  fmsprodora | gzip > appltop.tar.gz

$  scp -rp appltop.tar.gz  appclone@10.180.1.105:/fmstest/clone/
$  scp -rp fmsproddata appclone@10.180.1.105:/fmstest/clone/
$  scp -rp fmsproddb appclone@10.180.1.105:/fmstest/clone/

Extract the copied files in the target system:
 $ gunzip < /fmstest/clone/appltop.tar.gz | tar xvf -


--------------------------------------------

2- Run the cfgclone for Database and Application.

a- We will start with the database tier; we renamed the directories in the target server as follow:

$ ls
fmscloneappl  fmsclonecomn  fmsclonedata  fmsclonedb    fmscloneora

Under /fmstest/clone/fmsclonedb/appsutil/clone/bin we will run the adcfgclone.pl
$ perl adcfgclone.pl dbTier
----------------------------------------------------------------------------------------------

$ perl adcfgclone.pl dbTier
Enter the APPS password [APPS]:
xxxxxx

First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:


Provide the values required for creation of the new Database Context file.

Do you want to use a virtual hostname for the target node (y/n) [n] ?:

Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:

Target System database name [FMSPROD]:FMSCLONE

Target system RDBMS ORACLE_HOME directory [/fmsprod/oracle/fmsproddb]:/fmstest/clone/fmsclonedb

Target system utl_file accessible directories list [/usr/tmp, /fmsprod/oracle/fmsproddb/appsutil/outbound/FMSPROD_bahix07, /fmsdata1/OraApps_FTP]:/usr/tmp, /fmsdata1/OraApps_FTP

Number of DATA_TOP's on the target system [1]:

Target system DATA_TOP 1 [/fmsprod/oracle/fmsproddata]:/fmstest/clone/fmsclonedata

Do you want to preserve the Display set to bahix06:1.0 (y/n) [y] ?:y

Perl executable location is set to:
/usr/bin/perl

Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:n

Clone Context uses the same port pool mechanism as the Rapid Install
Once you choose a port pool, Clone Context will validate the port availability.

Enter the port pool number [0-99]:
20

Checking the port pool 20
done: Port Pool 20 is free
Database port is 1541

Backing up /fmstest/clone/fmsclonedb/appsutil/FMSCLONE_bahix08.xml to /fmstest/clone/fmsclonedb/appsutil/FMSCLONE_bahix08.xml8.bak

Creating the new Database Context file from :
  /fmstest/clone/fmsclonedb/appsutil/template/adxdbctx.tmp

The new database context file has been created :
  /fmstest/clone/fmsclonedb/appsutil/FMSCLONE_bahix08.xml

Log file located at /tmp/CloneContext_0314103415.log

Running Rapid Clone with command:
        perl /fmstest/clone/fmsclonedb/appsutil/clone/bin/adclone.pl java=/fmstest/clone/fmsclonedb/appsutil/clone/bin/../jre mode=apply stage=/fmstest/clone/fmsclonedb/appsutil/clone/bin/.. component=dbTier method=CUSTOM dbctxtg=/fmstest/clone/fmsclonedb/appsutil/FMSCLONE_bahix08.xml  showProgress contextValidated=true

Beginning database tier Apply - Thu Mar 14 10:35:36 2013
-e
/fmstest/clone/fmsclonedb/appsutil/FMSCLONE_bahix08.xml
-stage
/fmstest/clone/fmsclonedb/appsutil/clone/bin/..
-pwd
xxxxx
-showProgress
-ouiCLI
Log file located at /fmstest/clone/fmsclonedb/appsutil/log/FMSCLONE_bahix08/ApplyDBTier_03141035.log


Completed Apply...
Thu Mar 14 10:46:30 2013


Starting database listener for FMSCLONE:
Running:
 /fmstest/clone/fmsclonedb/appsutil/scripts/FMSCLONE_bahix08/addlnctl.sh start FMSCLONE

You are running addlnctl.sh version 115.7

Logfile: /fmstest/clone/fmsclonedb/appsutil/log/FMSCLONE_bahix08/addlnctl.txt

Starting listener process FMSCLONE ...


Listener FMSCLONE has already been started.


addlnctl.sh: exiting with status 0
$
------------------------------------------------------------------------------------------------------


Change the following after dbTier cfgclone and before apps cfgclone:
1- Change the directories – if any need to be changed
select 'CREATE OR REPLACE DIRECTORY '||DIRECTORY_NAME||' AS '||''''||DIRECTORY_PATH||''''||';' 
from all_directories;

- Edit the commands by replacing FMSPROD with FMSCLONE ie source with target and Execute. 
- You would also be required to check and recreate the DB links as per tns entries and requirements in the Target Instance.

 - Update apps.wf_systems (This should show the target Instance and not the source Instance)
select name,display_name from apps.wf_systems;
update apps.wf_systems set name='FMSCLONE',display_name='FMSCLONE';
COMMIT;


 - Update Notification status (This needs to be bone before running adcfgclone on the apps tier , to avoid any Notifications to be sent from the Target Instance)

UPDATE wf_notifications SET status ='CLOSED', mail_status ='SENT', end_date ='01-JAN-01' WHERE mail_status in ('MAIL','INVALID','OPEN') ; 
Commit;

update wf_agents set address = replace ( address,'FMSPROD','FMSCLONE' ) ;
select name ,display_name from wf_systems;
update wf_systems set 
DISPLAY_NAME = replace ( DISPLAY_NAME, 'FMSPROD','FMSCLONE'); 
Commit;

update fnd_concurrent_queues set node_name='' where node_name='';
update fnd_user set email_address = 'xxxxx@xcxxx.com';
Update per_people_f set email_address = 'xxxxx@xcxxx.com';
Update po_vendor_sites_all set email_address = 'xxxxx@xcxxx.com',
remittance_email =  'xxxxx@xcxxx.com';
commit;

Change the apps password using FNDCPASS tool:
FNDCPASS apps/[Old Password] 0 Y system/[Old Password] SYSTEM APPLSYS [New Password]


b- Run the cfgclone for the apps tier:
      From the COMMON_TOP(/fmstest/clone/fmsclonecomn/clone/bin) the cfgclone for the appstier:

   

Apps clone post changes:

1- Add the custom top paths to $APPL_TOP/admin/adovars.env file:

   XXAEME_TOP="/fmstest/fmsclone/fmscloneappl/xxaeme/11.5.0"
   export XXAEME_TOP
   XXHRDBI_TOP="/fmstest/fmsclone/fmscloneappl/xxhrdbi/11.5.0"
   export XXHRDBI_TOP

2- Modify the DISPLAY parameter in the context file and run Autoconfig.




Clone issues which I got during my work
========================================================================
OUI-10197:Unable to create a new Oracle Home at /fmsclone/fmsclonedb. Oracle Home already exists at this location. Select another lo
cation.
SEVERE:OUI-10197:Unable to create a new Oracle Home at /fmsclone/fmsclonedb. Oracle Home already exists at this location. Select ano
ther location.
ERRORCODE = 255 ERRORCODE_END
./runInstaller  -silent -detachHome ORACLE_HOME= 

Solution: Remove the exisiting home
$  runInstaller  -silent -detachHome ORACLE_HOME=/fmstest/clone/fmsclonedb
/fmstest/clone/fmsclonedb/oui/bin/runInstaller  -silent -detachHome ORACLE_HOME=/fmstest/clone/fmsclonedb

========================================================================
Oracle Forms not opening:
Stop application services.
Run autoconfig at dbTier then appsTier.

========================================================================
Wrong DISPLAY environment variable value:
change the value manually in adstrtal.sh, adcmctl.sh, gsmstrt.sh and export the DISPLAY in adovars.env file under $APPL_TOP/admin directory.
========================================================================

http 403
Forbidden
You don't have permission to access /OA_HTML/AppsLocalLogin.jsp on this server.
apache not considering the symbolic link

Solution:
Temporarily enable iAS to use symbolic links.
Replace all occurrences of
'Option -FollowSymLinks'
 for
 'Option +FollowSymLinks'
in
$IAS_ORACLE_HOME/Apache/Apache/conf/httpd.conf
and
$IAS_ORACLE_HOME/Apache/Apache/conf/httpd_pls.conf
and bounce apache. If this is the issue, you should then go back and implement the changes via autoconfig. The value from this is controllable from your Apps Context, see s_options_symlinks .
"s_options_symlinks">Options +FollowSymLinks


=================================================================
Internal Server Error


The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, applprod@aemeweb.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

Actually the solution was to copy and relink the FNDFS from the production to clone.
Don't forget to run the adrelink after each clone !!


roubleshooting Issues with Report Review Agent (FNDFS) in APPS 10SC [ID 98093.1]


Number of Visitors