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



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)
  • Microsoft SQL Server 7.0
  • 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

This article was previously published under Q269541

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

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

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.

Modification Type:MajorLast Reviewed:12/15/2005
Keywords:kbinfo KB269541