You are currently offline, waiting for your internet to reconnect

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

Extended support for SQL Server 2005 ends on April 12, 2016

If you are still running SQL Server 2005 after April 12, 2016, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

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.
connectivity sspi NTLM error 1060
Properties

Article ID: 269541 - Last Review: 02/22/2007 22:33:50 - Revision: 3.3

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

  • kbinfo KB269541
Feedback