Sep 11, 2008

Oracle Oci.dll Error

I am working on a new computer on these days. So i had to install programs that i need again. Whenever i install Oracle client i get oci.dll error. I have been working with Oracle since 2005. 3 years and a few installation of Oracle client. Always the same error: "OracleClient error: Could not create an environment: OCIEnvCreate returned -1".

Since the aim of this blog is helping people and giving useful information i want to mention about this general error. I read some forums about this error. I found two useful solutions.
First solution:
On the Oracle 9.2 Client software you need to give the Authenticated User privilege to the Oracle Home by following these steps:

1. Log on to Windows as a user with Administrator privileges.
2. Launch Windows Explorer from the Start Menu and and navigate to the
ORACLE_HOME directory.
3. Right-click on the ORACLE_HOME folder and choose the "Properties" option
from the drop down list. A "Properties" window should appear.
4. Click on the "Security" tab on the "Properties" window.
5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the
"Name" list is called "Group or user names").
6. Uncheck the "Read and Execute" box in the "Permissions" list (on Windows
XP the "Permissions" list is called "Permissions for Authenticated Users").
This box will be under the "Allow" column.
7. Check the "Read and Execute" box. This is the box you just unchecked.
8. Click the "Apply" button.
9. Click the "OK" button.
10. Reboot your computer after these changes have been made.

Re-execute the application and it should now work.
Second solution:
1. Go to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG or an equivalent.
2. Open machine.config file
3. Find the line below:
<processmodel clientconnectedcheck="0:00:05" comauthenticationlevel="Connect" comimpersonationlevel="Impersonate" cpumask="0xffffffff" enable="true" idletimeout="Infinite" loglevel="Errors" maxiothreads="25" maxworkerthreads="25" memorylimit="60" password="AutoGenerate" requestlimit="Infinite" requestqueuelimit="5000" responsedeadlockinterval="00:03:00" responserestartdeadlockinterval="00:09:00" restartqueuelimit="10" shutdowntimeout="0:00:05" timeout="Infinite" username="machine" webgarden="false">
4. Change userName="machine" to userName="SYSTEM"
5. Then iisreset

0 comments: