Oracle Application R12 | The Function Is Not Available Under The Responsibility

Hello guys

It looks like I am getting something new everyday to blog…the latest is from Oracle Application R12 once after I added a new responsibilities to few users.

The Functions those are listed under new responsibility from the HTML page will not launch, instead a popup window appears with the statement “The Xyz Function Is Not Available Under The abcd Responsibility”

I recently had a nightmare with a custom form, that was revamped almost after 6 years of usage. Although the compiling on Production instance doesn’t have any issues, only portions of the form would load & the only few elements displayed were totally misaligned and the cells looked like just a plain straight line…

After many failed attempts, I tried to clear the cache, which we didn’t from a long time. The culprit was the cache. After releasing the cache, I recompiled the form & everything was fine.

With the above issue also, our issue was with the cache. After releasing the cache, the users were able to launch the form from the HTML page itself. If, this didn’t resolve your issues, have a look here

https://knoworacle.wordpress.com/2012/11/03/the-function-is-not-available-under-the-responsibility/

regards,

rajesh

Oracle E-Business Suite | Should you clone on your desktop using Virtual Machine?

Hello guys

A long thread name? Well the topic is vast, hence the long name. I’ve been dealing with Oracle EBS or applications R12 from last 9 years. Initially I was ONLY developing for the new infrastructure, that gradually changed to taking care of the whole instance.

Painfully, however definitely I did familiarize myself with Linux (RHEL) & the database, exposing myself to building systems with copies of EBS running for development & testing.

Our instance is approximately 650GB as on date, including both application stack and database & a cold backup is hardly 125GB in tar balls. I have attempted & succeeded to build the cloned instances on my home desktop machine many times, however the performance was a huge issue, forcing me to discard the setups quite often.

This time, I decided NOT to discard as my new desktop at home is a beast compared to my previous machine, that was neither less a best ;) & to figure out “something” that will address the “performance” bottleneck.

I created a new VM using Oracle VirtualBox with following specs

6 processors, 20GB memory & 2 fixed size VDI files (120GB, 600GB) respectively for application and database repositories. I was aware of a limitation already, I was setting up the VDI files on a Western Digital Green series 2TB drive! which spins at 5400RPM!

Well, everything went smooth & and I had the instance up and running in couple of hours time & this time, the response of the instance was awesome. I even boasted about finally winning over the “biatch” to my team & sat back feeling “too proud” for the moment.

Next day (Month End 30th April 2019)

I am all excited after figuring out a way to flush GNOME desktop environment & replace it with Xfce & new tricks…

Started the VM at home, started the EBS instance and tried to access the instance from the same machine. I couldn’t even get the login page…something was gravely wrong. I decided to check the performance monitor and found the following:

Slowly I was forced to recognize the terror! The Standard Concurrent manager was configured to process 25 requests at the same time with a cache of 5 & 30 seconds sleep between the requests. Our month end has a number of scheduled jobs + Gather schema statistics in the queue. My VM was breaking up with the I/O. My 2TB storage oriented disk was NOT spinning fast enough to provide the data for the processes & I was left with the BIGGEST question of the hour “Now what?”

I stopped the Concurrent manager, adjusted the processes to 5 for Standard manager & restarted the instance. Left the instance running whole night and 1st May morning, the instance was back to normal performance as whole the scheduled jobs were finished during the night.

Next day I added one 1TB SSD & moved the application & database VDI files over to it. I was able to get the login screen within 2-3 seconds once after the application started from the VM. I submitted number of create accounting and other resource hungry jobs, which were completed in few seconds time…

Now, my setup is ONLY for the sake of it. It doesn’t have many users, it is idle most of the time & almost every day I shutdown the desktop machine after a day’s usage. This might not be the scenario at a real TEST environment. You may need to implement archive logging & RMAN, those all requiring more space & faster access to storage. A Desktop has less resources & the ONLY positive element you are going to live with is the pleasure of building it & knowledge gained while fixing few new issues.

So, can you build a performance oriented R12 using Desktop environment, the short answer is yes. Does it worth the efforts? Well, definitely YOU are the ONE who have to answer it.

Follow the space & soon I will post a thread explaining the entire exercises. If you are in a hurry, you may refer this

The above article loosely explains how to clone R12 instance on Linux 7. However the same could be followed for Linux 6 as well (both RHEL & OEL)

regards,

rajesh

 

Oracle Application R12 | Error: Missing ormi[s] host port

Hello guys

One of the most awkward things that keeps on happening in my life is, I land on my posts/comments those were posted years back, which were definite solutions to few perplexing situations like “Error: Missing ormi[s]://<host>:<port>”

Year 2015, I posted a comment with the below thread

https://aboutsoa.wordpress.com/2009/06/22/error-missing-ormishostport/

explaining a possible solution to the error in attention…but I missed it.

Few days back I was setting up a VM with Oracle Applcations R12 to test SSD based storage device & landed on the same error! I didn’t have a clue…last four days I was going through each every other notes those I made, was scavenging through tones of blog posts and Oracle support documents, trying out suggestions to overcome the error below:

Executing service control script:
…../admin/scripts/adoacorectl.sh stop
Timeout specified in context file: 100 second(s) 

script returned:
****************************************************
ERROR : Timed out( 100000 ): Interrupted Exception

You are running adoacorectl.sh version 120.13

We had our Oracle Application R12 implemented on RHEL 5 & later cloned the same instance on Oracle Linux 6 for TESTs. One of the major differences between RHEL 5 & 6 was the native support for IPV6 with Linux 6. Not just R12, many Oracle products WERE/ARE not yet completely compatible with IPV6 & the first thing geeks ask you to do is to disable IPV6 (Even today!)

I did, trust me I did it on the interface, I did it in the sysctl.conf & wherever possible & still had the same ormi error, whenever I tried to shutdown the application services. The temporary solution was to re-run the stop all script & finally the script completes with “0” error.

I was NOT happy & I wanted my instance to shutdown gracefully, over a single attempt. I “knew” that Oracle was very sensitive to Network stack, a screwed up hostfile, DNS, firewall…anything that is related to network could cause these kind of issues. So I decided to go through each one of them. So, first was the hosts file.

The default /etc/hosts file from Linux 6 has the entries like below

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

When Linux 5 have | Glad that I had a machine to cross check

127.0.0.1 localhost.localdomain localhost

::1 localhost6.localdomain6 localhost6

Immediately I decided to give it a try, I chopped the unnecessary strings from the hosts file & started the application tier & tried to shutdown!

That was it, no more
“Error: Missing ormi[s]://<host>:<port>”

No hacking of the Context files or disabling the IPV6 protocol is required, which could complicate SSH tunnel etc (as per Linux guys, I am not a Linux guy yet ;) in those means)

So, now you have a working solution, you have your IPV4 & IPV6 both enabled & an instance shuts down as you expect. Well, party time guys!

regards,

rajesh

Oracle Application | Inventory | Cannot Create Locators Using The INV_LOC_WMS_PUB API

Hi guys

Currently we are developing a small custom module better controlled sub-inventory transfers. This solution involves an approach as described below:

Our engineering division technicians will receive tools from main warehouse & each technician will have a store locator automatically created when the tools are issued against them for the 1st time.

So the requirement was to create stock locators under the main sub-inventory automatically while the issue happens.

We opted to use INV_LOC_WMS_PUB public API to create stock locators and came across an error, that keep on giving us the below error:

‘Could not create locator.’ and the return status was ‘U’. It looks like the API is not widely used, hence there were hardly many references available online & all we had was the Oracle support knowledge base. Unfortunately most of the documents were not referring obsolete versions like 12.0.x & we decided to go through each and every other document that was dealing with the API.

The we came across a document “Cannot Create Locators Using The INV_LOC_WMS_PUB API (Doc ID 283472.1)”, which had the correct solution for the issues we were facing with the API.

Please note, the below instructions ONLY deal with the situations when the return status from the API is “U”

Using one of the INV super user responsibilities, navigate to:

  1. Setup -> Flexfields -> Key -> Segments
  2. Query for “Stock Locators” Flexfield title
  3. Check whether “Allow Dynamic Inserts” checkbox is selected. If not, select it and save. Now onwards you should able to run the API successfully.

stocklo

Sample API Script (Adjust to your environment, tested against R12 12.0.6, Database:11gR2)


SET DEFINE OFF;
SET SERVEROUTPUT ON SIZE UNLIMITED;

Declare

-- Common Declarations
l_api_version NUMBER := 1.0;
x_return_status VARCHAR2(2);
x_msg_count NUMBER := 0;
x_msg_data VARCHAR2(2000);

-- WHO columns
l_user_id NUMBER := -1;
l_resp_id NUMBER := -1;
l_application_id NUMBER := -1;
l_row_cnt NUMBER := 1;
l_user_name VARCHAR2(30) := 'ABC';
l_resp_name VARCHAR2(50) := 'XYZ INV Super User';

-- API specific declarations
x_inventory_location_id NUMBER := NULL;
x_locator_exists VARCHAR2(1) := NULL;

BEGIN

-- MTL_ITEM_LOCATIONS

-- Get the user_id
SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name = l_user_name;

-- Get the application_id and responsibility_id
SELECT application_id, responsibility_id
INTO l_application_id, l_resp_id
FROM fnd_responsibility_vl
WHERE responsibility_name = l_resp_name;

FND_GLOBAL.APPS_INITIALIZE(l_user_id, l_resp_id, l_application_id);
dbms_output.put_line('Initialized applications context: '|| l_user_id || ' '|| l_resp_id ||' '|| l_application_id );

-- call API to update material status
DBMS_OUTPUT.PUT_LINE('=======================================================');
DBMS_OUTPUT.PUT_LINE('Calling INV_LOC_WMS_PUB.CREATE_LOCATOR');

---fnd_profile.put('MFG_ORGANIZATION_ID',245) ;

INV_LOC_WMS_PUB.CREATE_LOCATOR
( x_return_status => x_return_status
, x_msg_count => x_msg_count
, x_msg_data => x_msg_data
, x_inventory_location_id => x_inventory_location_id
, x_locator_exists => x_locator_exists
, p_organization_id => 309 --245
, p_organization_code => '202' -- 'KWH'
, p_concatenated_segments => 'EMP.2716.' --'A5.A5.A5..'
, p_description => 'RAJESH VARGHESE'
, p_inventory_location_type=> 3 --Type Storage Locator
, p_picking_order => NULL
, p_location_maximum_units => NULL
, p_SUBINVENTORY_CODE => 'TOOLS'
, p_LOCATION_WEIGHT_UOM_CODE => NULL
, p_mAX_WEIGHT => NULL
, p_vOLUME_UOM_CODE => NULL
, p_mAX_CUBIC_AREA => NULL
, p_x_COORDINATE => NULL
, p_Y_COORDINATE => NULL
, p_Z_COORDINATE => NULL
, p_PHYSICAL_LOCATION_ID => NULL -- required when creating logical locators
, p_PICK_UOM_CODE => NULL
, p_DIMENSION_UOM_CODE => NULL
, p_LENGTH => NULL
, p_WIDTH => NULL
, p_HEIGHT => NULL
, p_STATUS_ID => 1
, p_dropping_order => NULL
, p_attribute_category => NULL
, p_attribute1 => NULL
, p_attribute2 => NULL
, p_attribute3 => NULL
, p_attribute4 => NULL
, p_attribute5 => NULL
, p_attribute6 => NULL
, p_attribute7 => NULL
, p_attribute8 => NULL
, p_attribute9 => NULL
, p_attribute10 => NULL
, p_attribute11 => NULL
, p_attribute12 => NULL
, p_attribute13 => NULL
, p_attribute14 => NULL
, p_attribute15 => NULL
, p_alias => NULL );

DBMS_OUTPUT.PUT_LINE('=======================================================');
DBMS_OUTPUT.PUT_LINE('Return Status: '||x_return_status);

DBMS_OUTPUT.PUT_LINE('x_locator_exists: '||x_locator_exists||' x_inventory_location_id:'||x_inventory_location_id);

IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
DBMS_OUTPUT.PUT_LINE('Msg Count:'||x_msg_count||' Error Message :'||x_msg_data);

IF ( x_msg_count > 1 ) THEN
FOR i IN 1 .. x_msg_count LOOP
x_msg_data := fnd_msg_pub.get ( p_msg_index => i , p_encoded =>FND_API.G_FALSE ) ;
dbms_output.put_line ( 'message :' || x_msg_data);
END LOOP;
END IF;
END IF;
DBMS_OUTPUT.PUT_LINE('=======================================================');
END;

 

Oracle Application R12|Payables|FRM-40735 WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-01403

Hello guys

Recently one of our accountants forwarded me a screenshot, that was showing “FRM-40735 WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-01403” while he was trying to enter invoices against a “NEWLY” created vendor/supplier.

posterror

Our Oracle Application R12 (12.0.6) is considered 99.99999% stable, without a single technical or functional issue that really become a show stopper throughout last many years.

Well, this particular issue looked perplexing as it was not dealt by Oracle Application’s error reporting & slowly we started dwelling Oracle support documents those were dealing with the given forms error “FRM-40735 WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-01403”

Most of the documentations where mentioning about IBY duplicate pay party, which was not our case. Hence, I decided to open the associated form APXINWKB.fmb & located the WHEN-VALIDATE-ITEM trigger associated with the column “Purchase Order Number”. I couldn’t find any irregularities between an order that didn’t raise the error and this particular Purchase order did raise the exception, which was unhandled.

After two days of continuous attempts, I remembered that such errors happen in other forms modules when we had missing information for new vendors/suppliers. Must be due to a bug, there were times when site level details were NOT populated to organizations level details for a vendor/customer & I decided to go through all mandatory elements those were expected while creating a new vendor/supplier.

I sat with my colleague and we reached to “Payment Method”, and realized that the default payment method was not set for this particular vendor against the organization where we were getting this unhandled exception.

Once the payment method was set, the invoice was posted for the vendor successfully! So, if you come across these kind of unhandled exceptions across Oracle’s proprietary forms those deal with payments/invoices, prior exhausting yourself with cloning and patching, make sure you have all the mandatory elements for customer/vendors are properly filled in and assigned to all the organizations.

Hope this finding helps few consultants out there!

regards,

rajesh

Oracle EBS | Restoring database from RMAN backup

Hi guys

I always wondered how the heck a RMAN backup could be restored to Oracle EBS environment. Last two years, I spent considerable time learning Oracle database technology, especially about the backup and restore procedures (learning a lesson after a disaster)

We have the following approach towards Oracle EBS backup:

Daily RMAN hot backup (Friday’s exempted as we do a full cold backup), with 7 days retention policy.

Weekly cold backup for both application and database tiers

Cold backup is written to a backup server, then copied to an external driver (USB attached). This way the cold backup remains in 3 different places.

Usually whenever a fresh clone requested, we were building them against the latest cold backups. Many cases a Friday cold backup clone is NOT what the consultants want, they need much recent data on a Thursday! This has forced me to start pondering over google to find a properly written document to support my own experiments and not like other areas of database, the availability of decent documents were scarce!

So I approached one of my APPS DBA friends, who was always there to help me & readily made me available with a document that he used for his specific environment. After some tweaks I was able to successfully restore the RMAN BACKUP to Oracle EBS environment without troubles (Well, the time it took were much more than that from a cold backup cloning)

I assume, if you are going through this write-up, you have the below setups:

  1. Single instance Oracle EBS R12 Deployment
  2. You are using Oracle 11g R2
  3. You are on LINUX
  4. You already have a cloned instance, properly configured SPFILE & listener services
  5. You have environment parameters set and called through .bash_profile(s)

Steps

copy RMAN files from Production server to TEST server using SCP. The document asks me to create the same path structure, haven’t tried other options yet. For example, the Production server has /u03/RMAN/DAILYBKP for the daily RMAN backups, hence I made the same available with TEST instance as well. The below command copies the RMAN backups those are one day older from the current date to TEST instance.

time scp `find -maxdepth 1 -type f -mtime -1` root@erptest.xyz.com:/u03/RMAN/DAILYBKP

Once the files are copied, shutdown both application and database instances respectively.

Delete the .dbf files (data files) from the “apps_st/data/” folder.

Example, my TEST server has the data files here “/u01/oratest/TEST/db/apps_st/data”, so I did a rm -rf * here to remove all the files available in this folder. We’ve approximately 500GB data files in this folder.

Once the files are deleted, open a terminal and switch to Oracle database user. Source the environment incase if the .bash_profile is not set to.

Issue “sqlplus / as sysdba” command

Startup the database in not mounted state

startup nomount

Start another terminal and switch to Oracle database user. Now let us start RMAN recovery

Before attempting the RMAN duplicate, make sure the ORACLE user has full ownership on the backup folder. If not, RMAN will start reporting the controlfile not found & other associated errors and the duplication will fail.

I’ve a cronjob, executed as root to copy the rman files everyday to TEST instance, hence the default ownership on the backup folder is set to root, that I realized today (4th Feb 2019) while trying to duplicate the database!

rman auxiliary /

That should connect you to RMAN duplicate database mode.

Now, the most important few things. The RMAN backup will have datafile names associated with path information. For example, my production server keeps the datafiles in the absolute path “/u05/oraprod/PROD/db/apps_st/data/”, where in my TEST server has the cloned database instance over “/u01/oratest/TEST/db/apps_st/data”. So we will have to rename the database files prior they are restored. The RMAN run command set that you will create will take care of renaming the files.

Create a RMAN command set like below (adjust accordingly)

My production instance database name is “PROD” and my TEST instance name is “TEST”, so the duplicate database command should be adjusted accordingly.

run
{
ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL c2 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL c3 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL c4 DEVICE TYPE disk;
duplicate database to "TEST" backup location '/u03/RMAN/DAILYBKP' nofilenamecheck
db_file_name_convert=('/u05/oraprod/PROD/db/apps_st/data/','/u01/oratest/TEST/db/apps_st/data/')
LOGFILE
GROUP 1 (
'/u01/oratest/TEST/db/apps_st/data/redo01a.log',
'/u01/oratest/TEST/db/apps_st/data/redo01b.log'
) SIZE 1000M ,
GROUP 2 (
'/u01/oratest/TEST/db/apps_st/data/redo02a.log',
'/u01/oratest/TEST/db/apps_st/data/redo02b.log'
) SIZE 1000M ,
GROUP 3 (
'/u01/oratest/TEST/db/apps_st/data/redo03a.log',
'/u01/oratest/TEST/db/apps_st/data/redo03b.log'
) SIZE 1000M ,
GROUP 4 (
'/u01/oratest/TEST/db/apps_st/data/redo04a.log',
'/u01/oratest/TEST/db/apps_st/data/redo04b.log'
) SIZE 1000M ;
RELEASE CHANNEL c1;
RELEASE CHANNEL c2;
RELEASE CHANNEL c3;
RELEASE CHANNEL c4;
}

You may keep the RMAN RUN commands saved in a text file for future use!

At the RMAN prompt execute the newly created RMAN RUN command set. It is going to be a long wait, the bigger the database, the more time you wait for the restoration to happen.

Wait until the RMAN processes are finished. You should be back to RMAN prompt

From a SQL Plus session, shutdown the database

Now restart the database at mount state.

startup mount

Disable Archive logging prior doing anything else

SQL> alter database noarchivelog;

Shutdown the database. Now we will do the post cloning activities against the database instance.

Switch to the appsutil/clone/bin over $ORACLE_HOME path. Example “/u01/oratest/TEST/db/tech_st/11.2.0/appsutil/clone/bin”

Issue the following:

perl adcfgclone.pl dbTechStack

Input details for your instance and complete the post cloning activities. This shouldn’t take much time!

Once the post cloning activities are completed, switch to ..install/TEST_erptest folder, example: “/u01/oratest/TEST/db/tech_st/11.2.0/appsutil/install/TEST_erptest”

Start SQLPlus from this location and execute “adupdlib.sql”

SQL> @adupdlib.sql so

Once the procedure run finishes, issue COMMIT

Commit;

Run Autoconfig for your Application instance and you should be online soon.