Oracle Applications (EBS R12) Site level Tax Profile API

No, there are no documented APIs are available for this requirement, or that is what claimed by Oracle community MOSC support on different discussions. So what happens when the country where you live and work decides to implement Tax (example, Middle East countries) and you were using Oracle applications(EBS) over a decade already without Tax setup? Are you going to open up each and every other customer/supplier account and setup the Tax profile? We are using Multi-organization structure and we have 8 companies under the same business group. We’ve 13,000 unique parties in our database and most of them are linked to all these organizations! It didn’t look good for us, I am sure it doesn’t look good for anyone else either!

Then I came across a poorly constructed sample for an API “zx_registrations_pkg.insert_row” that is “not well documented” by Oracle. This means, Oracle doesn’t categorize this API as public & they will not support the customer if something goes wrong while using this API. Hence, make sure that you are going to use an API that could turn stuffs into a nightmare.

Let’s see how to use this API now. Some technical details for better understanding where to look for some mandatory elements. Every time a new site created for customer or supplier, the TAX profile table (ZX_PARTY_TAX_PROFILE) is inserted with a new row, bearing the PARTY_ID column populated with newly created Site’s id (PARTY_SITE_ID) value. Given example below, I am setting up Tax profiles for customers and suppliers that were created for a new organization bearing organization id “285”

For the purpose, I created a new view comprise of both customer and supplier sites details. Please judge me because I am using “A” and “B” for aliases ;)

CREATE VIEW XXKCC_VAT_TABLE_V AS SELECT
hcas.org_id, ac.customer_id party_id, ac.customer_number party_number, ac.customer_name party_name,ac.customer_type party_type, hcas.party_site_id, 'CUSTOMER' as party_classification
FROM
hz_cust_acct_sites_all hcas
inner join ar_customers ac on ac.customer_id= hcas.cust_account_id
where
1=1
and hcas.status='A'
AND ac.status ='A'
AND NVL(ac.customer_type,'R') ='R'--Account type is empty for maximum bahrain customers
AND hcas.org_id=285
UNION ALL
select b.org_id, b.vendor_id party_id, A.segment1 party_number, a.vendor_name,NULL party_type, b.party_site_id, 'SUPPLIER' as party_classification
from AP_SUPPLIERS A
inner join AP_SUPPLIER_SITES_ALL B ON B.VENDOR_ID = A.VENDOR_ID
where B.ORG_ID = 285
/

I am using two different staging tables with VAT/TRN numbers & aliased as “B” in the following PL/SQL blocks. I executed the same script twice, once for customer and other time for supplier. Please note, I have hard coded many parameters, including TAX_AUTHORITY_ID. Make sure that you change such information to suit your environment. Although, we applied this solution to PRODUCTION, I would recommend everyone to practice caution, make backups.

DECLARE
CURSOR CUSTOMER_RECORD IS
SELECT B.VAT_TRN_NUMBER vat_registration_num,'VAT' REGISTRATION_TYPE_CODE, 'UP' ROUNDING_RULE_CODE,'TAX BH JURISDICTION' TAX_JURISDICTION_CODE,
'REGISTERED' REGISTRATION_STATUS_CODE, 'TAX BAHRAIN' TAX, 'TAX REGIME BAHRAIN' TAX_REGIME_CODE,5379228 TAX_AUTHORITY_ID,'N' SELF_ASSESS_FLAG,'IMPLICIT' REGISTRATION_SOURCE_CODE,
'N' INCLUSIVE_TAX_FLAG,'USER_DEFINED' RECORD_TYPE_CODE,
A.* FROM XXKCC_VAT_TABLE_V A
INNER JOIN XX_BAH_CUSTOMER_T B ON B.ERP_CUSTOMER_ID = A.PARTY_ID
WHERE
1=1
AND A.PARTY_CLASSIFICATION='CUSTOMER'
AND B.VAT_TRN_NUMBER IS NOT NULL;
--AND A.PARTY_SITE_ID=3702712;
g_return_status varchar2(1);
l_party_tax_profile_id NUMBER;
BEGIN
for i in CUSTOMER_RECORD loop
BEGIN
Select PARTY_TAX_PROFILE_ID into l_party_tax_profile_id from
ZX_PARTY_TAX_PROFILE
where party_id = i.party_site_id;
EXCEPTION
when no_data_found then
l_party_tax_profile_id:=NULL;
END;
IF l_party_tax_profile_id IS NOT NULL THEN
zx_registrations_pkg.insert_row(
p_request_id => NULL
,p_attribute1 => NULL
,p_attribute2 => NULL
,p_attribute3 => NULL
,p_attribute4 => NULL
,p_attribute5 => NULL
,p_attribute6 => NULL
,p_rounding_rule_code => i.ROUNDING_RULE_CODE
,p_validation_rule => NULL
,p_tax_jurisdiction_code => i.TAX_JURISDICTION_CODE
,p_self_assess_flag => i.SELF_ASSESS_FLAG
,p_registration_status_code => i.REGISTRATION_STATUS_CODE
,p_registration_source_code => i.REGISTRATION_SOURCE_CODE
,p_registration_reason_code => NULL
,p_tax => i.TAX
,p_tax_regime_code => i.TAX_REGIME_CODE
,p_inclusive_tax_flag => i.INCLUSIVE_TAX_FLAG
,p_effective_from => SYSDATE
,p_effective_to => NULL
,p_rep_party_tax_name => NULL
,p_default_registration_flag => NULL
,p_bank_account_num => NULL
,p_record_type_code => i.RECORD_TYPE_CODE
,p_legal_location_id => NULL
,p_tax_authority_id => i.TAX_AUTHORITY_ID
,p_rep_tax_authority_id => NULL
,p_coll_tax_authority_id => NULL
,p_registration_type_code => i.REGISTRATION_TYPE_CODE
,p_registration_number => i.vat_registration_num
,p_party_tax_profile_id => l_party_tax_profile_id
,p_legal_registration_id => NULL
,p_bank_id => NULL
,p_bank_branch_id => NULL
,p_account_site_id => NULL
,p_attribute14 => NULL
,p_attribute15 => NULL
,p_attribute_category => NULL
,p_program_login_id => NULL
,p_account_id => NULL
,p_tax_classification_code => NULL
,p_attribute7 => NULL
,p_attribute8 => NULL
,p_attribute9 => NULL
,p_attribute10 => NULL
,p_attribute11 => NULL
,p_attribute12 => NULL
,p_attribute13 => NULL
,x_return_status => g_return_status
);
END IF;
DBMS_OUTPUT.PUT_LINE(i.PARTY_NUMBER||', '||i.party_name||' Process status : '||g_return_status);
--"S" for success, any other means trouble ;)
END loop;
--COMMIT;
END;
/

That’s all folks. Have questions? Use the comments section to let me know.

Windows | OPatch failed with error code = 73

Few times I mentioned in my posts that I have many Oracle products installed on my laptop/PCs. Such setup could cause unexpected hurdles while trying to deal with specific requirements & I had such one last time while trying to apply a bundle patch on Oracle database 19c.

D:\Oracle_Installers\Patch21\p35681552_190000_MSWIN-x86-64\35681552>d:\oracle19c\OPatch\opatch.bat apply
Oracle Interim Patch Installer version 12.2.0.1.40
Copyright (c) 2023, Oracle Corporation. All rights reserved.


Oracle Home : d:\Oracle19c
Central Inventory : C:\Program Files (x86)\Oracle\Inventory
from :
OPatch version : 12.2.0.1.40
OUI version : 12.2.0.7.0
Log file location : d:\Oracle19c\cfgtoollogs\opatch\opatch2023-12-19_09-49-12AM_1.log

List of Homes on this system:

Home name= OracleWorkFlow, Location= "D:\OracleWorflow_1"
Home name= DevSuiteHome1, Location= "D:\DevSuiteHome_1"
Home name= OracleHome1, Location= "D:\Weblogic\Middleware\Oracle_Home"
Home name= OraClient19Home1_32bit, Location= "D:\oracle\product\19.0.0\client_1"
OPatchSession cannot load inventory for the given Oracle Home d:\Oracle19c. Possible causes are:
No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory

UtilSession failed: RawInventory gets null OracleHomeInfo
Log file location: d:\Oracle19c\cfgtoollogs\opatch\opatch2023-12-19_09-49-12AM_1.log

OPatch failed with error code = 73

As I have many Oracle products installed, I adjust the PATH environment variable based on the current requirement usually without setting up ORACLE_HOME or ORACLE_SID. Most of the times this setup works, few other times I must restart the laptop/PC to achieve the desired results.

I rushed to check the inventory entry for the Oracle database home & some unknown reasons, I couldn’t find an entry, leaving me with no options other than recreating it.

<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2023, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>12.2.0.7.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OracleWorkFlow" LOC="D:\OracleWorflow_1" TYPE="O" IDX="3"/>
<HOME NAME="DevSuiteHome1" LOC="D:\DevSuiteHome_1" TYPE="O" IDX="1"/>
<HOME NAME="OracleHome1" LOC="D:\Weblogic\Middleware\Oracle_Home" TYPE="O" IDX="4"/>
<HOME NAME="OraClient19Home1_32bit" LOC="D:\oracle\product\19.0.0\client_1" TYPE="O" IDX="5"/>
<HOME NAME="oracleas1" LOC="D:\OraHome_1" TYPE="O" IDX="2" REMOVED="T"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

To recreate the inventory entry, we need to know both ORACLE_HOME and ORACLE_HOME_NAME entry values. On Windows, it is pretty easy to get them from the Windows registry.

With these details in hand, we can see how to recreate the entry for database using the suggested methods. I will not mind a manual entry in the file for another round experiments though ;)

Move to $ORACLE_HOME\oui\bin folder from an elevated command prompt and execute the following. (Make sure you change the ORACLE_HOME and ORACLE_HOME_NAME based on your setup!)

setup.exe -silent -attachHome ORACLE_HOME=D:\Oracle19c ORACLE_HOME_NAME=OraDB19Home1

This should create a new entry in the inventory file & one could continue with the patching or other intended activity that involves the inventory from here onward.

Oracle Indexes | the way of my understanding

To be quite frank, when it comes to Oracle Indexes and Joins I am as good as with Oracle Analytical functions. Much fly above my head & every time I have to go back to my notes to “learn” for the tasks in hand!

Recently, I took some interests in understanding the “index usage” once after reading about V$OBJECT_USAGE & realized to my shock that more than 50% of my indexes were never used! I wanted to know why & I kept reading for days without finding much that felt like a true answer.

Hence I made a decision to understand how the indexes work by example. Our Oracle EBS environment has more than half dozen custom applications integrated and few of them are with millions of rows, sufficing “large” table requirements to test the effectiveness of indexing. From the layman perspectives, please note, I am not an Indexing expert, I can’t explain why your Indexes are not being used “even after following everything step by step”. For me, what I did work, giving me an understanding about how should I plan my next Indexes. So let us see how I came to my understandings

We’ve bio-metric devices that are used for attendances purposes. These devices offload the data to a Microsoft SQL database instance and using transactional SQL, we register them with our Oracle database. The technical part of it. The table that stores the fingerprints has 2.3 Million rows as on date and I used the same table to understand how the indexing works.

There was one Index on this table (Yes, I created it), that I dropped before experimenting as the Index was never used! The logic behind the query is:

I should get the first punch in time for the employee, identified by type “0” and last punch out for the employee, identified by type “1”, the machine name on which the employee has registered in and out punches. Each employee might use the bio-metric devices at different locations for door accesses or other purposes like a proof of visiting another office. Without the Index on this table, let us see how Oracle plans the execution.

This table has just few columns and sought data is usually the punch time against the employee.

Regardless, the cost for the execution didn’t look appealing. So, I created an Index that has all the four columns referred in the main and inline queries.

This time the cost looked far better, however, I could see that the base table still being used when there were no additional columns from the base table referred.

Here comes the thumb rule for indexes (I think). Indexes are not used unless a condition is used against one of the indexed columns! Let us see, whether this makes any sense.

I created a view against the above query to be more certain.

After creating the view, I did a simple select * against the view and the execution plan brought me the same results discussed above. Wherever the predicates were used, query used the existing Index and for the rest, did the base table scan.

So I went ahead against my “understanding” and added a condition to Select * from query and did another Explain plan.

This time, the cardinality, ie the total number of rows fetched came down to just a four digit number, base table was not referred and the cost was dirt cheap compared to the earlier situations.

Let’s summarize everything now.

  1. Indexes are mostly effective about large tables
  2. Oracle will use indexes only when one of the columns used in the index is used against a predicate. Said, I created a view against our dear Scott.Emp table and “Select * from emp;” used that index. I don’t know why and I don’t care!
  3. Add up IS NOT NULL against all your index columns in your query to make sure that your Index is used instead of base table.

Now, I needed to understand further. Hence, I went back to the HR sample schema and chose the table “Employees” this time for my continued experiments. As I said Scott.Emp, the results were the same.

HR.EMPLOYEES tables have many Indexes defined.

For the first query as seen with the image below, I didn’t include a predicate. Regardless, Oracle used the Index for the column

Then I tried another query with multiple columns and without predicate. Oracle used the Index this time as well.

Apparently, this gives me an idea like, for larger tables the Indexes are opted when predicates are available against indexed columns and for tables like HR.EMPLOYEES which has only 107 rows, if there is an index exist against the queried column exist, it is used by Oracle.

Cheers friends, it was fun learning something, once again my own way. Hope this helps few others out there who were breaking their heads to understand this horrible thing. Merry Christmas and a very Happy New Year to everyone out there.

Oracle EBS R12 Vision Instance

Did you ever wish for having your own copy of Oracle EBS R12? Well, Oracle provides a copy that is all yours called VISION instance. The below post is one of the best I came across, explaining how to setup your own VISION instance on Oracle VirtualBox

I hope, it was an easy ride. Oracle’s virtual appliance is perfectly sized for moderate hardware, without GUI out of the box. We’ll see how to install GUI, configure the appliance for network access etcetera in this post.

Basically you get Oracle Linux 7.9 OS, EBS R12 12.2.10 with Oracle database 19.9 in this appliance. You must update the OS to latest before installing GUI. So, let us setup the environment for the update now.

Stop the running application and database instances.

su - oracle
cd /u01/install/APPS/scripts
./stopapps.sh
./stopdb.sh

Oracle has the appliance set to start the database and application instances automatically during every reboot. I strongly suggest you to disable the automatic start of these instances. Oracle starts “ebscdb” and “apps” services every time when the box restarts. We can disable these services using chkconfig command

chkconfig apps off
chkconfig ebscdb off

That’s it. Now, when you restart the box, Oracle services will not start automatically.

Shutdown the server. Change the network configuration for the sever like seen in the below image.

This means, your server will start sharing the host’s active connection(s). If your host machine has an active internet connection, your EBS server will able to access internet this way from it’s environment.

Start the EBS server and complete the OS update. This should be around 2.2GB total downloads and minimum 30-40 minutes, depending upon the hardware resources you have allocated for the virtual machine.

Once the box is update, proceed with “Server with GUI” group installation.

yum groupinstall "Server with GUI"

Restart the server after GUI installed. You can temporarily switch to graphical run level by issuing the command

systemctl isolate graphical.target

and to make the graphical interface as default, issue the below command as root

systemctl set-default graphical.target

Please note, your box doesn’t have VirtualBox extensions yet, which is a MUST for proper mouse integration and more. Prior installing the VirtualBox extensions, make sure to install kernel devel package. Issue the following command

yum install kernel-uek-devel

Additionally install the packages gcc, make & perl (pre-installed usually)

yum install gcc make perl -y

Reboot the server & install the VirtualBox extensions.

If you remember, we changed the network settings earlier for the update & if you try to start the database and application, this may not work. Depending upon how you want to access the VISION instance, you have to configure additional networking now. I suggest to leave the NAT configuration as it is and to configure an additional Network adapter for the intended connectivity.

For example, if you want to share the VISION instance with your teammates within a Class C network, do the following.

Use “Bridged Adapter” & select the adaptor that is connected to the network under “Name”. Recent computers have multiple network and WiFi adapters & selecting the correct adapter is very important for client connectivity. Make sure to setup “Promiscous Mode” to “Allow All”.

Find one free IP address and set up the same for your EBS VISION box. You will have to setup this information at multiple places.

For example, change the hosts file (most important)

Network settings. My box have NAT as first Network Adapter and Host Only network as 2nd Network Adapter. Hence my configurations are like below

For the NAT (Connection #1) I have the following setup

and for the Host Only network (Connection #2)

By having the NAT as first adapter, my box is able to connect to internet, shared from the host and my host can access the EBS instance from the virtual machine using the host only network.

That’s all folks.

Oracle workflow builder can’t load (or register) custom control wfnvg20.ocx

Oracle workflow developer for Oracle Applications (EBS) R12 version 2.6.3.x has total 33k downloads. That gives us an idea how scarcely this software is used. Oracle sucks at one place the most, that is fixing their legacy software for new operating systems. For example, Oracle EBS R12 release 12.2 is expected to be supported until 2031, while the development tools for the same were supported till Windows XP OS. Then once in a while they boast about releasing another version of legacy tool, expected to work on later operating systems.

Oracle Workflow builder is not different. Their documentation misses one of the vital point about why one should install the software in a brand new Oracle home! Yes, if you have multiple Oracle products already installed on your computer, Workflow builder installer will pickup the first Oracle home it could read from the Windows registry and default it for the installation, which is the core of all problems you will face while & after the installation.

So, let us do a proper installation of Oracle workflow builder 2.6.3 this time.

Download the installer, which might need a valid Oracle support (Please note, this particular post might only satisfy this particular version of Oracle workflow builder). Extract the archive, go to Disk1 folder and change the property of Setup.exe as seen in the below image.

Setup the compatibility and Running this program as administrator are mandatory for a successful installation.

Now, before starting the software installation, take a backup of your PATH environment variable. Please read my other post explaining how to make a backup for the PATH and later restoring it after the Workflow builder installation.

This is not mandatory, however advisable based on the number of software that you have already installed on your computer.

Once the setup starts make sure you will setup a fresh home for “Workflow builder”

If you made a correct decision for a fresh home, then installation must complete without issues. Please check the below images for additional details. If you try to install the workflow builder in one of the existing Oracle homes, you will comes across installation error(s)

If you ignored the errors and continued with the installation, you will not be presented with net configuration wizard or other post installation steps & you will not able to start Workflow builder, throwing a run-time error.

Leave the prompts to their defaults unless necessary.

At the last phase of the installation, Net configuration assistant starts.

Well, there is no guarantee that the network configuration setup will complete successfully. My development machine has many Oracle products installed and has multiple JAVA runtimes, I think that should be one of the reasons why the configuration tool always failed to complete the setup successfully. Your case may differ.

Please note, you can Oracle XML Gateway Message Designer is also a part of the installation package, you can proceed to install the product if you want at this stage.

Once the installation(s) over, open Oracle Workflow Builder as administrator always, without which the software cannot read Windows Registry keys.

That’s all. Please note, you are installing a software that was made for Windows XP and hardly received much love from Oracle afterwards. Oracle is keeping it only to support legacy software like Oracle E-Business Suite, which Oracle dearly wants to the pull the plugs off, so that they could force the half cooked cloud based Fusion software & squeeze the customers further through subscriptions. Hence don’t expect Oracle fixing these installation ever, EVER!

Oracle Application R12 12.2 one user cannot logon

Updated on: 28th Feb 2023

Our previous solution to fix “one user cannot” logon was doomed by additional issues sooner than expected. We had to regenerate the jar files using ADADMIN finally to close the issue.

===

We are using Oracle EBS R12 for last 12 years and recently upgraded to 12.2.10. We hardly had much technical issues with the instance until recent days, then came a real annoyance.

One particular user was unable to logon. Instead of OA_HTML page, he was either getting redirected to logout page or the OA_HTML page keeps on trying to load. One of the workarounds we came across was, resetting his password. Once the password changed, he was taken to setup password page and to regular landing page. Well, this also turned into troublesome as each time his session expired, we were forced to reset his password.

So what went wrong? We had an issue with concurrent manager outputs and logs opening into a blank page recently. This happened after RMAN backup up, that is scheduled and we had to run autoconfig to fix this issue. Although autoconfig fixed that issue, opened issues with user logon, as explained above. We kept on watching the alerts for possible errors and there were none. Anyhow, we decided to do the following as the ONLY one relevant document we were able to find on Oracle support was “Unable To Login With One User On Oracle EBS Application (Doc ID 2480008.1)” and the case described was not our case.

This is what finally worked:

  • Cleared global cache (didn’t fix issues)
  • Shutdown Apps tier
  • Ran autoconfig on database Tier
  • Ran autoconfig on both Run and Patch file systems
  • Restarted Apps tier and the issues were resolved

We really don’t know what happened after the RMAN & we didn’t update/altered the OS (Oracle Linux 7). Well, things could go south once in a while, after all Oracle EBS is such a huge and complex repository!

Windows | “ORA-12640-Authentication adapter initialization failed.”

Recently at a gathering I was asked about my job. I told a group of young chaps that I work with Oracle EBS and my primary role is developing extensions using Oracle Forms & Reports. Interestingly, none of them knew anything about Oracle Forms & Reports.

Couple of days back I installed Oracle 11G R2 database once “again” as I had to open our legacy software for some historical data access. Then I had to develop a report and to my utter surprise, found Oracle 10g report developer will not connect to 11G database, generating the following errors:

REP-0501: Unable to connect to the specified database.
ORA-12640: Authentication adapter initialization failed

I hurried to check the database sqlnet.ora file and found the authentication set as NTS (Windows default for Oracle products) & interestingly Developer 6i products were connecting to the database without any issues. This helped me to confirm that issues were from Developer 10g side & I changed the sqlnet.ora settings for the Developer 10g Suite.

from NTS to NONE did the trick.

I don’t know how my people are ever going to land on this page! Trust me, I haven’t seen an interesting question about Oracle Forms/Reports in any of the Oracle support forums from last many years. I will be pretty sad to see such a wonderful product that was built for developing Business applications on the go being ignored for some crappy browser based gimmicks.

Happy Diwali guys 🙏

Install Oracle 21c database on Windows

If you have already installed Oracle 19c following instructions available here, installing Oracle database 21c is not much different. Basically 21c is “Innovation Release” & 19c is going to be the long supported version as on date. It plainly means, there is no need to hurry to upgrade your 19c to 21c as next release will be the next long supported version.

Let us see how to install Oracle 21c on Windows (Installed on Windows 10 21H1) & the instructions are same for Windows 11 also.

You can download the 21c Windows installation media from Oracle Database 21c Download for Microsoft Windows x64

Extract the .zip and change the root folder to something like “Oracle12c” (or a name that prefer. Please avoid using spaces with the folder name, example: “Oracle 21c”)

I used a virtual machine with single drive, hence the zip file was extracted and I renamed the extracted folder root to “Oracle21c”

Once the folder is renamed to your choice, open the folder and execute the “setup.exe” as administrator. Please note, you must start the setup as administrator, regardless whether your Windows user account has administrator privileges on the system.

This will kick start the installation process and depending upon the resources available it could take minutes before the installation GUI appears for you.

Choose “Server class” regardless whether you are installing it on a Server OS or client OS. It’s all about managing the resources.

Now, this is a very interesting perspective. “The software directory is the Oracle Database home directory” & the path that you will mention in the edit box is going to be the Oracle base. I hope, now you understood why renaming the media extracted folder to a very meaningful name is important. As usual Oracle suggests you the defaults, however I recommend you to follow a pattern that you can feel comfortable with.

As you could see, the default installation sets up one pdb. You may rename the default PDB at this level.

Here I left everything to defaults as my intentions were pretty limited to installation. Unless you have a reason to set up Automatic Memory management, go ahead with the well trusted manual management, that gives you granular level control on how the memory is utilized by the database.

You can change the database character set to another from the “Choose from the following list of character sets” (Specifically for Arabic and other left to right languages)

You may choose a different location for the database data files. Just make sure that the current user has full access to the path.

Use the same password for a TEST installation & follow the Oracle recommendations for PRODUCTION environments. Please note, it’s better to use the complex passwords with expiry disabled for the default profile.

That’s all folks. It’s not like the earlier times when one had to hack the installation files to install Oracle database on newer Windows OS. Starting from 11g, Oracle database gets installed on Windows 7 and later OS without complaining as long as the OS is fully patched with updates and .NET components.

Hope this post helps few newbies (& me)

Oracle “directory” object | OS level permissions

We are using Oracle EBS R12 and for a custom module, wanted to log the Oracle seeded API outputs to custom log files for later scrutiny & error corrections.

Following the standard procedure, create the folder like below

create or replace directory OMS_LOGS as '/u01/applmgr/oms_logs'

and started testing the directory using SQL Developer where I am logged in as APPS user

I kept getting the below errors

ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at line 8

and the detailed errors said this could be due to OS level access permissions. Luckily I landed on a stackoverflow discussion & one of the answers clearly said this error “could” be due to the file/folder permissions for user “oracle”.

As “root” I changed the permissions for the path “/u01/applmgr/oms_logs” like below

chmod g+w /u01/applmgr/oms_logs

and that fixed the invalid file operation errors. Hope this helps someone out there!

Oracle Application | “apps” user account is locked!

Today while running automatic configuration on the Application Tier, I entered the “apps” user password wrong! After the automatic configuration completed, having errors, I couldn’t start the Application tier.

It just said invalid password or database is not open.

Later after going through adautoconfig log files, I could see a number of failed connection attempts stating the account was locked, however I least expected this account to be “apps” (issues that one runs into when not properly exposed to the stack)

I opened SQL from application user and tried to login as apps/apps & was told the account was locked. I unlocked the apps account and ran the autoconfig once again, this time supplying the correct password. Everything went smooth and I was able to start the Application Tier.

So this is what happened. I supplied a wrong password for autoconfig & consecutive attempts to connect database from different scripts used the same credentials & after 10 failed attempts the account got locked up! causing rest of the issues.

So, be very careful when you are supplying apps password to scripts. As I am not an APPS DBA, it took me a while to figure this one out!

Optionally you may apply a better solution as mentioned here. Regardless, just be careful when you are supplying “apps” user password