R12.2.x ADOP : [ERROR] ETCC not run in the database node DBHOSTNAME

Environment Information:

Two nodes - 1 DB and 1 Application
OS: Linux x86-64
Application Version: R12.2.3 with AD and TXK Delta 7
DB: 11.2.0.3 (I will be upgrading this to 12c soon)

Issue: After applying the latest AD and TXK patches, while performing the cleanup, I ran into issues with adop.

$ adop phase=cleanup

Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:

..

..

..


Validating system setup.
    Node registry is valid.
    [ERROR]     ETCC not run in the database node wmsqadb
                The EBS Technology Codelevel Checker needs to be run on the database node.
                It is available as Patch 17537119.

    Encountered the above errors when performing database validations.
    Resolve the above errors and restart adop.



[STATEMENT] Please run adopscanlog utility, using the command

"adopscanlog -latest=yes"

to get the list of the log files along with snippet of the error message corresponding to each log file.


adop exiting with status = 1 (Fail)


Solution:
1. Login to the database as APPS schema.
2. Check the table TXK_TCC_RESULTS and verify that the information is same as FND_NODES.
select * from APPLSYS.TXK_TCC_RESULTS;
select * from  FND_NODES;
 3. If the value in APPLSYS.TXK_TCC_RESULTS are not the same (for example: either Production database name after clone), perform the following steps:

4. Create a backup table
create table APPS.TXK_TCC_RESULTS_backup as select * from APPLSYS.TXK_TCC_RESULTS;

5. Truncate the APPLSYS.TXK_TCC_RESULTS table:
truncate table  APPLSYS.TXK_TCC_RESULTS;

6. Download the ETCC Patch - 17537119.

7.unzip the patch, run the following in Database Node
sh checkDBpatch.sh
It will prompt for database(RDBMS) context file.
8. Now check the APPLSYS.TXK_TCC_RESULTS again
select * from APPLSYS.TXK_TCC_RESULTS;
If the information in the table is correct, proceed with adop phase.

9. Also verify the v$parameter for "_system_trig_enabled",

SQL>select value from v$parameter where name='_system_trig_enabled';

VALUE
--------------------------------------------------------------------------------
TRUE
Note: Since the RDBMS version was 11.2.0.3, I had to download previous version of the ETCC patch.

Reference:
Error Occurred Performing Database Validations Applying Patch 19330775 (Doc ID 1993838.1)
12.2 Adop Cleanup Fails with Error "ETCC not run in the Database Node" After Running ETCC on the Database Node (Doc ID 2117174.1)

Believe + Attitude=What you achieve


The title does look like a math formula. It is the summary of Carol Dweck's book - Mindset: The new psychology of success in simple words. This book was published in 2006. It was recommended by one of the nerds I admire.

According to the book, the entire world fall into - fixed mindset or growth mindset.

In a fixed mindset, you have a talent in something and that cannot be changed. Growth mindset believes that anyone can be intelligent, smart and achieve anything by effort and attitude. The book depicts the roadblocks hit by a fixed mindset and how it becomes fatal in their life.  The book touches different areas like sports,  work & business, relationship and parenting. The book ends with a workshop to encourage the reader to get into growth mindset. 

Analyzing my own life, I feel like there are somethings I do with fixed mindset while rest being in growth mindset. I would definitely recommend this as a must read.

Drop an Oracle Database using SQLPlus - Drop Database

DBCA is one of the most popular method of dropping an Oracle database. I personally use SQLPlus method. It is simple, fast and removes the files from the storage as well. SQLPlus also doesn't verify the inventory information for the drop.

Please set the environment variables like $ORACLE_SID, $ORACLE_HOME, $PATH. If the database is already up and running, issue a shutdown first. Following are the order of commands:

$ sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount exclusive restrict;
SQL> drop database;
SQL> exit
Please wait for few minutes and you can see the database files are removed.

OPatch Error after copying Oracle Home : Inventory load failed... OPatch cannot load inventory for the given Oracle Home.

In order to save time, I copied Oracle Database Home from one server to another including the inventory. When I tried to do a 'lsinventory' I got the following error:

$opatch lsinventory -invPtrLoc /r01/app/oracle/oradb/oraInventory/oraInst.loc

Oracle Interim Patch Installer version 12.1.0.1.6
Copyright (c) 2015, Oracle Corporation.  All rights reserved.


Oracle Home       : /r01/app/oracle/oradb/12.1.0
Central Inventory : /r01/app/oracle/oradb/oraInventory
   from           : /r01/app/oracle/oradb/oraInventory/oraInst.loc
OPatch version    : 12.1.0.1.6
OUI version       : 12.1.0.2.0
Log file location : /r01/app/oracle/oradb/12.1.0/cfgtoollogs/opatch/opatch2015-06-02_10-31-39AM_1.log

List of Homes on this system:

  Home name= OraDB12Home1, Location= "/u01/app/oracle/oradb/12.1.0"
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

OPatch failed with error code 73

Solution:

Go to the Inventory location (in my case /r01/app/oracle/oradb/oraInventory/ContentsXML) and search for inventory.xml. Replace

HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/oradb/12.1.0" TYPE="O" IDX="1"
with
HOME NAME="OraDB12Home1" LOC="/r01/app/oracle/oradb/12.1.0" TYPE="O" IDX="1" 

in the inventory.xml and save it.

Oracle WebCenter Content RCU with 12c database - ORA-01950: no privileges on tablespace

While creating schema for WebCenter Content (11.1.1.8.0) using the RCU ofm_rcu_win_11.1.1.8.0_64_disk1_1of1.zip against a 12c database caused the following error:

JDBC SQLException - ErrorCode: 1950SQLState:42000 Message: ORA-01950: no privileges on tablespace 'WCC_ORAIRM'

Error encountered executing SQL statement  FileName: 'Z:AAAA\Desktop\ofm_rcu_win_11.1.1.8.0_64_disk1_1of1\rcuHome\\rcu\integration\\irm\sql\oracle\create_irm_tables.sql' LineNumber: '64'
SQL Statement: [INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN_TABLE', 0)]
java.sql.SQLSyntaxErrorException: ORA-01950: no privileges on tablespace 'WCC_ORAIRM'

Cause :

This is due to changes in the 12c database compared to 11g: UNLIMITED TABLESPACE is no longer included in RESOURCE role. Quota must be explicitly set by ALTER USER.

Solution:
Go to the RCU location:

Z:AAAA\Desktop\ofm_rcu_win_11.1.1.8.0_64_disk1_1of1\rcuHome\rcu\integration\irm\sql\oracle

alter user &irm_user quota unlimited on &def_tablespace;
or
alter user &&1 quota unlimited on &&3; 

Repeat the following for contentserver11, contentserver11search, capture, ipm, urm.

Oracle System Change Number (SCN) : How to find the current SCN, SCN and Archive Log

Oracle SCN (System Change Number) is a mechanism to maintain data consistency in Oracle database. A stamp that defines a committed version of a database at a point in time. Oracle assigns every committed transaction a unique SCN.

Checkpoint (CKPT) occurs when all modified database buffers in the Oracle SGA are written out to datafiles by the database writer (DBWn) process. It is a data structure that defines an SCN in the redo thread of a database. Checkpoints are recorded in the control file and each datafile header, and are a crucial element of recovery.

How to find current SCN in the database

Method-I
column current_scn format 99999999999999999999;
select current_scn from v$database; 

Method-II
select to_char(dbms_flashback.get_system_change_number) from dual;

Archive Log and SCN:

col first_change# for 999999999999999999
col next_change# for 999999999999999999
select name, thread#, sequence#, status, first_time, next_time 
from v$archived_log 
where &scn between FIRST_CHANGE# and NEXT_CHANGE#;

SCN and Timestamp:
SQL>select scn_to_timestamp(281840233193) as timestamp from dual;

TIMESTAMP
---------------------------------------------------------------------------
04-MAY-15 10.01.49.000000000 AM
SQL>col scn for 99999999999999999999;
SQL>select timestamp_to_scn(to_timestamp('05/04/2015 10:25:01','MM/DD/YYYY HH24:MI:SS')) as scn from dual;

                  SCN
---------------------
         281842111354
SQL>select timestamp_to_scn(to_timestamp('05042015102501','MMDDYYYYHH24MISS')) scn from dual; 
 SCN
---------------------
         281842111354

Other options are to query smon_scn_time and v$log_history. smon_scn_time is owned by SYS and have data worth of 5 days.

11g: Bulk Insert Example

I happen to work recently on a scenario where I had to inset close to 46 Million records . I had to perform a BULK COLLECT (Insert) script so that I dont get ORA-01555: Snapshot too old error.
DECLARE
cursor c1 is
SELECT *
FROM DS.TIME_TEMP_TBLE;

TYPE TYPE_TB1 IS TABLE OF DS.TIME_TARGET_TBLE%ROWTYPE;
TARG_TB1 TYPE_TB1;

l_limit number := 1000000;
BEGIN

OPEN c1;
LOOP
                Fetch c1 BULK COLLECT INTO TARG_TB1 LIMIT l_limit;

                FORALL i IN 1..TARG_TB1.COUNT
                insert into DS.TIME_TARGET_TBLE
                values TARG_TB1(i);
 COMMIT;
        EXIT WHEN c1%ROWCOUNT < l_limit;
END LOOP;
CLOSE c1;
END;
/
COMMIT;
EXIT;

Other different options are to use FOR instead of  FORALL, or use
FORALL i IN TARG_TB1.first..TARG_TB1.last 
From my testing, I felt that using COUNT was faster.

R12.x - ORA-20100: Error: FND_FILE failure. Unable to create file, lxxxxxxx.tmp in the directory, /yyy/zzzz/abc

Concurrent Request Set and Progam results in the following error:
ORA-20100: Error: FND_FILE failure. Unable to create file, lxxxxxx.tmp in the directory, /yyy/zzzz/abc

Oracle Applications produces temporary PL/SQL output files used in concurrent processing. These files are written to a location on the database server node specified by the APPLPTMP environment setting. As the temporary files placed in this directory may contain context sensitive information, it should be a secure directory on the database server node with read and write access for the database server owner. In a multi-node system, the directory defined by APPLPTMP does not need to exist on the application tier servers. In my environment, APPLPTMP= /u03/sqlcom/outbound.

There are many scenarios for this error and I will try to visit most of the cases here.

1. Check the location for APPLPTMP  and confirm that is not 100% full in storage.

2. Set APPLTMP to the first directory in utl_file_dir parameter as FND_FILE writes to the first directory in utl_file_dir.

 SELECT value FROM  v$parameter WHERE name = 'utl_file_dir';

3.  Database Read/Write Check :  If you can write a file using UTL_FILE, which is used by FND_FILE.

set serveroutput on 
DECLARE 
  file_location VARCHAR2(256) := '<first entry on utl_file_dir>'; 
  file_name VARCHAR2(256) := 'utlfile_TEST1.lst'; 
  file_text VARCHAR2(256) := 'THIS IS A TEST'; 
  file_id UTL_FILE.file_type; 
BEGIN 
  file_id := UTL_FILE.fopen(file_Location, file_name, 'W'); 
  UTL_FILE.put_line(file_id, file_text); 
  UTL_FILE.fclose(file_id); 
EXCEPTION 
  WHEN UTL_FILE.INVALID_PATH 
  THEN dbms_output.put_line('Invalid path ' || SQLERRM); 
    WHEN OTHERS 
  THEN dbms_output.put_line('Others '|| SQLCODE || ' ' || SQLERRM); 
END; 
/

If this fails, the issue is on database.

4. Check if you can write a file directly using FND_FILE, which is the package used by the Application. From sqlplus, connected as the apps user, run:

exec FND_FILE.PUT_LINE(FND_FILE.LOG, 'THIS IS A TEST');

If this test works, it would indicate that FND_FILE is working fin.

5. Make sure the file that the concurrent program is trying to create already exists on the APPLPTMP location. Also please verify the permissions on the APPLPTMP directory.

6. If still having problems, your SPFILE may be corrupt or just restart the database. 
 - Shutdown all the Application Services
 - Verify the spfile for the utl_file_dir parameter
 - Restart the database

7. If you decide to change the location of APPLPTMP, Make sure to run autoconfig after changing the APPLPTMP value in the  autoconfig context file.

Reference:
Concurrent Processing - Troubleshooting Concurrent Request ORA-20100 errors in the request logs (Doc ID 261693.1)

R12.2.x Rapid Clone: Application configuration 'perl adcfgclone.pl appsTier' : Oracle Homes are unregistered from the global inventory

Performing Rapid Clone on the application server resulted in an error within few minutes that I triggered 'adcfgclone.pl'. The issue is with Inventory.
$ cd <COMMON_TOP>/clone/bin
$ perl adcfgclone.pl appsTier

Please note that 'fs2' is my RUN Edition in my environment.

Error from adcfgclone.pl:
......
FMW Pre-requisite check log file location : /wms/app/oracle/fs2/EBSapps/comn/clone/FMW/logs/prereqcheck.log

Running: /wms/app/oracle/fs2/EBSapps/comn/clone/FMW/t2pjdk/bin/java -classpath /wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/engine.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereq.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereqChecks.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstaller.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstallerNet.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/srvm.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl2.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl-log4j.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/xmlparserv2.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/share.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/java oracle.apps.ad.clone.util.FMWOracleHomePreReqCheck -prereqCheckFMW -e /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/appl/admin/BERRY_PINK1.xml -stage /wms/app/oracle/fs2/EBSapps/comn/clone -log /wms/app/oracle/fs2/EBSapps/comn/clone/FMW/logs/prereqcheck.log

Beginning application tier Apply - Fri Jan  9 10:11:06 2015

/wms/app/oracle/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /wms/app/oracle/fs2/EBSapps/comn/clone/jlib/xmlparserv2.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/ojdbc6.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/java:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/OraInstaller.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/ewt3.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/share.jar:/wms/app/oracle/fs2/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/wms/app/oracle/fs2/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.ApplyAppsTier -e /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/appl/admin/BERRY_PINK1.xml -stage /wms/app/oracle/fs2/EBSapps/comn/clone    -showProgress -nopromptmsg
Log file located at /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/ApplyAppsTier_01091011.log
  |      0% completed
ERROR while running Apply...
Fri Jan  9 10:11:08 2015

 ERROR: Failed to execute /wms/app/oracle/fs2/EBSapps/comn/clone/bin/adclone.pl

 Please check logfile.
[applwms@PINK1 bin]$

Logfile (ApplyAppsTier_01091011.log):

#############################################################
Started ApplyAppsTier at Fri Jan 09 10:11:07 CST 2015
Version:
        ApplyAppsTier.java      :       120.11.12020000.6
#############################################################

Below Oracle Homes are already registered in the global inventory:
/wms/app/oracle/fs2/FMW_Home/Oracle_EBS-app1
/wms/app/oracle/fs2/FMW_Home/webtier
/wms/app/oracle/fs2/FMW_Home/oracle_common

Exiting Cloning...

Ensure that the above Oracle Homes are unregistered from the global inventory "/wms/app/oracle/oraInventory/ContentsXML/inventory.xml" and re-run adcfgclone.pl script

Solution:
Go to /wms/app/oracle/fs2/EBSapps/10.1.2/oui/bin (or $ORACLE_HOME/oui/bin) and run the following to unregister the Oracle Homes from the inventory.

$ cd $ORACLE_HOME/oui/bin
$ ./runInstaller -silent -deinstall REMOVE_HOMES={"/wms/app/oracle/fs2/FMW_Home/Oracle_EBS-app1"}
$ ./runInstaller -silent -deinstall REMOVE_HOMES={"/wms/app/oracle/fs2/FMW_Home/oracle_common"}
$ ./runInstaller -silent -deinstall REMOVE_HOMES={"/wms/app/oracle/fs2/FMW_Home/webtier"}

You may have to do the same when you build PATCH Edition (fs1 in my case).

R12.2.x - Application Clone 'perl adcfgclone.pl appsTier' : ..clone/FMW/pasteBinary.sh results in ERROR: Script failed, exit code 255

While performing rapid clone of R12.2.3 environment, I faced an error while running adcfgclone.pl. I performed the below step and it resulted in error :
$ cd <COMMON_TOP>/clone/bin
$ perl adcfgclone.pl appsTier
Please note that 'fs2' is the RUN Edition on my environment.
Error from adcfgclone.pl:
..


Beginning application tier Apply - Fri Jan 16 10:59:52 2015

/wms/app/oracle/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /wms/app/oracle/fs2/EBSapps/comn/clone/jlib/xmlparserv2.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/ojdbc6.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/java:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/OraInstaller.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/ewt3.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/share.jar:/wms/app/oracle/fs2/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/wms/app/oracle/fs2/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.ApplyAppsTier -e /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/appl/admin/BERRY_PINK1.xml -stage /wms/app/oracle/fs2/EBSapps/comn/clone    -showProgress -nopromptmsg
Log file located at /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/ApplyAppsTier_01161059.log
  |      0% completed
ERROR while running Apply...
Fri Jan 16 11:04:01 2015

 ERROR: Failed to execute /wms/app/oracle/fs2/EBSapps/comn/clone/bin/adclone.pl

 Please check logfile.
[applwms@PINK1 bin]$


Log file (ApplyAppsTier_01161059.log): 

[applwms@PINK1 fmwT2PApply]$ cat /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/ApplyAppsTier_01161059.log
#############################################################
Started ApplyAppsTier at Fri Jan 16 10:59:53 CST 2015
Version:
        ApplyAppsTier.java      :       120.11.12020000.6
#############################################################

START: Creating the FMW Home from ApplyAppsTier
FMW JDK version in use: 1.7.0_25

START: Creating FMW Home.
Running /wms/app/oracle/fs2/EBSapps/comn/clone/FMW/pasteBinary.sh -javaHome /wms/app/oracle/fs2/EBSapps/comn/util/jdk64 -al /wms/app/oracle/fs2/EBSapps/comn/clone/FMW/FMW_Home.jar -tl /wms/app/oracle/fs2/FMW_Home -invPtrLoc /etc/oraInst.loc -ldl /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/fmwT2PApply -silent true -executeSysPrereqs false
Script Executed in 247686 milliseconds, returning status 255
ERROR: Script failed, exit code 255
[applwms@PINK1 fmwT2PApply]$


This doesn't help the error we are getting much unless you check CLONE2015-01-16_10-59-54AM.log and CLONE2015-01-16_10-59-54AM.error files. These files are located on /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/fmwT2PApply.

Log file (/wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/fmwT2PApply/CLONE2015-01-16_10-59-54AM.log): 

INFO : Jan 16, 2015 10:59:55 AM - CLONE-21012   The archive will be restored fully at /wms/app/oracle/fs2/FMW_Home.
INFO : Jan 16, 2015 10:59:55 AM - CLONE-21104   The number of Oracle homes and Middleware homes present in the archive is 3 and 1 respectively.
INFO : Jan 16, 2015 10:59:57 AM - CLONE-21060   No system prerequisites will be executed for the Oracle home /wms/app/oracle/fs2/FMW_Home/oracle_common/ as it is set to false.
INFO : Jan 16, 2015 10:59:57 AM - CLONE-21060   No system prerequisites will be executed for the Oracle home /wms/app/oracle/fs2/FMW_Home/webtier/ as it is set to false.
INFO : Jan 16, 2015 10:59:57 AM - CLONE-21060   No system prerequisites will be executed for the Oracle home /wms/app/oracle/fs2/FMW_Home/Oracle_EBS-app1/ as it is set to false.
INFO : Jan 16, 2015 10:59:57 AM - CLONE-21156   Extracting all the homes from the archive file. Extraction time will vary depending upon the archive size ...
INFO : Jan 16, 2015 10:59:57 AM - CLONE-21157   The size of the all homes are 5.117 GB.
INFO : Jan 16, 2015 11:00:11 AM - CLONE-21126   Operation is 13% complete, in "14" seconds.
INFO : Jan 16, 2015 11:00:38 AM - CLONE-21126   Operation is 20% complete, in "40" seconds.
INFO : Jan 16, 2015 11:01:25 AM - CLONE-21126   Operation is 30% complete, in "87" seconds.
INFO : Jan 16, 2015 11:01:47 AM - CLONE-21126   Operation is 40% complete, in "110" seconds.
INFO : Jan 16, 2015 11:02:07 AM - CLONE-21126   Operation is 50% complete, in "130" seconds.
INFO : Jan 16, 2015 11:02:43 AM - CLONE-21126   Operation is 60% complete, in "165" seconds.
INFO : Jan 16, 2015 11:03:14 AM - CLONE-21126   Operation is 70% complete, in "196" seconds.
INFO : Jan 16, 2015 11:03:51 AM - CLONE-21126   Operation is 80% complete, in "233" seconds.
INFO : Jan 16, 2015 11:04:00 AM - CLONE-21025   Restoring Middleware home at "/wms/app/oracle/fs2/FMW_Home/" from archive "/wms/app/oracle/fs2/EBSapps/comn/clone/FMW/FMW_Home.jar" started ...
INFO : Jan 16, 2015 11:04:01 AM - CLONE-21037   Time taken to restore all cloners from archive was "243" seconds.
INFO : Jan 16, 2015 11:04:01 AM - CLONE-21006   Total time taken by T2P process was 245 seconds.



Error File (/wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/fmwT2PApply/CLONE2015-01-16_10-59-54AM.error) :

SEVERE : Jan 16, 2015 11:04:00 AM - ERROR - CLONE-20275   Insufficient space to create /tmp/CLONINGCLIENT5418759569442312041.
SEVERE : Jan 16, 2015 11:04:00 AM - CAUSE - CLONE-20275   Minimum required space was at least "1,773" MB, but only "897" MB was available for use.

SEVERE : Jan 16, 2015 11:04:00 AM - ACTION - CLONE-20275   Make sure that the minimum required space is available for use.
SEVERE : Jan 16, 2015 11:04:00 AM - ERROR - CLONE-20233   Restoring Middleware home for sourceid "mwhome1@FMW_Home" has failed.
SEVERE : Jan 16, 2015 11:04:00 AM - CAUSE - CLONE-20233   An internal operation failed.
SEVERE : Jan 16, 2015 11:04:00 AM - ACTION - CLONE-20233   Check the clone log and error file for more details.
SEVERE : Jan 16, 2015 11:04:00 AM - ERROR - CLONE-20237   Restoring the sourceid "mwhome1@FMW_Home" has failed.
SEVERE : Jan 16, 2015 11:04:00 AM - CAUSE - CLONE-20237   An internal operation failed.
SEVERE : Jan 16, 2015 11:04:00 AM - ACTION - CLONE-20237   Check the clone log and error file for more details.
SEVERE : Jan 16, 2015 11:04:01 AM - ERROR - CLONE-20218   Cloning is not successful.
SEVERE : Jan 16, 2015 11:04:01 AM - CAUSE - CLONE-20218   An internal operation failed.
SEVERE : Jan 16, 2015 11:04:01 AM - ACTION - CLONE-20218   Provide the clone log and error file for investigation.

Solution:
/tmp is used by Oracle rapidclone to extract and build FMW Home on the target. Please make sure you have you have at least 2 GB of /tmp space on the target server.

R12.1.x ASCP : The executable file /../../bin/MSCMON for this concurrent program cannot be executed. Contact your system administrator or support representative.

We are in the process of implementing Advanced Supply Chain Planning (ASCP) for our Oracle E-Business Suite (EBS).  The Snapshot Monitor program (MSCMON) resulted in the below error.

Error:
The executable file /p01/oracle/apps/apps_st/appl/msc/12.0.0/bin/MSCMON for this concurrent program cannot be executed. Contact your system administrator or support representative. Verify that the execution path to the executable.

Operating System: Linux x86-64 bit
EBS Version: R12.1.2 with ASCP patches R12.1.3

Issue: Some of the executable were missing like MSCCPP, MSCMON, MSCNEW, MSCNSP, MSCNSPNM, MSCPCL, MSCPCP, MSCPDW, MSCPRG, MSCSDW, MSCSLD and MSCXGCAL from $MSC_TOP/bin. MSONEW was missing from $MSO_TOP/bin.

Solution:
Relink the MSC and MSO modules using adadmin and verify the executable are present.

ADADMIN
 - 2. Maintain Applications Files menu
    - 1. Relink Applications programs
       Do you wish to proceed with the relink [Yes] ?
       Enter the name of your Oracle Applications environment file below.
       File name [APPLE_vaidiyan1.env] :
       Enter list of products to link ('all' for all products) [all] : MSC
       Generate specific executables for each selected product [No] ? Yes
       Relink with debug information [No] ?
       Enter executables to relink, or enter 'all' [all] :

Repeat the same process for MSO.

In my case, adrelink failed for the MSC executables.

Error:

/p01/oracle/apps/apps_st/appl/mso/12.0.0/lib/libmso.a(msopomresconsume.o)
collect2: ld returned 1 exit status
make: *** [/p01/oracle/apps/apps_st/appl/msc/12.0.0/bin/MSCMON] Error 1
Done with link of msc executable 'MSCMON' on Mon Dec 15 12:15:27 CST 2014

Relink Solution:

This is a Bug 9907575: CHANGE ADRELINKNEW.SH FOR RELINK APS EXE ON OEL/RH 5.

1. Backup $AD_TOP/bin/adrelinknew.sh and open the file.
2. Search the string below in the LINUX section and modify it appropriately

CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh'
 
TO

CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh -Wl,--noinhibit-exec' 

3. Now relink MSC/MSO/MSR executables with adadmin.

Reference:
MSCNSP Memory Based Snapshot Errors Concurrent Program Cannot Be Executed (Doc ID 562672.1)
Unable to relink MSC/MSO executables on OEL/RHEL5 and also RedHat 4.9 (Doc ID 1273390.1)
ADRELINK of MSC and MSO executables fail (Doc ID 1492763.1)
MSC Relinking Error on Linux OEL5/RHEL5, Relink of module "MSCCPP" failed, "FEMCCE","MSCNEW","MSCMON". There was No MSC Relink Problem when Worked on RHEL 4 (Doc ID 1128486.1)    To Bottom   
R12: MSC Modules Error Out When Relinking with Adrelink (Doc ID 1345788.1)

R12.2.x - Flexfield value set security : Grant flexfield value set access to specific users

Oracle Applications release 12.2.x brings a new Separation of Duty feature - FLEXFIELD VALUE SET SECURITY. It controls who can create, view, insert or update values for a particular value set in the Flexfield Values Setup window (FNDFFMSV).

The effect of flexfield value set security is that a user of the Segment Values form will only be able to view those value sets for which the user has been granted access. Further, the user will be able to insert or update/disable values in that value set if the user has been granted privileges to do so. Note that where a value set is being used by multiple flexfield segments or report parameters, any changes made to a value set affect all segments or parameters that use the same value set, even if access is not explicitly granted for the flexfield that shares the value set. 

Note: Flexfield value set security is not currently supported by the Account Hierarchy Manager in Oracle General Ledger, though the Account Hierarchy Manager only provides access to value sets that are used for the Accounting Flexfield. Flexfield value set security is also not currently supported by the Setup Workbench in the Oracle Product Information Management product. For both of these products, you should maintain tight control over who has access to these pages on their menus.

When you initially install or upgrade to Release 12.2.2, no users are allowed to view, insert or update any value set values. You must explicitly set up access for specific users by enabling appropriate grants and roles for those users.

Setting Up Flexfield Value Security : Setting up value security mostly consists of creating grants using the Functional Administrator responsibility.

Oracle Recommendation: To create roles and create grants to those roles rather than directly to individual users.

Our Strategy: What I 'have done in our environment is to assign all privileges to System Administrator Responsiblity and View only to all users. This way whoever have System Administrator responsiblity will be able to modify the Value Set.

Functional Administrator > Security Tab > Create Grant.

Create Grant: Define Grant
Name: XX_VALUE_SET_ACCESS_SYSADMIN
Security Context
Grantee Type: All Users
Responsibility: System Administrator
Data Security
Object : Flexfield Value Set Security Object (Code:FND_FLEX_VSET_OBJECT, Source:FND_FLEX_VALUE_SETS)

Create Grant: Select Object Data Context
Object Flexfield Value Set Security Object
Data Context Type: Instance Set
Name: All value sets (Code:FND_FLEX_VSET_OBJSET_ALL, Description:Give access to all value sets)

Create Grant: Define Object Parameters and Select Set
Data Security
Object Flexfield Value Set Security Object
Data Context
Type Instance Set
Name All value sets
Description Give access to all value sets
Predicate
1=1
Set
Name: Flexfield Value Set Security Insert/Update Set (Code:FND_FLEX_VSET_INSERT_UPDATE_PS, Description:Allow insert and update of values in a value set)

Create Grant: Review and Finish
Review the information and hit the Finish button.

There are two options to give users access to all value sets for backward compatibility

Reference:
Oracle E-Business Suite Release 12.2.3 Readme (Doc ID 1586214.1)
Oracle E-Business Suite Release 12.2.4 Readme (Doc ID 1617458.1)
Oracle® E-Business Suite Flexfields Guide, Release 12.2 (Part No. E22963) -'Flexfield Value Set Security'

Oracle 11g, 12c: rlwrap: error: Cannot execute sqlplus: No such file or directory

I have installed an ASM instance and tried to login using sqlplus and received the below error:
$ sqlplus
rlwrap: error: Cannot execute sqlplus: No such file or directory

$ sqlplus / as sysdba
rlwrap: error: Cannot execute sqlplus: No such file or directory

Operating system: RedHat Linux 6.5

Solution: 
Add the following to the environment file :
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib 

R12.2.x Oracle E-Business Suite Sanity Check

An instance validation is highly recommended whenever we install or upgrade Oracle E-Business Suite (EBS) or clone an Oracle Application system to test or even while applying AD, Techstack (TXK) and family packs. The sanity checks are valid whenever we take the system down for maintenance or perform a disaster recovery. Following are some of the validation tests for an Oracle EBS R12.x and above that I perform.

1. Basic Technology Stack Health Testing   
Check LocalLogin using: /OA_HTML/AppsLogin
Login via Forms Direct Login: /forms/frmservlet?

Check for any errors or exceptions, if any, in Java Console as well as during Forms launch

2. Multiple Forms Launching In Single Forms Session

After logon (SYSADMIN/sysadmin) to Apps, click System Administrator -> Security: User-> Define. Now from the html navigator, open the Application-> Currency form.The new form should open in the existing forms session (i.e., the earlier form as well as new form should co-exist).

3. AOL/J Test  

Logon http://<hostname:port>/OA_HTML/jsp/fnd/aoljtest.jsp with DB connection details.
All the tests should pass without errors/exceptions.

4.Concurrent Request (CR)

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator -> Requests-> Run-> Single Request. Select the concurrent request 'Active User' and hit Submit. This should not throw any errors or exceptions in any phase. View Output should generate report without any errors. There should not be any errors in the report log file.

5. Reports Regression Test

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator -> Requests-> Run-> Single Request. From the Name LOV, choose 'CP Text Report Regression Test' (with parameters Run Mode ::'FULL', Duration:: 0) and click on Submit. Ensure that this CR completes successfully.

6. Java Regression Test   

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator -> Requests-> Run-> Single Request. From the Name LOV, choose 'CP Java Regression Test' (Set parameters as 'Basic') and click on Submit. Ensure that this CR completes successfully.

7. PLSQL Regression Test

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator -> Requests-> Run-> Single Request. From the Name LOV, choose 'CP PLSQL Regression Test' (Set parameters as 'Basic') and click on Submit. Ensure that this CR completes successfully.

8. Perl Regression Test

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator -> Requests-> Run-> Single Request. From the Name LOV, choose 'CP Perl Regression Test' (Set Parameters as 'Basic') and click on Submit. Ensure that this CR completes successfully.

9. OAM functionality

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administration-> Oracle Applications Manager --> System Configuration Overview. System Configuration Overview should display current system config values; all processes should be up and running. Check init.ora settings.

10. Diagnostics

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administration-> Diagnostics.
Check AOL/J Diagnostics, JSP Ping, JSP Class Version Information, Servlet Ping, AOL/J Database Connection Pool Status, TCF Status.

11. iHelp Test  

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator, Select Help link On Search Entry, type FNDFS and click Find. Verify that it shows the list of search hits for FNDFS.

12. License Manager   

Logon (SYSADMIN/sysadmin) to EBS. Bring up license manager and try to license/de-license products.

13. TCF Server test

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator-> Application -> Menu. Query the menu item AK_NAVIGATE (Press F10 for editable mode), Click on View Tree button. Menu Viewer screen should appear with the details.

14. FNDFS (Text and Web)

Logon (SYSADMIN/sysadmin) to EBS. Choose System Administrator -> Profile -> System. Set profile option 'Viewer: Text' to <blank> (text format). View the log or output of any concurrent request and it should be opened by forms default viewer. Set profile option 'Viewer: Text' to 'browser' (web format). View the log or output of any concurrent request and it should be opened by web browser window.

15.  Printing

Check the printing from Applications. Print the output of a Concurrent Request.

The tests are all optional.

Oracle 11g and 12c RDBMS: How to check what are the PSU and CPU patches applied on the database

We can find the list of patches applied to RDBMS_ORACLE_HOME by the command opatch lsinventory or opatch lsinventory -detail. There is one another way to find the Patch Set Update (PSU) or Critical Patch Update (CPU) by querying against the database table.

Table Name: SYS.REGISTRY$HISTORY (10g, 11g) and SYS.REGISTRY$SQLPATCH (12c R1 and later)
CPU:
select comments, version, bundle_series from sys.registry$history where bundle_series = 'PSU' order by action_time;

PSU:
select action_time, action, id, comments from sys.registry$history where action = 'CPU' order by action_time;

Other Queries:
select to_char(action_time, 'dd-mon-yyyy hh24:mi:ss') as action_time, action, namespace, version, id, comments,bundle_series from   sys.registry$history order by action_time; 

12c R1  and later Query:
select patch_id,action,status,action_time,description from registry$sqlpatch;

Reference:
Do Patchset Updates (PSU's) Change the Oracle Release Version/Fifth Digit? (Doc ID 861152.1)
The COMMENTS Column Of dba_registry_history And registry$history Tables Shows The Value 11.2.0.2.0 Instead Of 11.2.0.3.0 or 11.2.0.4 (Doc ID 1439486.1)
What information Oracle Support needs to work on Critical Patch Update (CPU) Installation Service Requests (Doc ID 735257.1)

R12.2.x : How to create Autoconfig / Context File on the (RDBMS) database node ?

I was working on a project to migrate R12.2.3 database from HP UX Itanium to RedHat Linux 6.5. In the environment, database server have just the database and application server accommodates the web, oacore, weblogic, concurrent managers and so on. As part of the migration, I had to build new context file for the database on Linux.

The same process can be used when you are adding/deleting a database node to RAC for EBS environment or if you happen to create the EBS database without using Rapid Install.

1. Login to the Application Server (APPL_TOP) as APPLMGR and create appsutil.zip by running the following command:

$ perl <AD_TOP>/bin/admkappsutil.pl 
This will create appsutil.zip in <INST_TOP>/admin/out. 

2. Copy (scp/ftp) the appsutil.zip to Oracle Database Host  - ORACLE_HOME or RDBMS_ORACLE_HOME.

$ cd <RDBMS_ORACLE_HOME>/appsutil/admin
$ unzip -o appsutil.zip 

3. Install Java Runtime Environment (JRE) on the Database tier. The JRE resides in the <RDBMS_ORACLE_HOME>/appsutil/jre directory on the database tier. Use the MOS Note 'All Java SE Downloads on MOS (Doc ID 1439822.1)' to download the required JRE.

Note: Do NOT download the Java SE Development Kit (JDK). Instead, download the JRE that supports 64-bit JVM.

In my case, I downloaded p14558210_17070_Linux-x86-64.zip. I copied the zip file to $ORACLE_HOME/appsutil and unzipped the file.
  •  jdk-7u7-linux-x64.rpm
  •  jdk-7u7-linux-x64.tar.gz
  •   jre-7u7-linux-x64.rpm
  •   jre-7u7-linux-x64.tar.gz 
Untar the file and it will create the directory named jre1.7.0_07. Now rename the directory.

$ tar xvf jre-7u7-linux-x64.tar.gz 
$ mv jre1.7.0_07 jre 

4. From the ORACLE_HOME/appsutil/bin directory, create an instance-specific XML context file by executing the command:
$ adbldxml.pl appsuser=APPS appspasswd=APPSpwd 

Reference: 
Using Latest Java 6.0 Update With Oracle E-Business Suite Release 12 (Doc ID 455492.1)
Oracle E-Business Suite Release 12.2: Adding or Deleting 11gR2 Oracle RAC Nodes (Doc ID 1570554.1)
Export/Import Process for Oracle E-Business Suite Release 12.2 Database Instances Using Oracle Database 11.2 (Doc ID 1613716.1)
All Java SE Downloads on MOS (Doc ID 1439822.1)
Oracle® E-Business Suite Setup Guide - Release 12.2 (Part No. E22953-09)

ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission /XXXXXX/sqlcom/out/MISSING_ATTRIBUTE_ITEMS_2111201409:23:51.xls read) has not been granted to APPS.

I created a new Oracle E-Business Suite environment, our tech team developed a code to ftp a file to certain location and then send the file as email using concurrent program. The technical analyst received the following error:

exception in SendMail =ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission /XXXXXX/sqlcom/out/MISSING_ATTRIBUTE_ITEMS_2111201409:23:51.xls read) has not been granted to APPS. The PL/SQL to grant this is dbms_java.grant_permission( 'APPS', 'SYS:java.io.FilePermission', '/XXXXXX/sqlcom/out/MISSING_ATTRIBUTE_ITEMS_2111201409:23:51.xls', 'read' )

Solution: 
Even though the file location is added to UTL_FILE_DIR database init parameter, we have to give to grant Java permission explicitly to the APPS user to read and write.

Login as SYS or SYSTEM user and then assign the required permission using DBMS_JAVA.GRANT_PERMISSION package.

SYS@APPLE SQL>EXEC DBMS_JAVA.GRANT_PERMISSION('APPS', 'SYS:java.io.FilePermission','/XXXXXX/sqlcom/out/*','read,write');

PL/SQL procedure successfully completed.

SYS@APPLESQL>commit;

Commit complete.



Note: Please make sure the commit is important.

The permission information can be verified using the Oracle dynamic views - DBA_JAVA_POLICY and USER_JAVA_POLICY.

R12.1.x - adapcctl.sh: exiting with status 204/ HTTP_Server~1.log : libdb.so.2: cannot open shared object file

I cloned R12.1.2 environment from Production to a Linux 64 bit test system. The clone process completed successfully, When I was trying to start all the services using 'adstrtal.sh' . The HTTP/Apache process did not start up. I was receiving the following error :

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...

adapcctl.sh: exiting with status 204


Research:

Verify the logs. I checked adapcctl.txt 
ias-component/process-type/process-set:
    HTTP_Server/HTTP_Server/HTTP_Server/

Error
--> Process (index=1,uid=1288926491,pid=31768)
    failed to start a managed process after the maximum retry limit

and it referred to HTTP_Server~1.log.

HTTP_Server~1.log showed the actual issue:
/tech_st/10.1.3/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory

Solution:

Shutdown the Oracle Application services and as a  unix root user, create a soft link as follows:

$ ll /usr/lib/libgdbm.so.2.0.0
-rwxr-xr-x 1 root root 24800 Jul 23  2010 /usr/lib/libgdbm.so.2.0.0
ll /usr/lib/libdb.so.2
ls: cannot access /usr/lib/libdb.so.2: No such file or directory
$ ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
$ ll /usr/lib/libdb.so.2
lrwxrwxrwx 1 root root 25 Oct 31 13:07 /usr/lib/libdb.so.2 -> /usr/lib/libgdbm.so.2.0.0

Reference:
Attempting to Start Apache (adapcctl.sh) Throws an 'Error While Loading Shared Libraries: libdb.so.2' on RedHat Linux 5 (Doc ID 879522.1)

R12.2.x - Registering Custom Application/ Product/ CUSTOM_TOP in Oracle E-Business Suite Release 12.2

The process of registering custom application is different from other version oracle applications. Below are the steps that I followed to perform the register custom application like XXONT (An extension to the standard Oracle Order Management module). The same applies for any Custom Application /Product.

With R12.2.x, Oracle have introduced online patching functionality using two file editions - RUN and PATCH. We should NOT use Applications form to register custom application rather use adsplice to ensure that the application is set up for online patching.

Environment:
Two node architecture with application node in Linux and Database on HP UX Itanium

Application Release: R12.2.3 on Linux x-86 64 bit 6
This node runs all the components of the Oracle EBS like forms, weblogic, concurrent managers, OACore and so on.
Database : 11.2.0.3 on HP UX Itanium. Database node contains only the database.

Steps:

1. Create the schema in the database. I am creating a schema called  'PLUM' and I use the same schema for all the custom application. You are always welcome to create each schema for each custom application.

CREATE USER PLUM IDENTIFIED BY plum
DEFAULT TABLESPACE APPS_TS_TX_DATA
TEMPORARY TABLESPACE TEMP1
PROFILE DEFAULT
ACCOUNT UNLOCK; 

GRANT CONNECT, RESOURCE TO PLUM; 
GRANT CREATE ANY CONTEXT TO PLUM; 
GRANT CREATE ANY TYPE TO PLUM; 
GRANT CREATE CLUSTER TO PLUM; 
GRANT CREATE DATABASE LINK TO PLUM; 
GRANT CREATE DIMENSION TO PLUM; 
GRANT CREATE INDEXTYPE TO PLUM; 
GRANT CREATE LIBRARY TO PLUM; 
GRANT CREATE MATERIALIZED VIEW TO PLUM; 
GRANT CREATE OPERATOR TO PLUM; 
GRANT CREATE PROCEDURE TO PLUM; 
GRANT CREATE PUBLIC SYNONYM TO PLUM; 
GRANT CREATE SEQUENCE TO PLUM; 
GRANT CREATE SYNONYM TO PLUM; 
GRANT CREATE TABLE TO PLUM; 
GRANT CREATE TRIGGER TO PLUM; 
GRANT CREATE TYPE TO PLUM; 
GRANT CREATE VIEW TO PLUM;

2. Download the patch 3636980 (Support Diagnostics (IZU) patch for AD Splice). This patch is generic for R12.

3.  Unzip the files in the patch and copy the following three files from p3636980_R12_GENERIC\3636980\izu\admin to your desktop/ current working folder.
  • izuprod.txt
  • izuterr.txt
  • newprods.txt
4.Rename the file izuprod.txt to [CUSTOM_MODULE]prod.txt and izuterr.txt to [CUSTOM_MODULE]terr.txt

In my case, I renamed the file as xxontprod.txt and xxontterr.txt.

5. Open the newprods.txt in a text editor and change all references of "izu" to [custom_module] and all references of "IZU" to [CUSTOM_MODULE]. Please do maintain the case sensitivity.

In my example, I will change 'izu' to 'xxont' and 'IZU' to 'XXONT'.

%%% Splicer control file format 12.0.A
#
# $Header: newprods.txt 120.1 2006/09/20 12:57:45 jaobrien noship $
#
#
# Section for Oracle Support Diagnostic Tools

product=xxont
base_product_top=*APPL_TOP*
oracle_schema=plum
sizing_factor=100
main_tspace=APPS_TS_TX_DATA
index_tspace=APPS_TS_TX_IDX
temp_tspace=TEMP1
default_tspace=APPS_TS_TX_DATA

# end of Oracle Support Diagnostic Tools


6. Open the xxontprod.txt in a text editor
  • Change all the references of 'izu' and 'IZU' with 'xxont' and 'XXONT' respectively. Please do maintain the case sensitivity.
  • Change the Application/Product ID from 278 to your own unique number.
Note: Oracle recommends to pick a number above 50000 that is not already in use. You can use the below SQL to confirm that Application/Product ID is available to use or not:

SQL>select decode(count ,0, 'Selected number is Available', 'Selected number already in use') Status, &&enter_custom_applID selected_number
from
(
select count(*) as count from
(
select 'x' from fnd_oracle_userid
where oracle_id= &&enter_custom_applID
union
select 'x' from fnd_application
where application_id= &&enter_custom_applID)
);

I wanted to give 50301 for XXONT, so I entered 50301 as the parameter for the query. The SQL returned "Selected number is Available". 

So I changed 278 to 50301 in the file - xxontprod.txt.

7. Open the xxontterr.txt in a  text editor.
  • Change all the references of 'izu' to [custom_module] and 'IZU' to [CUSTOM_MODULE] keeping the case sensitivity. In our example, 'izu' --> 'xxont' and 'IZU'  --> 'XXONT'.
  • Change the text 'Oracle_Support_Diagnostic_Tools' to 'abc_custom_app". In my example, I changed the text to 'Plum_Oracle_Order_Management'.
8. Copy the three files to $APPL_TOP/admin directory.
  • xxontprod.txt
  • xxontterr.txt
  • newprods.txt
9. Change the directory to $APPL_TOP/admin and run adsplice. 
Note:  adsplice must be run from the admin directory under APPL_TOP.

$ adsplice



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

Filename [adsplice.log] : adsplice_xxont.log



You are about to install or upgrade Oracle E-Business Suite product tables
in your ORACLE database 'D599'
using ORACLE executables in '/u01/app/oracle/fs1/EBSapps/10.1.2'.
Is this the correct database [Yes] ?



Enter the password for your 'SYSTEM' ORACLE schema:



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



Please enter the directory where your AD Splicer control file is located.
The default directory is [/u01/app/oracle/fs1/EBSapps/appl/admin] : 
Please enter the name of your AD Splicer control file [newprods.txt] :



Do you wish to regenerate your environment file [Yes] ?

Checking if AutoConfig is enabled....

Running AutoConfig on : All products ...

10. Check the adsplice and Autoconfig log file.

Now you can verify that the Custom Product/ Application is in the database using the following queries:

Log in to SQLPLUS as apps.

select * from fnd_application where application_short_name = 'XXONT';
select * from fnd_product_installations where APPLICATION_ID = 50301;
select * from dba_users where username = 'XXONT';

Login to new session of Application node and check for environment file
$ env |grep XXONT
XXONT_TOP=/u01/app/oracle/fs1/EBSapps/appl/xxont/12.0.0
$

$ ls $XXONT_TOP
admin  log  mesg  out  sql


11. You can not create other additional directories if needed like bin, /forms/US, include, lib, mds, reports/US, workflow. 

Note:
If you are using Shared APPL_TOP, you need to  do all these process on ONE node and then run autoconfig on others. You don't have to rerun adsplice. If APPL_TOP is NOT SHARED, repeat the steps 8,9,10 and 11.


Do you have to repeat the steps for Patch File system ?
When you start the next online patching cycle, the prepare phase will run adsplice sync-up actions to synchronize the two file systems. Check for a known bug 18815526:R12.AD.C in case adsplice sync-up fails when prepare phase is run.

Reference:
Creating a Custom Application in Oracle E-Business Suite Release 12.2 (Doc ID 1577707.1)

Oracle 10g /11g - ORA-02082: a loopback database link must have a connection qualifier

I refreshed/cloned an Oracle 11.2.0.2 database from Production and I received the following error while dropping a database link:

SYS@ZERO SQL>drop  public database link ZERO;
drop  public database link ZERO
                           *
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifier


Cause:

You are trying to create or drop a database link to the same database name. This is an expected behavior.

Solution:
Rename the global_name of the database before you can drop the database link.

SYS@ZERO SQL>select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ZERO.VAIDIYAN.COM


SYS@ZERO SQL>


SYS@ZERO SQL>drop  public database link ZERO;
drop  public database link ZERO
                           *
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifie
r


SYS@ZERO SQL>alter database rename global_name to TEST;

Database altered.

SYS@ZERO SQL>drop  public database link ZERO;

Database link dropped.


SYS@ZERO SQL>alter database rename global_name to ZERO;

Database altered.

SYS@ZERO SQL>select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ZERO.VAIDIYAN.COM


SYS@ZERO SQL>

Reference:
ORA-02082 TRYING TO DROP A PUBLIC DBLINK (Doc ID 1070826.6)