Home » RDBMS Server » Networking and Gateways » Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #66759] Wed, 18 December 2002 06:23 Go to next message
Juan Pablo Ruiz
Messages: 1
Registered: December 2002
Junior Member
Hi:

I'm Trying to connect to a Oracle database running on a server.
I have IIS 5.0. I already install the Oracle Client Components and configure the ODBC DSN and the Net8 Easy Configuration.
Now I;m trying to make a connection via ASP. The code is like this:

Set OraDatabase = Server.CreateObject("ADODB.Connection")
OraDatabase.Open "dsn=CRM;uid=scott;pwd=tiger;"

But this error comes out:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

Please Help!

Thank You
Juan Pablo Ruiz
Re: Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #66869 is a reply to message #66759] Wed, 19 February 2003 03:23 Go to previous messageGo to next message
Suresh
Messages: 189
Registered: December 1998
Senior Member
You need to install the NET 8 libraries which may be obtained by installing the Oracle client. The Oracle ODBC driver includes them so this problem does not occur when the Oracle ODBC driver is used.
Re: Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #67733 is a reply to message #66759] Wed, 09 February 2005 03:44 Go to previous messageGo to next message
prema
Messages: 1
Registered: February 2005
Junior Member
Re: Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

Why do I get Driver's SQLAllocHandle on SQL_HANDLE_ENV failed with the Microsoft Oracle ODBC driver? Next
Previous
When connecting to a DSN using the Microsoft Oracle ODBC driver SQLAllocHandle/SQLAllocEnv fails and SQLGetDiagRec or SQLError returns:

IM004:1:0:[[Microsoft]][[ODBC Driver Manager]]
Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

You need to install the NET 8 libraries which may be obtained by installing the Oracle client. The Oracle ODBC driver includes them so this problem does not occur when the Oracle ODBC driver is used.

You also need to make sure that the path to the Oracle DLLs included with the Oracle client is included in your system PATH. e.g. if Oracle client is installed in C:oracleora81 then C:oracleora81bin needs to be in your PATH environment variable. Two common problems related to incorrectly set PATH are:

[[1]] the Oracle client was installed byuser A on the machine where user
A is not the administrator. User A's PATH includes the path to the
Oracle client libraries but the OOB Server is a service running as
local admin and so the Oracle client directory needs to be in the
system PATH.

[[2]] the PATH environment contains the correct path but preceded by
an old Oracle client install directory which still exists.

You can check the PATH environment by going to control panel -> System -> Environment. System environment variables available to everyone are in the top pane and user-specific variables in the lower pane.



Product Links:
Easysoft ODBC-ODBC Bridge FAQ
Easysoft ODBC-ODBC Bridge Product Information
Re: Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #186101 is a reply to message #66759] Sat, 05 August 2006 18:43 Go to previous messageGo to next message
tonou
Messages: 1
Registered: August 2006
Junior Member
Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
--------------------------------------------------
Need to revise the solution (Oracle Provider for .Net 10.2.0.)

I encountered the same problem. I installed Oracle 10.2g. There was no problem on that time no such error, The connectivity was was working fine ... from local database server and from other application servers.

The problem started when i installed the Oracle Provider for .Net v10.2.0. When i connected to the database from other servers it was connecting but from the server where the database was installed the odbc as well as the OleDB Provider for Oracle raised the error "Driver's SQLAllocHandle on SQL_HANDLE_ENV failed".

I tried all the steps.
1. By reassigning the Permissions on related folders. (failed)
2. Checked and even retyped the Path in PATH Environment variable (failed because path the folder listing orders were already correct).

3. The Final method i tried was the "Re-Selecting/Re-Arranging of Oracle Home". (It Worked).

In Oracle 9i there was a utility named Oracle Home selector. But in 10g it has been moved. You may Add the Oracle Home by using Oracle Universal Installer -> Installed Products (Button) -> Environment (Tab). In my case i rearranged the oracle home by promoting the OraDb10g_Home1 to 1st in the List and ODAC_HOME1 to the 2nd Position in the list then clicked Apply and it worked.

I hope this should work for you as well. I didnt examine whether the Universal installer updated the registry or not or there was something i was missing in Path env variable. But i recommend that you should set the path env variable by using Oracle Universal Installer (for 10g databases).
Re: Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #313401 is a reply to message #186101] Fri, 11 April 2008 12:46 Go to previous message
mwiseman
Messages: 1
Registered: April 2008
Location: virginia
Junior Member
I'm running Oracle 10g Express and get this error... any ideas how to fix???
Previous Topic: connecting oracle to mssql using jdbc driver
Next Topic: owb integration with db2
Goto Forum:
  


Current Time: Mon Dec 05 04:39:52 CST 2016

Total time taken to generate the page: 0.09124 seconds