Help and Support

Error message when you connect to SQL Server if the Windows NT LM Security Support Provider registry key is missing: "cannot generate SSPI context"

Article ID:269541
Last Review:February 22, 2007
Revision:3.1
This article was previously published under Q269541
On This Page

SUMMARY

When you try to connect to an instance of SQL Server from a client computer that uses the TCP/IP Net Library, the following error message occurs if the Microsoft Windows NT LM Security Support Provider registry key is missing:
Msg 1060 sev 16 state 1 [Microsoft] [ODBC SQL Server driver] cannot generate SSPI context

Back to the top

MORE INFORMATION

The Windows NT LM Security Support Provider Service is not installed on the client computer. The NTLMSsp Registry key is located at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTLMSsp

Back to the top

WORKAROUND

To work around the problem:
Use one of the following:

Use Named Pipes as the default Net Library.

-or-

Create an alias that uses the Named Pipes Net library.


Only TCP/IP connections require the use of the SSPI API to make trusted connections. -or-

Follow these instructions to restore the missing registry key:

1.Run Regedit.exe on another Windows NT Server that has the NTLM Security Support Provider Service. To do this, click Start, and then click Run. Enter Regedit in the Open: text box of the Run dialog box.

NOTE: You can use the Services applet in Control Panel to check and see if the NT LM Security Support Provider service is running.
2.Navigate to the following registry location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTLMSsp
3.Click Registry, and then click Export Registry File. To export the NTLMSsp Registry key, enter a name in the File Name: text box of the Export Registry File dialog box. Select Registration Files in the Save as type: drop-down combo box.
4.Copy the file you exported to the server that does not have the NTLM Security Support Provider Service.
5.Double-click the file name you exported so that the file imports the key into the registry of the client computer.
6.Re-start the computer and verify that the NTLM Security Support Provider Service is present (see step 1).
The client computer can now connect to your instance of SQL Server through SQL Query Analyzer.

Back to the top


APPLIES TO
Microsoft SQL Server 2000 Standard Edition
Microsoft SQL Server 7.0 Standard Edition
Microsoft SQL Server 2005 Standard Edition
Microsoft SQL Server 2005 Developer Edition
Microsoft SQL Server 2005 Enterprise Edition
Microsoft SQL Server 2005 Express Edition
Microsoft SQL Server 2005 Workgroup Edition

Back to the top

Keywords: 
kbinfo KB269541

Back to the top

Article Translations

 

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.