Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Unable to Connect SQLState IM004 MS ODBC Driver Manager SQLAllocHandle on SQL_Handle_Env failed

Posted on 2007-10-04
6
Medium Priority
?
16,274 Views
Last Modified: 2008-01-09
Hello,

We have a Windows 2000 Server that has Oracle 9.2 installed on it. We run an ASP Application on it. This morning users were getting the error - tns could not resolve service name on the ASP pages. When I try to "test" the odbc dsn using ODBC Data Source Administrator I get the following error -

Unable to connect
SQLState=IM004
[ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

As far as I know nothing has been changed on this server - no updates, no one messed with the tnsnames.ora file, etc. We have another server (similar in configuration) that is hosting the ASP app now and it has no issues connecting with the databases.

I have looked at the following -
System Environment Variables - the oracle home bin directory is there in the path (I have compared it with the other server that's working and they are the same)
Permissions for the Oracle folder - Administrators and Authenticated Users had access and I have now added the IUSR_machinename and IWAM_machinename as well

Is there anything else I can check? Not sure if ths is related  but while rebooting the server I got a message saying one of the services had failed to start - when I looked at the event viewer it had the following - WMI ADAP was unable to process the RemoteAccess performance library due to a time violation in the open function (EventID 61)

Any help would be appreciated. Thanks.
0
Comment
Question by:jkj81
  • 3
5 Comments
 
LVL 18

Expert Comment

by:sventhan
ID: 20023076
0
 

Author Comment

by:jkj81
ID: 20031503
Thanks sventhan. However we have tried all the solutions mentioned in the post. I think we've tried numerous solutions dealing with permissions and environment variables. We only have 1 Oracle Home on the server as well.

We were thinking it could be a damaged/corrupt Oracle Client installation so we tried uninstalling the Client and reinstalling it. Initially it gave a few errors with writing to sqora32.dll but finally the client installed with no errors. But it still didn't fix the problem. We are now trying to install Oracle Instant Client on the server to see if it works. With this we have been able to go one step further as we can now actually get to the Oracle ODBC Driver Connect dialog. But when we try to login we get an error -

Unable to Connect
SQLState = s1000
[Oracle][ODBC] ORA12705 Cannot access NLS Data files or invalid env specified.
0
 

Author Comment

by:jkj81
ID: 20031695
Update - We added a system variable for NLS_LANG and that enabled us to test the ODBC DSN using the Oracle Instant Client successfully. We tested an asp page and it was able to retrieve the values from the database. However we have not tested the new connections with our main application (as it's running on another server at the moment).

Still trying to fix the issue with the "SQLAllocHandle on SQL_HANDLE_ENV failed" error we were getting while trying to use the ODBC DSN using the original Oracle Client installation.
0
 

Author Comment

by:jkj81
ID: 20167273
Issue resolved.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 20591393
PAQed with points refunded (350)

Computer101
EE Admin
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Eseutil Hard Recovery is part of exchange tool and ensures Exchange mailbox data recovery when mailbox gets corrupt due to some problem on Exchange server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to recover a database from a user managed backup
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question