FIX: You receive a "Cannot generate SSPI context" error message when you try to connect to a SQL Server 2000 SP3 server computer (843248)
The information in this article applies to:
- Microsoft Data Access Components 2.8
SUMMARYWhen 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. - A hotfix resolves this problem.
- To work around this problem, manually create a host entry for the IP address in the client computer.
- To reproduce the problem, create and configure the dynamic IP address of the server computer, and then connect to the server computer by using SQL Query Analyzer or Rowset Viewer from a client computer.
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 When you use the SQL Server OLE DB Provider (SQLOLEDB) to connect to a SQL Server 2000 server computer by using Rowset Viewer, you receive the following error message: 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.
RESOLUTIONA supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem. To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site: Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
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. - Start Windows Explorer.
- Locate the Hosts file, and then open the file in notepad.
Note You can locate the file in the %SystemRoot%\System32\Drivers\Etc path. - Add the following at the end of the file:
Random IP Computer Name
Note Random IP is a placeholder for the IP address that is not in use by another computer in the network. Computer Name is a placeholder for the name of the computer that has the SQL Server 2000 SP3 running on it. The Random IP IP address and the Computer Name name must be separated by at least one
space. - On the File menu, click Save.
- Close the file.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.REFERENCESFor more information, visit the following Microsoft Developer Network (MSDN) Web sites:
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
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
Description of the standard terminology that is used to describe Microsoft software updates
Modification Type: | Major | Last Reviewed: | 4/7/2006 |
---|
Keywords: | kbQFE KBHotfixServer kbSqlClient kbfix kberrmsg KB843248 kbAudDeveloper |
---|
|