Oracle Applications R12 | error while loading shared libraries: libig.so.0…

December 11, 2016

 

applprod@erp-prodbak.my.home:/u01/applprod/PROD/apps/apps_st/appl/au/12.0.0/forms/US>frmcmp_batch module=$AU_TOP/forms/US/XXITMDTLS.fmb userid=apps/apps output_file=$ONT_TOP/forms/US/XXITMDTLS.fmx Module_Type=FORM compile_all=Special
frmcmp_batch: error while loading shared libraries: libig.so.0: cannot open shared object file: No such file or directory
applprod@erp-prodbak.my.home:/u01/applprod/PROD/apps/apps_st/appl/au/12.0.0/forms/US>

Recently I cloned our Production instance to check the feasibility of OEL 6.7 & as usual securely copied most of the bash profile for the Oracle and Application manager users from the production server.

I came across the “cannot open shared object file: No such file or directory” error while trying to compile an old form module & hadn’t have a clue for how to deal with this error, that happened to me first time in last 8 years with Oracle applications.

I crosschecked the folder permissions against production instance and everything was fine. All I could remember which could have gone wrong was narrowed down to the bash profile for the application user and after validating I realized that I was sourcing a wrong environment file!

Instead of sourcing the “/apps/apps_st/appl/APPSPRODBAK_hostname.env” file, I was sourcing “/apps/apps_st/appl/PRODBAK_hostname.env”. I realized it while trying to echo the $ORACLE_HOME variable as application manager user.

So, if you come across “error while loading shared libraries” error while trying to compile, before start dismantling your instance, try to see whether you have sourced the environment variables correctly.

regards,

rajesh


Java runtime 1.8.0.91 | Oracle EBS R12 (12.0.6)

May 2, 2016

Hi guys

You could run into a situation after the latest Java client runtime update, your R12 instance failing to load forms, complaining about the lower version of JRE. This is mainly due to the fact that, if your Windows OS is 64Bit, the latest java runtime update installs both 64Bit & 32Bit and most of the R12 environments run against 32Bit JRE.

Internet explorer (the only one browser that runs the JRE properly for EBS R12) loads the 64Bit java runtime by default from a 64Bit Windows OS & eventually the forms will fail to load.

At present the only possible solution to address this situation is to uninstall the 64bit version of java runtime, using “Programs and features” or “Add remove programs” based on the version of Windows you are using.

Hope this helps few out there :)

regards,

rajesh

 

 


R12 | Clone response file | adcfgclone automation

December 8, 2015

Hi guys

If you are familiar with R12 cloning, the entire process requires loads of input from a DBA before the cloning really starts kicking in. Now, there could be hundreds of reasons for the cloning process to fail and keeping on entering the responses for the cloning prompts are NOT at all fun, minimum for me.

So I started searching for “R12 clone response file” & google landed me in this post

https://community.oracle.com/thread/2142127?start=0&tstart=0

Excellent way Hussein Sawwan-Oracle has explained how to create the response files for both db, apps tier.

 

clone

First of all, context file to response file creation has a validation flag, which confirms the responses provided are valid throughout the response collection. This validate has a downside with the port pool selection. You will receive a port is not free error while the Oracle application is online, for which a system reboot is most recommended (rather than selecting “No” for the validation process”) after graceful shutdown of both application and database tiers.

I’m using .bash_profile files to source the environment for both my Oracle (oraprod) and Application Manager (applprod) accounts, hence I was able to shorten the efforts like following

As Oracle user (oraprod)

# cd $ORACLE_HOME/appsutil/clone/bin
# perl adclonectx.pl contextfile=$CONTEXT_FILE outfile=/u02/db.xml

Provided the responses and the db.xml was successfully created under /u02 and the context file creation log was created under /u02/log folder.

Please make sure you do “echo $CONTEXT_FILE” to check whether you $CONTEXT_FILE returns a meaningful file name!

As Application Manager user (applprod)

# cd $COMMON_TOP/clone/bin
# perl adclonectx.pl contextfile=$CONTEXT_FILE outfile=/u02/appl.xml

Now you should able to run the cloning processes using the newly cloned context files, for example

# perl adcfgclone.pl dbTier /u02/db.xml
# perl adcfgclone.pl appsTier /u02/appl.xml

That’s all folks, it works like a charm & you are NOT anymore typing in whole those lengthy paths and other variables :)

regards,

rajesh


RC-50004, AC-00005: No write permissions for creating the Context file – /tmp/temp.xml

December 8, 2015

Hi guys

Linux file/folder permissions could be very confusing for a beginner, minimum for me! After these many years of interacting with Linux I still get confused deciding what rights should be given to users or groups on certain folders :)

I came across a situation where the application tier cloning was continuously failing with the title error

RC-50004, AC-00005: No write permissions for creating the Context file – /tmp/temp.xml ?

I checked the for the /tmp folder permissions and realized the application user (applmgr/appltest) had proper right permissions on /tmp folder, yet the adcfgclone will not proceed after


Do you want to preserve the Display [erp-prod:0.0] (y/n) ? : n

Target System Display [erp-prodbak:0.0] :
RC-50004: Error occurred in CloneContext:
AC-00005: No write permissions for creating the Context file - /tmp/temp.xml
Raised by oracle.apps.ad.context.AppsContext
Check Clone Context logfile /u01/applprod/PROD/apps/apps_st/comn/clone/bin/CloneContext_1208121418.log for details.

After few attempts I came against another blog, that was explaining the situation in a different way. http://newgendba.blogspot.com/2009/08/how-to-quick-solve-this-post-clone.html

Blogger has suggested to check whether temp.xml created by another user exist in the /tmp folder, which was the actual reason in my case. I found temp.xml file created by “root” and deleted the same and cloning process just went all the way fine.

 

Hope this info helps few of those once in a bluemoon DBAs out there :)

 

regards,

rajesh

 


Oracle R12 Cloning | dbTier "ouicli.pl INSTE8_APPLY 1"

October 28, 2015

Hi guys

There could be thousands (exaggerated) reasons why a Oracle cloning process could go all bad. I’m not an application DBA, however, have enough experience with the architecture, technology as I interact with it everyday as a part of my job.

Few months back, I started doing something what a DBA should do, cloning. My prior attempts were mostly at home, using virtual machines and test instances and they were NOT as mission critical as what we do at work.

So, after the storage device was revamped with new partition structures I was asked to do a cloning for the production instance. Let me explain how the application was deployed prior the storage restructuring

  1. We had the database tier on mount point /u05
  2. Application on /u06 mount point

So, I recreated the same mount points and started the cloning process for dbTier and the process got terminated at 2% and the log files shown me an error that I was not familiar with.

“ouicli.pl INSTE8_APPLY 1”

Google searches fetched me hundreds of results for “ouicli.pl INSTE8_APPLY”, however the error codes were mostly for 255 or “-1” and apparently I didn’t have any clue what was going wrong.

So I unzipped the tar ball for database tier once again, and the cloning process got aborted at 2%,  and I was getting nervous as I was expected to make the instance online by early morning 7AM

Most of the reference materials were explaining about non-existent Oracle inventory locations, and I confirmed that it was not the case from my part (Obviously, I was overlooking at this constrain itself!)

After half a dozen times tasting failure, finally I tried to see what was written inside the oraInst.loc file

 

 
oraprod@erp-prod:/home/oraprod>cd $ORACLE_HOME 
oraprod@erp-prod:/u05/oraprod/PROD/db/tech_st/10.2.0>cat oraInst.loc 
inventory_loc=/u01/oraprod/PROD/db/tech_st/10.2.0/admin/oui/PROD_erp-prod/oraInventory 

and I realized that inventory location was wrongly pointing towards an non-existing mount point and physical location!

I modified the oraInst.loc content with the correct mount point

 
inventory_loc=/u05/oraprod/PROD/db/tech_st/10.2.0/admin/oui/PROD_erp-prod/oraInventory 

and the cloning process went ahead without giving another errors.

We had an instance that was running from last 6 years, which was only once cloned from a cold backup during the storage device change, and somehow the inventory location remain unchanged with the repositories.

I hope this finding could help few newbies like me out there

 

regards,

rajesh


Oracle Application TCA | Supplier API | Sample

October 8, 2015

Hi guys

I’m posting a sample script for creating suppliers, sites and contacts. I’ve referred multiple sample scripts and believe the below code block is a fine tuned one, however standing refinement at all levels. Please note, I haven’t added the API block for creating banks for suppliers. Will, and update the scripts as I make advancements.

/* Formatted on 10/5/2015 11:12:16 AM (QP5 v5.163.1008.3004) */
SET DEFINE OFF;
SET SERVEROUTPUT ON;

DECLARE
   --For supplier parameters

   p_api_version          NUMBER;
   p_init_msg_list        VARCHAR2 (200);
   p_commit               VARCHAR2 (200);
   p_validation_level     NUMBER;
   x_return_status        VARCHAR2 (200);
   x_msg_count            NUMBER;
   x_msg_data             VARCHAR2 (200);
   p_vendor_rec           apps.ap_vendor_pub_pkg.r_vendor_rec_type;
   x_vendor_id            NUMBER;
   x_party_id             NUMBER;
   V_MSG_INDEX_OUT        NUMBER;

   --Site parameters

   l_vendor_site_rec      ap_vendor_pub_pkg.r_vendor_site_rec_type;
   lc_return_status       VARCHAR2 (10);
   ln_msg_count           NUMBER;
   lc_msg_data            VARCHAR2 (1000);
   ln_vendor_site_id      NUMBER;
   ln_party_site_id       NUMBER;
   ln_location_id         NUMBER;


   --Contact parameters
   
   p_vendor_contact_rec   apps.ap_vendor_pub_pkg.r_vendor_contact_rec_type;
   x_vendor_contact_id    NUMBER;
   x_per_party_id         NUMBER;
   x_rel_party_id         NUMBER;
   x_rel_id               NUMBER;
   x_org_contact_id       NUMBER;
   x_party_site_id        NUMBER;


   --General exception

   local_exception        EXCEPTION;
   local_failed_at        VARCHAR2 (10);
   
     p_vendor_number VARCHAR2(30) := NULL;
     
     
BEGIN
--Please note: This API was tested against Release 12 (12.0.6)
--You are warned against undesired results, if tried against unsupported application releases

--Initialize application 
--"Master Data" responsibility details
   mo_global.init ('SQLAP');
   fnd_global.apps_initialize (user_id        => 1353,
                               resp_id        => 50997,
                               resp_appl_id   => 200);
   fnd_global.set_nls_context ('AMERICAN');


   mo_global.set_policy_context ('S', 101);
   
   

   p_api_version := 1.0;
   p_init_msg_list := FND_API.G_TRUE;
   p_commit := FND_API.G_TRUE;
   p_validation_level := FND_API.G_VALID_LEVEL_FULL;
   x_return_status := NULL;
   x_msg_count := NULL;
   x_msg_data := NULL;
   p_vendor_rec.vendor_name := 'WINDOWS7BUGS BLOG';
   p_vendor_rec.vendor_type_lookup_code := 'VENDOR'; --Vendor type supplier
   p_vendor_rec.SUMMARY_FLAG := 'N';
   p_vendor_rec.ENABLED_FLAG := 'Y';
--  p_vendor_rec.women_owned_flag := 'N';
--  p_vendor_rec.small_business_flag := 'Y';

-- Supplier MUST have a global level payment method
-- So that individual companies can defer the default payment method while sites are created
-- I have tried the following @ site levels, didn't work until at supplier level assigned. You may post corrections with
-- Comments section

   p_vendor_rec.ext_payee_rec.Exclusive_Pay_Flag:='N';  
   p_vendor_rec.ext_payee_rec.default_pmt_method := 'CHECK'; 

-- if the Payable System setup is set automatic numbering for the suppliers  (table ->AP_PRODUCT_SETUP Column -> SUPPLIER_NUMBERING_METHOD = 'AUTOMATIC')
-- You can get the next number from column NEXT_AUTO_SUPPLIER_NUM
-- if you are following manual numbering (Alpha Numeric ) 
-- p_vendor_rec.segment1 :='865'; --(insert non duplicate number, in case if the supplier numbers are not fetched from a sequence, check your setups)
 
-- We do have an automatic numbering for suppliers, hence the below block is used
-- If your setups are not as explained above
-- Comment from BEING until   p_vendor_rec.segment1 := p_vendor_number;
   
   BEGIN
   Select NEXT_AUTO_SUPPLIER_NUM into p_vendor_number from AP_PRODUCT_SETUP
   where SUPPLIER_NUMBERING_METHOD= 'AUTOMATIC';
   EXCEPTION
   WHEN NO_DATA_FOUND then
   local_failed_at := 'NUMBER';
   RAISE local_exception;
   END;
   
   p_vendor_rec.segment1 := p_vendor_number;
   
   
   
   x_vendor_id := NULL;
   x_party_id := NULL;
   apps.ap_vendor_pub_pkg.create_vendor (p_api_version,
                                         p_init_msg_list,
                                         p_commit,
                                         p_validation_level,
                                         x_return_status,
                                         x_msg_count,
                                         x_msg_data,
                                         p_vendor_rec,
                                         x_vendor_id,
                                         x_party_id);
   DBMS_OUTPUT.put_line ('X_RETURN_STATUS = ' || x_return_status);
   DBMS_OUTPUT.put_line ('X_MSG_COUNT = ' || TO_CHAR (x_msg_count));
   DBMS_OUTPUT.put_line ('X_MSG_DATA = ' || x_msg_data);
   DBMS_OUTPUT.put_line ('Supplier Number = ' || p_vendor_number);
   DBMS_OUTPUT.put_line ('X_VENDOR_ID = ' || TO_CHAR (x_vendor_id));
   DBMS_OUTPUT.put_line ('X_PARTY_ID = ' || TO_CHAR (x_party_id));
   DBMS_OUTPUT.put_line ('');


   IF x_return_status <> 'S'
   THEN
      IF x_msg_count > 0
      THEN
         FOR v_index IN 1 .. x_msg_count
         LOOP
            fnd_msg_pub.get (p_msg_index       => v_index,
                             p_encoded         => 'F',
                             p_data            => x_msg_data,
                             p_msg_index_out   => v_msg_index_out);
            x_msg_data := SUBSTR (x_msg_data, 1, 200);
            DBMS_OUTPUT.put_line (x_msg_data);
         END LOOP;
      END IF;

      local_failed_at := 'SUPPLIER';
      RAISE local_exception;
   END IF;

   --Create Site
   l_vendor_site_rec.vendor_id := x_vendor_id;                     -- 1117549;
   l_vendor_site_rec.vendor_site_code := 'Kuwait';
   l_vendor_site_rec.address_line1 := 'Office Address line 1';
   l_vendor_site_rec.city := 'Kuwait';
   l_vendor_site_rec.country := 'KW';
   l_vendor_site_rec.org_id := 101;

   l_vendor_site_rec.ext_payee_rec.default_pmt_method := 'CHECK';

   -- --------------
   -- Optional
   -- --------------
   l_vendor_site_rec.purchasing_site_flag := 'Y';
   l_vendor_site_rec.pay_site_flag := 'Y';
   l_vendor_site_rec.rfq_only_site_flag := 'N';


   pos_vendor_pub_pkg.create_vendor_site (
      -- ------------------------------
      -- Input data elements
      -- ------------------------------
      p_vendor_site_rec   => l_vendor_site_rec,
      -- ---------------------------------
      -- Output data elements
      -- ---------------------------------
      x_return_status     => lc_return_status,
      x_msg_count         => ln_msg_count,
      x_msg_data          => lc_msg_data,
      x_vendor_site_id    => ln_vendor_site_id,
      x_party_site_id     => ln_party_site_id,
      x_location_id       => ln_location_id);

   IF (lc_return_status <> 'S')
   THEN
      IF ln_msg_count > 1
      THEN
         FOR i IN 1 .. ln_msg_count
         LOOP
            DBMS_OUTPUT.put_line (
               SUBSTR (FND_MSG_PUB.Get (p_encoded => FND_API.G_FALSE), 1, 255));
         END LOOP;
      END IF;

      local_failed_at := 'SITE';
      RAISE local_exception;
   ELSE
      DBMS_OUTPUT.put_line ('Vendor Site Id: ' || ln_vendor_site_id);
      DBMS_OUTPUT.put_line ('Party Site Id: ' || ln_party_site_id);
      DBMS_OUTPUT.put_line ('Location Id: ' || ln_location_id);
   END IF;

   --Create Contact

   p_api_version := 1.0;
   p_init_msg_list := 'T';
   p_commit := 'T';
   p_validation_level := FND_API.G_VALID_LEVEL_FULL;
   x_return_status := NULL;
   x_msg_count := NULL;
   x_msg_data := NULL;
   
   --  p_vendor_contact_rec.vendor_contact_id := po_vendor_contacts_s.NEXTVAL;
   --  DBMS_OUTPUT.put_line ('po_vendor_contacts_s.NEXTVAL = ' || po_vendor_contacts_s.NEXTVAL);
   
  -- P_VENDOR_CONTACT_REC.vendor_site_id := ln_vendor_site_id;  --OPTIONAL  If you want to attach the contact to a particular site         
   P_VENDOR_CONTACT_REC.PERSON_FIRST_NAME := 'windows7bugs';
   P_VENDOR_CONTACT_REC.PERSON_LAST_NAME := 'blog'; -- Mandatory
   P_VENDOR_CONTACT_REC.PHONE := '22445566';
   P_VENDOR_CONTACT_REC.EMAIL_ADDRESS := 'admin@nocom.com.kw';
   P_VENDOR_CONTACT_REC.URL := 'https://windows7bugs.wordpress.com';
   P_VENDOR_CONTACT_REC.org_id := 101; -- Security Organization Id
   p_vendor_contact_rec.party_site_id := ln_party_site_id;  
--  p_vendor_contact_rec.org_party_site_id := 2273595; --optional, system autofills the column with party_site_id used
   p_vendor_contact_rec.VENDOR_ID := x_vendor_id;                  
   p_vendor_contact_rec.prefix := 'MR.';
   x_vendor_contact_id := NULL;
   x_per_party_id := NULL;
   x_rel_party_id := NULL;
   x_rel_id := NULL;
   x_org_contact_id := NULL;
   x_party_site_id := NULL;
   apps.ap_vendor_pub_pkg.create_vendor_contact (p_api_version,
                                                 p_init_msg_list,
                                                 p_commit,
                                                 p_validation_level,
                                                 x_return_status,
                                                 x_msg_count,
                                                 x_msg_data,
                                                 p_vendor_contact_rec,
                                                 x_vendor_contact_id,
                                                 x_per_party_id,
                                                 x_rel_party_id,
                                                 x_rel_id,
                                                 x_org_contact_id,
                                                 x_party_site_id);

   IF x_return_status <> 'S'
   THEN
      IF x_msg_count > 0
      THEN
         FOR v_index IN 1 .. x_msg_count
         LOOP
            fnd_msg_pub.get (p_msg_index       => v_index,
                             p_encoded         => 'F',
                             p_data            => x_msg_data,
                             p_msg_index_out   => v_msg_index_out);
            x_msg_data := SUBSTR (x_msg_data, 1, 200);
            DBMS_OUTPUT.put_line (x_msg_data);
         END LOOP;
      END IF;

      local_failed_at := 'CONTACT';
      RAISE local_exception;
   ELSE
      DBMS_OUTPUT.put_line ('X_RETURN_STATUS = ' || x_return_status);
      DBMS_OUTPUT.put_line ('X_MSG_COUNT = ' || TO_CHAR (x_msg_count));
      DBMS_OUTPUT.put_line ('X_MSG_DATA = ' || x_msg_data);
      DBMS_OUTPUT.put_line (
         'X_VENDOR_CONTACT_ID = ' || TO_CHAR (x_vendor_contact_id));
      DBMS_OUTPUT.put_line ('X_PER_PARTY_ID = ' || TO_CHAR (x_per_party_id));
      DBMS_OUTPUT.put_line ('X_REL_PARTY_ID = ' || TO_CHAR (x_rel_party_id));
      DBMS_OUTPUT.put_line ('X_REL_ID = ' || TO_CHAR (x_rel_id));
      DBMS_OUTPUT.put_line (
         'X_ORG_CONTACT_ID = ' || TO_CHAR (x_org_contact_id));
      DBMS_OUTPUT.put_line (
         'X_PARTY_SITE_ID = ' || TO_CHAR (x_party_site_id));
      DBMS_OUTPUT.put_line ('');
   END IF;
   
   COMMIT;
   
EXCEPTION
   WHEN local_exception
   THEN
      IF local_failed_at = 'SUPPLIER'
      THEN
         DBMS_OUTPUT.put_line ('API failed at Supplier Creation');
      ELSIF local_failed_at = 'SITE'
      THEN
         DBMS_OUTPUT.put_line ('API failed at Site Creation');
      ELSIF local_failed_at = 'CONTACT'
      THEN
         DBMS_OUTPUT.put_line ('API failed at Contact Creation');
         ELSIF local_failed_at = 'NUMBER'
      THEN
         DBMS_OUTPUT.put_line ('API failed at getting Supplier Number');
      END IF;
      
      ROLLBACK;
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.PUT_LINE (SQLERRM);
      ROLLBACK;
END;

You can download the .sql file from here

Please post your comments, if you come across issues.

regards,


VirtualBox | SATA vs SCSI

July 14, 2015

Recently I tried to build a cloned instance of our production instance over VirtualBox for some emergency issues faced by our inventory module. As this instance was supposed to be only accessed by me, I opted to use my desktop machine for the same. Throughout the last many years I built my own machines, choosing the best available hardware at the time of building them. My current desktop configuration is like following

i7 processor, 16GB memory, 2x1TB 7200 RPM HDD, 2x2TB 5200 RPM HDD, 1x500GB HDD for the OS (Windows 8.1 64Bit)

and throughout the years I built dozens of Virtual Machines using Oracle VirtualBox, mainly for testing un-certified Oracle & other products in a sand-boxed environment, against the crippled VMplayer, VirtualBox’s unrestricted interface supported almost everything I needed from a virtual environment.

So I built my R12 instance, that is around 600GB roughly in size with almost 4.5-5 years of business data, media etc. The following resources were dedicated for the fresh VM

  • 4 processors
  • 10GB memory
  • 40GB fixed size SATA VDI for the Operating System (I used both OEL 5 & OEL 7 64bit)
  • 1.2TB fixed size SATA VDI for the instance files
  • A dedicated D-Link 10/100MB NIC

Once the instance came online, I removed, cancelled all the scheduled concurrent programs, changed the database level parameters like job_queue_processes etc, however the lag experienced throughout the access attempts remained the same. Sometimes the HTML pages took 5-6 minutes to open, forms based modules took 8-10 minutes to open and timeouts were happening, frustrating me to the most possible levels

That is when I decided to give VMPlayer a try, I converted the existing VDI for the OS as vmdk and created a fresh 850 fixed size vmdk for the instance files and attached the same as SCSI to the VM. Did the complete clone process and to my utter surprise, the login page loaded within a minutes once after the instance was started!

This lead me to do various attempts with the fresh instance, I was able to shutdown the instance much faster, forms were opening faster, though LOVs having more than thousands of items were taking more time than anticipated

Once again, I created another fresh VM with VirtualBox and attached the disks created for VMplayer with it and repeated the tests. Well, I got the same performances from the new VM and somehow I came to a conclusion that, both VirtualBox and VMPlayer provide better I/O for SCSI interfaces compared to plain SATA emulators, ironically, the disks were created over SATA drives!

This difference you may not experience with VMs those are not hosting resource hungry applications like Oracle E-Business Suite. So, if you are attempting what I had described above and notice the differences, please update me with comments section.

 

regards,

 

rajesh