Article ID: 843248 - Last Review: November 15, 2007 - Revision: 3.4 FIX: You receive a "Cannot generate SSPI context" error message when you try to connect to a SQL Server 2000 SP3 server computer
On This PageSUMMARYWhen you try to connect to a Microsoft SQL Server 2000 Service Pack 3 (SP3) server computer from a client computer, the connection fails with an error message if the server name cannot be resolved from the Internet Protocol (IP) address. This behavior occurs because SQLOLEDB incorrectly interprets the return value of the ConnectionGetSvrUser function of dbnetlib.
SYMPTOMSWhen you try to connect a client computer to a Microsoft SQL Server 2000 SP3 server computer, the server name cannot be resolved from the Internet Protocol (IP) address, and the connection fails. When you connect to the SQL Server 2000 SP3 server computer with SQL Query Analyzer, you receive the following error message: Server: Msg 11004, Level 16, State 1 [Microsoft][ODBC SQL Server Driver]Cannot generate SSPI context Source: "Microsoft OLE DB Provider for SQL Server" Interface: IID_IDBInitialize Result: 0x80004005 = E_FAIL ISQLErrorInfo: [HY000][0x00002afc] IErrorInfo: [0x00002afc]"Cannot generate SSPI context" File: D:\MDACTools\rowsetviewer\CBase.cpp Line: 1067 CAUSEWhen SQLOLEDB calls the ConnectionGetSvrUser function of the dbnetlib library, it incorrectly interprets that this function returns a Boolean value. The ConnectionGetSvrUser function is designed to return a void. Therefore, whatever resides in the EAX register becomes the return value.
The ConnectionGetSvrUser function internally calls the gethostbyaddr function. The gethostbyaddr function obtains the host name that corresponds to a particular IP address. If the gethostbyaddr function fails, it returns a zero character to the EAX register. Therefore, the ConnectionGetSvrUser function returns a FALSE value. This behavior causes a logon failure to the SQL Server 2000 SP3 server computer. RESOLUTION A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: http://support.microsoft.com/contactus/?ws=support
(http://support.microsoft.com/contactus/?ws=support)
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name -------------------------------------------------------------- 15-Jun-2004 00:22 2000.85.1045.0 28,672 Dbnmpntw.dll 15-Jun-2004 00:21 2.80.1045.0 147,456 Msadds.dll 15-Jun-2004 00:21 2.80.1045.0 512,000 Msado15.dll 15-Jun-2004 00:21 2.80.1045.0 163,840 Msadomd.dll 15-Jun-2004 00:21 2.80.1045.0 184,320 Msadox.dll 15-Jun-2004 00:21 2.80.1045.0 53,248 Msadrh15.dll 15-Jun-2004 00:21 2.80.1045.0 225,280 Msdaora.dll 15-Jun-2004 00:21 2.80.1045.0 147,456 Msdart.dll 15-Jun-2004 00:21 2.575.1045.0 139,264 Msorcl32.dll 15-Jun-2004 00:21 3.525.1045.0 221,184 Odbc32.dll 15-Jun-2004 00:22 2000.85.1045.0 24,576 Odbcbcp.dll 15-Jun-2004 00:21 2.80.1045.0 442,368 Oledb32.dll 15-Jun-2004 00:21 2000.85.1045.0 503,808 Sqloledb.dll 15-Jun-2004 00:21 2000.85.1045.0 401,408 Sqlsrv32.dll 15-Jun-2004 00:08 2000.85.1045.0 208,896 Sqlxmlx.dll WORKAROUNDTo work around this problem, manually create a host entry on the client computer for the IP address that you want to connect.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. MORE INFORMATIONSteps to reproduce the problemConfigure the dynamic IP address
Connect to the SQL Server 2000 SP3 server computer from a client computer through SQL Query Analyzer
Connect to the SQL Server 2000 SP3 server computer from a client computer through the Rowset Viewer
REFERENCESFor more information, visit the following Microsoft Developer Network (MSDN) Web sites: ConnectionGetSvrUser http://msdn2.microsoft.com/en-us/library/Aa470056.aspx (http://msdn2.microsoft.com/en-us/library/Aa470056.aspx) OLE DB Test Tools overview
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
http://msdn2.microsoft.com/en-us/library/ms721219.aspx (http://msdn2.microsoft.com/en-us/library/ms721219.aspx) 323444
(http://support.microsoft.com/kb/323444/
)
How to change the IP address of a network adapter in Windows Server 2003
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684
(http://support.microsoft.com/kb/824684/
)
Description of the standard terminology that is used to describe Microsoft software updates
| Article Translations
|

Back to the top
