Home » Infrastructure » Windows » Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #100238] Tue, 17 September 2002 08:49 Go to next message
Kevin
Messages: 45
Registered: February 2000
Member
I am attempting to connect to an Oracle 8i database via the Oracle 9.02 ODBC driver and I am receiving the following error message upon testing the connection in WinXp's ODBC Data Source Administrator dialog box: "Unable to connect SQLState=IM004 [[Microsoft]][[ODBC Driver Manager]] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed"
I am running Oracle Client 9.2 on a P4 machine running winXP. Has anyone out there experienced this issue before? Anyone have an idea on how to resolve it? Any assistance would be greatly appreciated. Thanks.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #100292 is a reply to message #100238] Thu, 03 October 2002 10:04 Go to previous messageGo to next message
Roy
Messages: 30
Registered: May 2002
Member
Are you sure you're using Oracle's odbc driver? xp sometimes comes with the microsoft's odbc driver for oracle. I wouldn't recommend using that.
On the other hand if you're already using oracle odbc driver, try using oracle 8i driver (8.1.7) instead.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #100395 is a reply to message #100238] Sun, 08 December 2002 19:43 Go to previous messageGo to next message
jimchen
Messages: 1
Registered: December 2002
Junior Member
I'm use windows server2000 and oracle 9.2 and also receive the same error message.
when use "Microsoft ODBC for Oracle" driver get the error:[[Microsoft]][[ODBC Driver Manager]] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed;

when use "Oracle in OraHome92" driver get the error:[[Microsoft]][[ODBC Driver Manager]] Specified driver could not be loaded due to system error 5;

I solved the problem by add the IUSR_mycomputername user to administrator group.

we found help from below websit:
http://dbforums.com/showthread.php?threadid=383749

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/b2df362dfd1dff0f85256a8d006f4015?OpenDocument
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #100430 is a reply to message #100238] Sat, 28 December 2002 04:35 Go to previous messageGo to next message
nagarajan
Messages: 3
Registered: January 2002
Junior Member
when i try to access Oracle Database through ASP Script, Iam getting the Following error.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[[Microsoft]][[ODBC Driver Manager]] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

Suggest me Humbly.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #100856 is a reply to message #100395] Tue, 20 January 2004 23:38 Go to previous messageGo to next message
neela sathesh
Messages: 1
Registered: January 2004
Junior Member
I'm having the same problem with win98 and oracle8i.can
u guide me what to do?
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #100961 is a reply to message #100238] Fri, 05 March 2004 00:59 Go to previous messageGo to next message
Thunderfunk
Messages: 1
Registered: March 2004
Junior Member
One of the things that causes this error is not having the ORACLE_HOMEbin directory in your path.

This is usually added during the install of the oracle client. But if you install the client and then the ODBC driver in the same session, the path may not take effect immediately, and so the ODBC connection test fails. This happenned to me and the problem went away once I'd logged off and logged on again.

Open up a cmd prompt and check the path in that.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #101224 is a reply to message #100238] Fri, 25 June 2004 10:08 Go to previous messageGo to next message
WES UNDERWOOD
Messages: 1
Registered: June 2004
Junior Member
This was solved when we FIXED the path statement in Windows 2000. The path statement was broken and read off with a dot (".") and no semicolon followed it as a delimiter.

For Example:
WRONG--> .C:WINNTSystem32
RIGHT--> .;C:WINNTSystem32
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #101255 is a reply to message #100238] Wed, 07 July 2004 11:53 Go to previous messageGo to next message
Andrew
Messages: 144
Registered: March 1999
Senior Member
The problem appears to be a permission issue during the installation of both Oracle 9i and 10G.

If you navigate Oracle home you will find that the directory has different permissions then the root of the tree. In the case of 10G the path is C:Oracleproduct10.1.0Client_1. Open the properties for the Client_X directory, and you will see that "Authenticated Users" should have Read and Execute, List Folder Contents, and Read. To fix the problem, do the following....
-Select Authenticated Users
-Uncheck Read and Execute
-Press Apply
-Check Read and Execute
-Press Apply

Seems stupid, but that did the trick for me. I ran across this solution on asp-help.com.

Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #101272 is a reply to message #101255] Thu, 15 July 2004 08:35 Go to previous messageGo to next message
Molly Golebiewski
Messages: 1
Registered: July 2004
Junior Member
"That did the trick" thanks. I never would have thought of doing that.
Here are my steps I took:
1)Opened up Windows Explorer
2)Navigated to Oracleora92
3)Right clicked and selected properties
4)Clicked on Securities tab
5)Clicked on Authenticated Users
6)Unchecked Read and Execute
7)Rechecked Read and Execute
8)Clicked ok to close window
9)Restarted web server
10)No longer get the error message

All of the other message boards kept saying it was a path issue and that did not appear to be the case for me.
Once again, thanks.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101387 is a reply to message #101255] Wed, 08 September 2004 07:19 Go to previous messageGo to next message
BBaum
Messages: 1
Registered: September 2004
Junior Member
Many thanx.
This little tip made the job i've been working on since 2 days.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101406 is a reply to message #101272] Wed, 15 September 2004 03:34 Go to previous messageGo to next message
Steven Kempson
Messages: 1
Registered: September 2004
Junior Member
FANTASTIC!! That's all I to say. Well done gents. You have saved me many hours/days/weeks/months....as you now how long these things can take.

I followed Andrews instructions to the T.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101407 is a reply to message #100395] Wed, 15 September 2004 09:51 Go to previous messageGo to next message
Larry
Messages: 11
Registered: September 2002
Junior Member
Our windows systems guy upgraded our MDAC from 2.5 SP3 to 2.6 SP2 to solve this problem.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101430 is a reply to message #101406] Wed, 29 September 2004 00:34 Go to previous messageGo to next message
Kandasamy
Messages: 2
Registered: June 2002
Junior Member
hi
i had the above error so please help me to solve that error

"ERROR: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed" in oracle9i

thank you
kandasamy
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101499 is a reply to message #101255] Thu, 04 November 2004 05:10 Go to previous messageGo to next message
David Taylor
Messages: 1
Registered: November 2004
Junior Member
This work for me also. Thanks for the information.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101556 is a reply to message #101255] Wed, 08 December 2004 05:01 Go to previous messageGo to next message
M. DeMarais
Messages: 1
Registered: December 2004
Junior Member
Great catch. I was pounding on this problem all day.

We had to reboot after following the directions for IIS to accept the changes.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101560 is a reply to message #101272] Sun, 12 December 2004 15:15 Go to previous messageGo to next message
Walter Bogorad
Messages: 1
Registered: December 2004
Junior Member
It worked for me as well with one small caveat: after rechecking Read and Execute I had to reboot my laptop that runs Win2000. Otherwise the change had no effect.

Thanks a lot. The message was really useful. Before finding this answer I was really frustrated.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101571 is a reply to message #101255] Thu, 16 December 2004 21:15 Go to previous messageGo to next message
John Pile
Messages: 1
Registered: December 2004
Junior Member
Andrew, you are awesome! I'm running Roxen CMS and webserver. Your solution (with a reboot) fixed me as well!!

THANKS!
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #101591 is a reply to message #101272] Mon, 27 December 2004 08:10 Go to previous messageGo to next message
Jose Luis Madruga
Messages: 1
Registered: December 2004
Junior Member
Great for me too!
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #109925 is a reply to message #101272] Tue, 01 March 2005 18:11 Go to previous messageGo to next message
Chenxi Zhang
Messages: 1
Registered: March 2005
Junior Member
thanks for your information!
^_^
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #129020 is a reply to message #101430] Thu, 21 July 2005 10:07 Go to previous messageGo to next message
pushkar1ranade
Messages: 1
Registered: July 2005
Location: NJ USA
Junior Member

Adding the Oracle Home\bin to the PATH variable in Win2k did the trick for me.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #145570 is a reply to message #129020] Thu, 03 November 2005 19:50 Go to previous messageGo to next message
dchetwyn
Messages: 1
Registered: November 2005
Junior Member
I had just installed oracle forms 10.0.1.0.2 which instaigated this error message on existing ODBC connections.

I am using XP and 10g.

I fixed it by moving my ORACLEHOME/bin infront of my DEVSUITE/bin entry in the PATH variable
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #146380 is a reply to message #100961] Thu, 10 November 2005 01:58 Go to previous messageGo to next message
rajan1172
Messages: 4
Registered: November 2005
Junior Member
It works after changing the path to include Oracle installation directory.

Thanks thunderfunk for your valuable advise.

Cheers/Rajan
icon9.gif  Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #148252 is a reply to message #100238] Wed, 23 November 2005 05:22 Go to previous messageGo to next message
tirunagari
Messages: 1
Registered: November 2005
Junior Member
HI Guys,

i am having the same problem, but none of the above solutions worked, except that if i restart the machine.
But is there any other solution which would solve it without a restart.
i am in serious need of it...
FYI the problem only comes in win 2k server, win2k3 doesnt have the same problem

eagerly waiting for a reply
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #213865 is a reply to message #100238] Fri, 12 January 2007 10:15 Go to previous messageGo to next message
sumpree
Messages: 1
Registered: January 2007
Junior Member
I was able to resolve it by adding the oracle home (C:\oracle\ora92) and path C:\oracle\ora92\bin.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV f [message #233811 is a reply to message #145570] Fri, 27 April 2007 10:10 Go to previous messageGo to next message
bham73
Messages: 1
Registered: April 2007
Location: CSULB
Junior Member
same exact prob here and your idea fixed it. Thanks.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #282543 is a reply to message #100238] Thu, 22 November 2007 05:13 Go to previous messageGo to next message
ramprax
Messages: 1
Registered: November 2007
Junior Member
I too faced the same problem.
It was because ORACLE_HOME environment home was blank.
I set it to point to the correct location & it started working.
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #476711 is a reply to message #213865] Fri, 24 September 2010 14:39 Go to previous messageGo to next message
CaptainPC
Messages: 1
Registered: September 2010
Junior Member
You added the home and path to where? I am having a similar problem. As an administrator, I get no errors. Once I remove the admin permisssions and return the account to the user group, I get the [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed. I have tried removing the permissions from the Oracle folder and then adding the read & execute back. Because it works as an admin and not as a user, I know it is a permissions issue. I have updated permissions on the oracle, odbc, and the software interface, giving the user group admin rights. I am running out of ideas. I am open to suggestions.

Thanks,

CaptainPC
Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #476732 is a reply to message #476711] Fri, 24 September 2010 16:53 Go to previous messageGo to next message
BlackSwan
Messages: 21949
Registered: January 2009
Senior Member
CaptainPC,
I applaud the fact that you actually searched for previous solution here & found a 3 year old thread.
To utilize Oracle s/w on a local system one of two ways will succeed.
1) You are the owner of the Oracle software
2) You utilize SQL*Net (username/password@TNS_ALIAS) to access the DB

Attempting #2 requires the Oracle listener to be running & properly configured.

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
icon14.gif  Re: Unable to connect SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message #484829 is a reply to message #476732] Thu, 02 December 2010 23:46 Go to previous message
asnanisatish
Messages: 2
Registered: October 2010
Location: BHOPAL,MP, India
Junior Member
Just a summary of all the above discussions
Assume Oracle Client in c:\OraClient folder and web folder as c:\inetpub\wwwroot

1. c:\inetpub\wwwroot must have Read and Execute privlege for IUSR user.

2. c:\OraClient must have Read and Execute privlege for IUSR user.

3. The environment PATH variable must have C:\OraClient\bin included.

4. Don't forget to restart Web Server

[Updated on: Thu, 02 December 2010 23:49]

Report message to a moderator

Previous Topic: OO4O with javascript
Next Topic: Unable to connect SQLState=IM004
Goto Forum:
  


Current Time: Sun Apr 20 00:19:48 CDT 2014

Total time taken to generate the page: 0.09810 seconds