Days ago, I experienced technical issue while I set up the oracle ODBC connection for one of our third-party application which is required to get oracle database connection. This application is windows-based ASP.NET application sitting on Windows Server 2003.
To prepare the database connection, I installed Oracle Client software and created new TNS name pointing to target database with no problem. After setting the database connection within application, I was surprised getting the following error message while I tested via internet explorer.
System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.
I know it is because of no permissions to access oracle client while the connection was trying to create environment. My quick search shows that there is one possible way to solve it by changing configuration file of Microsoft .Net Framework. But, that’s not my preferred way because any direct changing on very low level of system file could raise unexpected problem. Another method is to adjust permissions manually and it works to my situation.
Step 1: Log on Windows as a user with Administrator privileges
Step 2: Launch Windows Explorer from and navigate to the ORACLE_HOME folder. In my case, it’s installation path of Oracle Client Software.
Step 3: Right-click on the ORACLE_HOME folder and choose the “Properties” option
Step 4: Click on the “Security” tab of the “Properties” window
Step 5: Click on “Authenticated Users” item in the “Name” list
Step 6: Uncheck the “Read and Execute” box in the “Permissions for Administrators” list under the “Allow” column and then re-check the “Read and Execute” box under the “Allow” column (this is the box you just unchecked).
After doing that, the section “Permissions for Administrators” looks like below. In my case, above actions un-checked “Full Control” and “Modify” under the Allow” column.
Step 7: Click the “Advanced” button and in the “Permission Entries” list make
sure you see the “Authenticated Users” listed there with:
Permission = Read & Execute
Apply To = This folder, subfolders and files
If this is NOT the case, edit that line and make sure the “Apply onto”
drop-down box is set to “This folder, subfolders and files”. This
should already be set properly but it is important that you verify this.
Step 8: Click “OK” button to apply the changes you made and then reboot your windows server.