• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

MSDN Blogs > Never doubt thy debugger > Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

Carlo Cardella
20 Jul 2007 5:14 PM
  • Comments 3

Another weird one I got this afternoon. A colleague from the Sql team asked my help about what looked an authentication problem is customer's web application, while trying to connect to a Lotus Notes database: in short, the customer was developing his application with Visual Studio 2005 and was testing it with Cassini, and everything looked fine, but as you can guess the problem arose when he deployed the site on his test IIS. They got the error [IM005] Driver's SQLAllocHandle on SQL_HANDLE_DBC failed.

The first thought was about a permission problem, since as you may know one of the main differences between IIS and Cassini is that the latter is essentially a process which runs in the context of the account logged on the machine, while IIS is a service which runs under different accounts but with lower privileges. Ok then, to verify this hypotheses we made a quick change to the <processModel> section to have the worker process running under the customer's account instead of the default ASPNET (he was testing on his local IIS 5.1 on XP). Well... same problem. So that could not be a security problem, ASP.NET was running as an administrator... smile_omg

The error message clearly refers to an ODBC problem, and a quick research in our internal docs showed that usually this is due to an installation/configuration problem in the involved driver. In this specific case, the customer was using NotesSql 3.02 he downloaded from the IBM site.

We decided to use Filemon and Regmon to get an idea of what was happening at file system and registry level and compare the two situations (working and not working); after some digging into the logs, we found that when the application was working fine it was looking (and loading) for notes.ini under the user's folder profile (c:\documents and settings\account\...), while in the failing situation we saw some king of probing but the application was not able to find the file... We decided to move the notes.ini from it's location to the Notes driver's installation folder, and that did the trick! smile_nerd.

 

Carlo


Quote of the Day:
At the working man's house hunger looks in but dares not enter.
--Benjamin Franklin

  • 3 Comments
ASP.NET, IIS, DataAccess
Leave a Comment
  • Please add 7 and 2 and type the answer here:
  • Post
Comments
  • Mukesh
    6 Sep 2007 3:02 AM

    I was facing same prb, but after reading ur solution I done that but still I am getting same error.kindly advice

  • Carlo Cardella
    6 Sep 2007 3:20 AM

    Mukesh, is this a cluster? Maybe it's an obvious question, but have you tried to restart the Sql box? This error may occur when you modify the login accounts, and it requires a reboot to fix it.

    HTH

  • Jim Wright
    21 Jun 2011 12:20 PM

    support.microsoft.com/.../836145

Page 1 of 1 (3 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223