Thursday, December 8, 2016

Resolving JSP Compilation Error

Problem

Following Error occur while compile JSP pages via patch or manually
cat /u01/PROD/fs1/inst/apps/PROD_ebs/logs/appl/rgf/ojsp/ojspc_error.log
[14052] compiling: 7s elapsed, 50 successful 0 failed
[14052] compiling: 7s elapsed, 50 successful 0 failed
[14052] compiling: 6s elapsed, 50 successful 0 failed
[14052] compiling: 7s elapsed, 50 successful 0 failed
[14052] compiling: 7s elapsed, 50 successful 0 failed
[14052] compiling: 6s elapsed, 50 successful 0 failed
[14052] compiling: 7s elapsed, 50 successful 0 failed
[14052] compiling: 6s elapsed, 50 successful 0 failed
[14052] !!SEVERE WARNING!! TIMEOUT[600 seconds] EXPIRED DURING COMPILATION 

Solution

Set java_home values in ojspCompile.conf files both fs1 and fs2 file system.

/u01/PROD/fs1/inst/apps/PROD_ebs/appl/admin/ojspCompile.conf
/u01/PROD/fs2/inst/apps/PROD_ebs/appl/admin/ojspCompile.conf

java_home = /u01/TEST/fs1/EBSapps/comn/util/jdk64
java_home = /u01/TEST/fs2/EBSapps/comn/util/jdk64

Then execute below to proceed with jsp compilation;

[oratest@test TEST]$ strace -t -o jspcompile.txt perl -x $FND_TOP/patch/115/bin/ojspCompile.pl --compile -p 6 -log /tmp/ojspCompile.log
logfile set: /tmp/ojspCompile.log
starting...(compiling delta)
using 10i internal ojsp ver: 10.3.6.0
synchronizing dependency file:
  loading deplist...7829
  enumerating jsps...7829
  updating dependency...0
initializing compilation:
  eliminating children...5954 (-1875)
  searching uncompiled...4529
translating and compiling:
  searching untranslated...0   
  compiling jsps...4529/4529 in 11m55s                 

Finished!

Wednesday, October 19, 2016

REP-0004: Warning: Unable to open user preference file

Problem

Concurrent requests completed with following warning.
REP-0004: Warning: Unable to open user preference file.

Solution

To resolve the warning, copy the prefs.ora file from your Reports Builder $ORACLE_HOME/tools/admin/ directory into the Applications $HOME directory.
[appmgr@ebs ~]$ . /u01/PRD/apps/apps_st/appl/APPSPRD_ebs.env
[appmgr@ebs ~]$ cd $ORACLE_HOME/tools/admin
[appmgr@ebs admin]$ pwd
/u01/PRD/apps/tech_st/10.1.2/tools/admin
[appmgr@ebs admin]$ cp prefs.ora /home/appmgr

Reference :
R12: Request Logs Contain the Message "REP-0004: Warning: Unable to open user preference file" (Doc ID 1120529.1)

Wednesday, October 12, 2016

Recover Standby Database from Missing Archive Logs

Problem

Archive logs are transfer to standby server but did not apply. When I check alert log following error appear.
Primary Alert Log
ORA-00308: cannot open archived log '/u01/ebs/archive/1_74_920278814.arc'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Standby Alert Log
FAL[client]: Failed to request gap sequence
 GAP - thread 1 sequence 71-74
Error because Some of the archive logs are delete before apply it on standby database

Solution

1. Login to Primary and Standby db and find the current scn no.
On Primary
[oracle@ebst ebs]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Sep 29 15:08:50 2016

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options  
SQL> SELECT CURRENT_SCN FROM V$DATABASE;

CURRENT_SCN
-----------
 5.9653E+12

SQL> SELECT to_char(CURRENT_SCN) FROM V$DATABASE;

TO_CHAR(CURRENT_SCN)
----------------------------------------
5965326366951
On Standby
[oracle@demo ebs]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Sep 29 14:31:40 2016

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options  
SQL> SELECT CURRENT_SCN FROM V$DATABASE;

CURRENT_SCN
-----------
 5.9653E+12

SQL> SELECT to_char(CURRENT_SCN) FROM V$DATABASE;

TO_CHAR(CURRENT_SCN)
----------------------------------------
5965326339755

2. Stop the redo apply and shutdown the Standby database 

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> shutdown immediate
ORA-01109: database not open
Database dismounted ORACLE instance shut down.
3. Connect to Primary DB and get the incremental backup from current SCN of standby database where standby is lagging behind
[oracle@ebst 11.1.0]$ rman target /

Recovery Manager: Release 11.1.0.7.0 - Production on Tue Oct 4 10:48:56 2016

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: EBS (DBID=2053341531)

RMAN>  backup incremental from scn 5965326339755 database format '/u01/ebs/stb_%U%T';

Starting backup at 04-OCT-16

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=386 device type=DISK
backup will be obsolete on date 11-OCT-16
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00014 name=/u01/ebs/db/apps_st/data/a_txn_data04.dbf
input datafile file number=00393 name=/u01/ebs/db/apps_st/data/a_txn_ind01.dbf
input datafile file number=00402 name=/u01/ebs/db/apps_st/data/a_txn_data03.dbf
input datafile file number=00406 name=/u01/ebs/db/apps_st/data/a_txn_ind05.dbf
input datafile file number=00353 name=/u01/ebs/db/apps_st/data/system08.dbf
input datafile file number=00405 name=/u01/ebs/db/apps_st/data/a_txn_ind04.dbf
input datafile file number=00379 name=/u01/ebs/db/apps_st/data/undo01.dbf
input datafile file number=00401 name=/u01/ebs/db/apps_st/data/a_txn_data02.dbf
input datafile file number=00013 name=/u01/ebs/db/apps_st/data/system12.dbf
input datafile file number=00403 name=/u01/ebs/db/apps_st/data/a_txn_ind02.dbf
input datafile file number=00352 name=/u01/ebs/db/apps_st/data/system09.dbf
input datafile file number=00394 name=/u01/ebs/db/apps_st/data/a_ref01.dbf
input datafile file number=00400 name=/u01/ebs/db/apps_st/data/a_media01.dbf
input datafile file number=00392 name=/u01/ebs/db/apps_st/data/a_txn_data01.dbf
input datafile file number=00407 name=/u01/ebs/db/apps_st/data/a_ref02.dbf
input datafile file number=00396 name=/u01/ebs/db/apps_st/data/a_summ01.dbf
input datafile file number=00015 name=/u01/ebs/db/apps_st/data/a_txn_ind06.dbf
input datafile file number=00404 name=/u01/ebs/db/apps_st/data/a_txn_ind03.dbf
input datafile file number=00395 name=/u01/ebs/db/apps_st/data/a_int01.dbf
input datafile file number=00001 name=/u01/ebs/db/apps_st/data/system01.dbf
input datafile file number=00002 name=/u01/ebs/db/apps_st/data/system02.dbf
input datafile file number=00003 name=/u01/ebs/db/apps_st/data/system03.dbf
input datafile file number=00004 name=/u01/ebs/db/apps_st/data/system04.dbf
input datafile file number=00005 name=/u01/ebs/db/apps_st/data/system05.dbf
input datafile file number=00398 name=/u01/ebs/db/apps_st/data/a_archive01.dbf
input datafile file number=00295 name=/u01/ebs/db/apps_st/data/system06.dbf
input datafile file number=00351 name=/u01/ebs/db/apps_st/data/system07.dbf
input datafile file number=00354 name=/u01/ebs/db/apps_st/data/system11.dbf
input datafile file number=00288 name=/u01/ebs/db/apps_st/data/system10.dbf
input datafile file number=00011 name=/u01/ebs/db/apps_st/data/sysaux01.dbf
input datafile file number=00008 name=/u01/ebs/db/apps_st/data/a_queue02.dbf
input datafile file number=00012 name=/u01/ebs/db/apps_st/data/apps_ts_tools01.dbf
input datafile file number=00399 name=/u01/ebs/db/apps_st/data/a_queue01.dbf
input datafile file number=00016 name=/u01/ebs/db/apps_st/data/a_ref03.dbf
input datafile file number=00018 name=/u01/ebs/db/apps_st/data/sysaux02.dbf
input datafile file number=00314 name=/u01/ebs/db/apps_st/data/portal01.dbf
input datafile file number=00397 name=/u01/ebs/db/apps_st/data/a_nolog01.dbf
input datafile file number=00006 name=/u01/ebs/db/apps_st/data/ctxd01.dbf
input datafile file number=00010 name=/u01/ebs/db/apps_st/data/olap.dbf
input datafile file number=00017 name=/u01/ebs/db/apps_st/data/a_int02.dbf
input datafile file number=00009 name=/u01/ebs/db/apps_st/data/odm.dbf
input datafile file number=00007 name=/u01/ebs/db/apps_st/data/owad01.dbf
channel ORA_DISK_1: starting piece 1 at 04-OCT-16
channel ORA_DISK_1: finished piece 1 at 04-OCT-16
piece handle=/u01/ebs/stb_2irhgppk_1_120161004 tag=TAG20161004T104923 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:06:25

using channel ORA_DISK_1
backup will be obsolete on date 11-OCT-16
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 04-OCT-16
channel ORA_DISK_1: finished piece 1 at 04-OCT-16
piece handle=/u01/ebs/stb_2jrhgq5m_1_120161004 tag=TAG20161004T104923 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 04-OCT-16
4. Create standby controlfile and  copy all rman backup files and standby controlfile to standby server
SQL> alter database create standby controlfile as '/u01/ebs/stby.ctl';

Database altered.
5. restore controlfile
RMAN> startup nomount;

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2166536 bytes
Variable Size                436207864 bytes
Database Buffers             616562688 bytes
Redo Buffers                  14000128 bytes

RMAN> restore controlfile from '/u01/ebs/stby.ctl';

Starting restore at 04-OCT-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=383 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=/u01/ebs/db/apps_st/data/cntrl01.dbf
output file name=/u01/ebs/db/apps_st/data/cntrl02.dbf
output file name=/u01/ebs/db/apps_st/data/cntrl03.dbf
Finished restore at 04-OCT-16
6. Mount the DR database and Catalog backups
RMAN> startup nomount;

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2166536 bytes
Variable Size                436207864 bytes
Database Buffers             616562688 bytes
Redo Buffers                  14000128 bytes

RMAN> alter database mount;

using target database control file instead of recovery catalog
database mounted

RMAN> catalog backuppiece '/u01/ebs/stb_2irhgk_1_120161004';

cataloged backup piece
backup piece handle=/u01/ebs/stb_2irhgk_1_120161004 RECID=7 STAMP=924353015

RMAN> catalog backuppiece '/u01/ebs/stb_2jrhgm_1_120161004';

cataloged backup piece
backup piece handle=/u01/ebs/stb_2jrhgm_1_120161004 RECID=8 STAMP=924353024
7. Start the recovery
If there any datafile changes in primary, then first restore particular datafile and do the recovery
RMAN> recover database noredo;

Starting recover at 04-OCT-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=349 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/ebs/db/apps_st/data/system01.dbf
destination for restore of datafile 00002: /u01/ebs/db/apps_st/data/system02.dbf
destination for restore of datafile 00003: /u01/ebs/db/apps_st/data/system03.dbf
destination for restore of datafile 00004: /u01/ebs/db/apps_st/data/system04.dbf
destination for restore of datafile 00005: /u01/ebs/db/apps_st/data/system05.dbf
destination for restore of datafile 00006: /u01/ebs/db/apps_st/data/ctxd01.dbf
destination for restore of datafile 00007: /u01/ebs/db/apps_st/data/owad01.dbf
destination for restore of datafile 00008: /u01/ebs/db/apps_st/data/a_queue02.dbf
destination for restore of datafile 00009: /u01/ebs/db/apps_st/data/odm.dbf
destination for restore of datafile 00010: /u01/ebs/db/apps_st/data/olap.dbf
destination for restore of datafile 00011: /u01/ebs/db/apps_st/data/sysaux01.dbf
destination for restore of datafile 00012: /u01/ebs/db/apps_st/data/apps_ts_tools01.dbf
destination for restore of datafile 00013: /u01/ebs/db/apps_st/data/system12.dbf
destination for restore of datafile 00014: /u01/ebs/db/apps_st/data/a_txn_data04.dbf
destination for restore of datafile 00015: /u01/ebs/db/apps_st/data/a_txn_ind06.dbf
destination for restore of datafile 00016: /u01/ebs/db/apps_st/data/a_ref03.dbf
destination for restore of datafile 00017: /u01/ebs/db/apps_st/data/a_int02.dbf
destination for restore of datafile 00018: /u01/ebs/db/apps_st/data/sysaux02.dbf
destination for restore of datafile 00288: /u01/ebs/db/apps_st/data/system10.dbf
destination for restore of datafile 00295: /u01/ebs/db/apps_st/data/system06.dbf
destination for restore of datafile 00314: /u01/ebs/db/apps_st/data/portal01.dbf
destination for restore of datafile 00351: /u01/ebs/db/apps_st/data/system07.dbf
destination for restore of datafile 00352: /u01/ebs/db/apps_st/data/system09.dbf
destination for restore of datafile 00353: /u01/ebs/db/apps_st/data/system08.dbf
destination for restore of datafile 00354: /u01/ebs/db/apps_st/data/system11.dbf
destination for restore of datafile 00379: /u01/ebs/db/apps_st/data/undo01.dbf
destination for restore of datafile 00392: /u01/ebs/db/apps_st/data/a_txn_data01.dbf
destination for restore of datafile 00393: /u01/ebs/db/apps_st/data/a_txn_ind01.dbf
destination for restore of datafile 00394: /u01/ebs/db/apps_st/data/a_ref01.dbf
destination for restore of datafile 00395: /u01/ebs/db/apps_st/data/a_int01.dbf
destination for restore of datafile 00396: /u01/ebs/db/apps_st/data/a_summ01.dbf
destination for restore of datafile 00397: /u01/ebs/db/apps_st/data/a_nolog01.dbf
destination for restore of datafile 00398: /u01/ebs/db/apps_st/data/a_archive01.dbf
destination for restore of datafile 00399: /u01/ebs/db/apps_st/data/a_queue01.dbf
destination for restore of datafile 00400: /u01/ebs/db/apps_st/data/a_media01.dbf
destination for restore of datafile 00401: /u01/ebs/db/apps_st/data/a_txn_data02.dbf
destination for restore of datafile 00402: /u01/ebs/db/apps_st/data/a_txn_data03.dbf
destination for restore of datafile 00403: /u01/ebs/db/apps_st/data/a_txn_ind02.dbf
destination for restore of datafile 00404: /u01/ebs/db/apps_st/data/a_txn_ind03.dbf
destination for restore of datafile 00405: /u01/ebs/db/apps_st/data/a_txn_ind04.dbf
destination for restore of datafile 00406: /u01/ebs/db/apps_st/data/a_txn_ind05.dbf
destination for restore of datafile 00407: /u01/ebs/db/apps_st/data/a_ref02.dbf
channel ORA_DISK_1: reading from backup piece /u01/ebs/stb_2irhgppk_1_120161004
channel ORA_DISK_1: piece handle=/u01/ebs/stb_2irhgppk_1_120161004 tag=TAG20161004T104923
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished recover at 04-OCT-16
7. Start the redo apply
SQL> alter database recover managed standby database disconnect from session;

Database altered.

Tuesday, October 11, 2016

APP-PO-14142: get_po_parameters-10: ORA-01422 When Open Purchasing Form

Problem

Following Error Occur when open a purchasing form



Solution

1. Connect apps user and run below query.
select object_name,policy_name, package,function,enable
from sys.all_policies
where object_name = upper('PO_DOCUMENT_TYPES_B')
union
select object_name,policy_name, package,function,enable
from sys.all_policies
where object_name = upper('PO_DOCUMENT_TYPES_TL')
union
select object_name,policy_name, package,function,enable
from sys.all_policies
where object_name = upper('PO_SYSTEM_PARAMETERS')
union
select object_name,policy_name, package,function,enable
from sys.all_policies
where object_name = upper('FINANCIALS_SYSTEM_PARAMETERS');
If query does not return above four policies, then add those

2. Run below script via apps user
SQL>revoke EXEMPT ACCESS POLICY from APPS;

3. Verify the issue by running following query.
select count(*) from po_document_types;
If above query return 0 rows, then issue will be resolved

Reference : 
Choosing Approval Assignments Form From Menu - Nothing Happens - Form Does Not Open (Doc ID 1063223.1)

Monday, September 26, 2016

R12 Error : ORA-1691: unable to extend lobsegment

Problem

Following error occurred while attached and save the attachment on oracle forms in R12.
ORA-1691: unable to extend lobsegment APPLSYS.SYS_LOB0000033088C00004$$ by 2362205 in tablespace APPLSYSD

Solution

Check if there enough free space in tablespaces. if so please follow the steps

1. Verify NEXT_EXTENT & MAX_EXTENTS value of the segment highlighted in error
SQL> select BYTES,EXTENTS,NEXT_EXTENT,MAX_EXTENTS from dba_segments where segment_name='SYS_LOB0000033088C00004$$';

     BYTES    EXTENTS NEXT_EXTENT MAX_EXTENTS
---------- ---------- ----------- -----------
3.8703E+10         33  1.9351E+10         505
NEXT_EXTENT found to be very huge (19 GB) which is the root cause of this issue

2.Reduce segment NEXT_EXTENT size from 19 GB to 1 MB
SQL> select owner, table_name, column_name, SEGMENT_NAME  from dba_lobs where segment_name='SYS_LOB0000033088C00004$$';

OWNER          TABLE_NAME       COLUMN_NAME       SEGMENT_NAME
-----------------------------------------------------------------------------
APPLSYS        FND_LOBS          FILE_DATA      SYS_LOB0000033088C00004$$
SQL> alter table applsys.FND_LOBS modify lob ("FILE_DATA") (STORAGE (NEXT 1048576));

Table altered.
SQL> select BYTES,EXTENTS,NEXT_EXTENT,MAX_EXTENTS from dba_segments where segment_name='SYS_LOB0000033088C00004$$';

     BYTES    EXTENTS NEXT_EXTENT MAX_EXTENTS
---------- ---------- ----------- -----------
3.8703E+10         33     1048576         505

NEXT_EXTENT is greater than 1 GB & Contiguous free space of the datafile which segment is located may not accommodate next few extents which will lead to allocation of next extent in new datafile. Please verify if other datafiles in the same tablespace has sufficient contiguous space available . If not then add a datafile with size equal to or greater than NEXT_EXTENT else reduce NEXT_EXTENT size

Reference : 
Ora-1691: Unable To Extend Lobsegment Applsys.Sys_lob0000033489c00004$$ By 92170 (Doc ID 378377.1)

Tuesday, August 30, 2016

How To Re-attach Oracle Homes To The Central Inventory in R12.2

Problem 

Accidentally deleted oraInventory directory. 

Solution

In 12.2, application tier has 4 homes and a DB home. have to re‐attach all oracle homes. each oracle_home_name must be unique. 

For Application Tier (need to run on each file system) 
/u01/VIS/fs1/FMW_Home/oracle_common/oui/bin/runInstaller 
‐silent ‐attachHome ‐invPtrLoc /etc/oraInst.loc 
ORACLE_HOME="/u01/VIS/fs1/FMW_Home/oracle_common" 
ORACLE_HOME_NAME= "OH481075858" CLUSTER_NODES="{}" 

/u01/VIS/fs1/FMW_Home/webtier/oui/bin/runInstaller 
‐silent ‐attachHome ‐invPtrLoc /etc/oraInst.loc 
ORACLE_HOME="/u01/VIS/fs1/FMW_Home/webtier"
ORACLE_HOME_NAME="OH657355352" CLUSTER_NODES="{}" 

/u01/VIS/fs1/EBSapps/10.1.2/oui/bin/runInstaller 
‐silent ‐attachHome ‐invPtrLoc /etc/oraInst.loc 
ORACLE_HOME="/u01/VIS/fs1/EBSapps/10.1.2"
ORACLE_HOME_NAME="VIS_TOOLS__u01_VIS_fs1_EBSapps_10_1_2" 

/u01/VIS/fs1/FMW_Home/Oracle_EBS‐app1/oui/bin/runInstaller 
‐silent ‐attachHome ‐invPtrLoc /etc/oraInst.loc 
ORACLE_HOME="/u01/VIS/fs1/FMW_Home/Oracle_EBS‐app1" 
ORACLE_HOME_NAME="u01_VIS_fs1_Oracle_EBS_app" 

For DB home 
/u01/VIS/db/tech_st/11.2.0/oui/bin/runInstaller 
‐silent ‐attachHome ‐invPtrLoc /etc/oraInst.loc
ORACLE_HOME="/u01/VIS/db/tech_st/11.2.0"
ORACLE_HOME_NAME="OraDb11g_home1" 
After successfully attach above oracle homes you can find the entries from oraInventory/ContentsXML/inventory.xml file

fs1
<HOME NAME="OH481075858" LOC="/u01/VIS/fs1/FMW_Home/oracle_common" TYPE="O" IDX="5">

<HOME NAME="OH657355352" LOC="/u01/VIS/fs1/FMW_Home/webtier" TYPE="O" IDX="6">

<HOME NAME="VIS_TOOLS__u01_VIS_fs1_EBSapps_10_1_2" LOC="/u01/VIS/fs1/EBSapps/10.1.2" TYPE="O" IDX="7"/>

<HOME NAME="u01_VIS_fs1_Oracle_EBS_app" LOC="/u01/VIS/fs1/FMW_Home/Oracle_EBS‐app1" TYPE="O" IDX="8"/>

fs2
<HOME NAME="OH781075858" LOC="/u01/VIS/fs2/FMW_Home/oracle_common" TYPE="O" IDX="5">

<HOME NAME="OH957355352" LOC="/u01/VIS/fs2/FMW_Home/webtier" TYPE="O" IDX="6">

<HOME NAME="VIS_TOOLS__u01_VIS_fs2_EBSapps_10_1_2" LOC="/u01/VIS/fs2/EBSapps/10.1.2" TYPE="O" IDX="7"/>

<HOME NAME="u01_VIS_fs2_Oracle_EBS_app" LOC="/u01/VIS/fs2/FMW_Home/Oracle_EBS‐app1" TYPE="O" IDX="8"/> 

Database
<HOME NAME="OraDb11g_home1" LOC="/u01/VIS/db/tech_st/11.2.0"  TYPE="O" IDX="1"/>

Monday, August 8, 2016

R12 Error : APP-FND-00500: AFPPRN received a return code of failure from routine FDUPRN

Problem

Concurrent program completed with following warning
APP-FND-00500: AFPPRN received a return code of failure from routine FDUPRN. Cannot write to the communication channel

Cause: AFPPRN received a return code of failure from the OSD routine FDUPRN. Cannot write to the communication channel.

Solution

1. Log into Applications with the System Administrator responsibility.

2. Navigate to Concurrent -> program -> define

3. Query the concurrent program. 

4. In the Output options are listed, clear the check box before the word “Print” and Leave the “Save” option selected to avoid the warning when running the program because it was unable to delete the output file which was never created.
4. Save the Changes.

Friday, July 15, 2016

Re-create lost Context file in R12

We can retrieve both application and Database tier context file by running adclonectx.pl script. Execute the following command on the applications tier.
perl <COMMON_TOP>/clone/bin/adclonectx.pl retrieve
The above command can be used only when the <INST_TOP> is still intact. In case the <INST_TOP> has also been lost accidentally, the context file may be retrieved as follows
perl <ORACLE_HOME>/appsutil/clone/bin/adclonectx.pl retrieve
On being prompted for the context file to be retrieved, select the option of retrieving the context file which you need (APPL_TOP or Database) to retrieve it to the default location specified by the script.


 The adbldxml.pl utility can be used to generate the context file on the database tier only. It is commonly used when migrating AutoConfig to a database tier not created using Rapid Install or when upgrading a database tier from Applications 11i to EBusiness Suite Release 12. This utility is not supported on the applications tier.
perl <ORACLE_HOME>/appsutil/bin adbldxml.pl appsuser=apps

Tuesday, June 21, 2016

Steps to change Apps password for EBS 12.2

Follow all the below steps to change apps password in 12.2 instance. Passwords for all the 3 schemas APPS, APPLSYS and APPS_NE will be changed together while changing APPLSYS password

1. Shut down the application tier services

2. Change the APPLSYS password
FNDCPASS apps/<apps_pw> 0 Y SYSTEM/<system_pw> SYSTEM APPLSYS <new_password>
3.Run Autoconfig on Application Tier with newly changed password

4. Start the Adminserver
cd $ADMIN_SCRIPTS_HOME
./adadminsrvctl.sh start
5. Change the "apps" password in WLS Datasource as follows

  • Log in to WLS Administration Console.
  •  Click Lock & Edit in Change Center
  •  In the Domain Structure tree, expand Services, then select Data Sources
  •  On the "Summary of JDBC Data Sources" page, select EBSDataSource
  •  On the "Settings for EBSDataSource" page, select the Connection Pool tab.
  • Enter the new password in the "Password" and "Confirm Password" field
  •  Click Save
                                                                                                                 
  •  Click Activate Changes in Change Center

Reference
Steps to change the APPS, APPLSYS, and APPS_NE password using FNDCPASS or AFPASSWD for EBS 12.2 (Doc ID 1674462.1)

Monday, June 13, 2016

How to find Oracle EBS Weblogic Server Admin Port and URL

Weblogic admin port

Method 1

Open the Application tier context file
vi $CONTEXTFILE

Check the value of 'WLS Admin Server Port' from "s_wls_adminport" parameter


Method 2

Open the EBS domain config file
vi $EBS_DOMAIN_HOME/config/config.xml

Check the 'listen-port' value of the 'AdminServer' 


Weblogic console URL

http://<server name>. <domain name> : <weblogic Admin Port>/console 

Ex: http://oracle.test.com:7002/console

Tuesday, June 7, 2016

Gather Schema Statistics Completed with ORA-20001 Error in R12

Problem

Gather Schema statistics concurrent program completed with following error
+-----------------------------------------------------------+
Start of log messages from FND_FILE
+-----------------------------------------------------------+
In GATHER_SCHEMA_STATS , schema_name= ALL percent= 10 degree = 8 internal_flag= NOBACKUP
stats on table AQ$_WF_CONTROL_P is locked 
stats on table WF_CONTROL is locked 
Error #1: ERROR: While GATHER_TABLE_STATS:
object_name=GL.JE_BE_LINE_TYPE_MAP***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #2: ERROR: While GATHER_TABLE_STATS:
object_name=GL.JE_BE_LOGS***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #3: ERROR: While GATHER_TABLE_STATS:
object_name=GL.JE_BE_VAT_REP_RULES***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
+-----------------------------------------------------------+
End of log messages from FND_FILE
+-----------------------------------------------------------+

Solution

There are duplicate rows on FND_HISTOGRAM_COLS. Find out all duplicates and/or obsolete rows in FND_HISTOGRAM_COLS and delete one of them logged in as the applsys user.

1. Identify Duplicate Rows
select table_name, column_name, count(*)
from FND_HISTOGRAM_COLS
group by table_name, column_name
having count(*) > 1;
2. Use above results on the following SQL to delete duplicates
delete from FND_HISTOGRAM_COLS
where table_name = '&TABLE_NAME'
and  column_name = '&COLUMN_NAME'
and rownum=1;
You can get the updated query by running following.
select 'delete from FND_HISTOGRAM_COLS where table_name = '''||table_name||''' and column_name = '''||column_name||''' and rownum=1;' from FND_HISTOGRAM_COLS group by table_name, column_name having count(*) > 1;
3. Use following SQL to delete obsoleted rows
delete from FND_HISTOGRAM_COLS
where (table_name, column_name) in 
  (
   select hc.table_name, hc.column_name
   from FND_HISTOGRAM_COLS hc , dba_tab_columns tc
   where hc.table_name  ='&TABLE_NAME'
   and hc.table_name= tc.table_name (+)
   and hc.column_name = tc.column_name (+)
   and tc.column_name is null
  );

commit;

Reference:

11i - 12 Gather Schema Statistics fails with Ora-20001 errors after 11G database Upgrade (Doc ID 781813.1)

Wednesday, May 25, 2016

Oracle Pre-Upgrade Check Failed – DMSYS schema exists in the Database

Problem

Pre-upgrade check failed with following error when upgrade database 
The DMSYS schema exists in the database. Prior to performing an upgrade Oracle recommends that the DMSYS schema, and its associated objects be removed from the database.

Solution

Make sure the schema is not being used, then do the following 
SQL> CONNECT / AS SYSDBA;
SQL> DROP USER DMSYS CASCADE;
SQL> DELETE FROM SYS.EXPPKGACT$ WHERE SCHEMA = 'DMSYS'; 
SQL> SELECT COUNT(*) FROM DBA_SYNONYMS WHERE TABLE_OWNER = 'DMSYS';
If the above query return non-zero values then do the following to remove public synonyms referring DMSYS objects 
SQL> SET HEAD OFF
SQL> SPOOL drop_dmsys.sql
SQL> SELECT 'Drop public synonym ' ||'"'||SYNONYM_NAME||'";' FROM DBA_SYNONYMS WHERE TABLE_OWNER = 'DMSYS';
SQL> SPOOL OFF
SQL> @drop_dmsys.sql
SQL> EXIT;

Wednesday, May 18, 2016

Output post processor error - java.io.FileNotFoundException

Problem

Concurrent request completed with following error
One or more post-processing actions failed. Consult the OPP service log for details.
When we check Output post processor log below error appear
java.io.FileNotFoundException: <path> (No such file or directory)

Solution

Set the xml/BI publisher with valid temp directory
 Go to XML Publisher Administration responsibility -> Home -> Administration -> Configuration -> Properties -> General
And Enter with valid path or clear the value of Temporary directory


Reference

Output Post Processor Log File Contains java.io.FileNotFoundException (No such file or directory) Error (Doc ID 463388.1)

Wednesday, March 23, 2016

ASM Error - CRS-4124: Oracle High Availability Services startup failed on Linux 6

Problem

Once Installed the ASM Instance, Failed to start OHASD services
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start at /grid/app/11.2.0/grid/crs/install/rootcrs.pl line 443.
Above error because of 11gR2 Database not support with Linux 6


Solution

1. Login to racnode1
2. Open the file $GRID_HOME/crs/install/s_crsconfig_lib.pm
3. Add the following lines before the # Start OHASD
## Added by Mohamed ##

my $UPSTART_OHASD_SERVICE = "oracle-ohasd";
my $INITCTL = "/sbin/initctl";

($status, @output) = system_cmd_capture ("$INITCTL start $UPSTART_OHASD_SERVICE");
if (0 != $status)
{
error ("Failed to start $UPSTART_OHASD_SERVICE, error: $!");
return $FAILED;
}

        # Start OHASD

4. Create a file /etc/init/oracle-ohasd.conf with below content
# Oracle OHASD startup
start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1

5. De-config root.sh on racnode1
[root@astrac1 ~]# cd /u01/app/11.2.0/grid/crs/install/
[root@astrac1 install]# ./roothas.pl -deconfig -force -verbose
2016-03-16 15:20:48: Checking for super user privileges
2016-03-16 15:20:48: User has super user privileges
2016-03-16 15:20:48: Parsing the host name
Using configuration parameter file: ./crsconfig_params
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Delete failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'astrac1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'astrac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'astrac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'astrac1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'astrac1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'astrac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'astrac1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'astrac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'astrac1'
CRS-2677: Stop of 'ora.mdnsd' on 'astrac1' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'astrac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'astrac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
ADVM/ACFS is not supported on oraclelinux-release-6Server-7.0.5.x86_64

ACFS-9201: Not Supported
Successfully deconfigured Oracle Restart stack
[root@astrac1 install]#

5. Re-run root.sh on racnode1
[root@astrac1 ~]# cd /u01/app/11.2.0/grid/
[root@astrac1 grid]# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...
Now racnode1 is configured successfully and OHASD service started. Do the same steps to start the OHASD services on rest of the nodes.

Wednesday, March 2, 2016

To find forgotten Apps and Sysadmin password in R12

To find forgotten Apps Password

1. Connect sqlplus via sysdba
sqlplus / as sysdba
2. Create a function as follows
create or replace FUNCTION apps.decrypt_pin_func(in_chr_key IN VARCHAR2,in_chr_encrypt_pin IN VARCHAR2) RETURN VARCHAR2
AS
LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
/
3. Get the Encrypted password for GUEST user
select ENCRYPTED_FOUNDATION_PASSWORD from apps.fnd_user where USER_NAME='GUEST';
4. Get the apps password using encrypted password return in step 3
SELECT apps.decrypt_pin_func('GUEST/ORACLE','<ENCRYPTED_FOUNDATION_PASSWORD>') from dual;


To find forgotten Sysadmin Password

1. Connect sqlplus via sysdba
sqlplus / as sysdba
2. Create a package an package body as follows
CREATE OR REPLACE PACKAGE XXARTO_GET_PWD AS
FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
RETURN VARCHAR2;
END XXARTO_GET_PWD;
CREATE OR REPLACE PACKAGE BODY XXARTO_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 XXARTO_GET_PWD;
4. Get the password for sysadmin using below script
SELECT Usr.User_Name,
Usr.Description,
XXARTO_GET_PWD.Decrypt (
(SELECT (SELECT XXARTO_GET_PWD.Decrypt (
Fnd_Web_Sec.Get_Guest_Username_Pwd,
Usertable.Encrypted_Foundation_Password)
FROM DUAL)
AS Apps_Password
FROM applsys.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 applsys.Fnd_User Usr
WHERE Usr.User_Name = 'SYSADMIN';

Monday, January 25, 2016

Tape Backup / Restoration commands


Display the content of the tape
tar tvf /dev/st0 

To backup directory to tape with compression
tar cvzf /dev/st0 /u01/finsys

To restore entire data from the tape
tar -xvf /dev/st0 -C /u01/TEST

To restore specific file from the tape
tar -xvf /dev/st0 u01/PROD/finsys.tar -C /u01/TEST

Reference
http://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/