{"id":295,"date":"2010-08-12T17:18:36","date_gmt":"2010-08-12T21:18:36","guid":{"rendered":"http:\/\/kamivaniea.com\/?p=295"},"modified":"2010-08-20T13:58:00","modified_gmt":"2010-08-20T17:58:00","slug":"sql-server-2008-cant-generate-sspi-context-error-on-remote-connection","status":"publish","type":"post","link":"http:\/\/kamivaniea.com\/?p=295","title":{"rendered":"SQL Server 2008 &#8220;Can&#8217;t Generate SSPI Context&#8221; error on remote connection"},"content":{"rendered":"<p>While trying to setup a remote connection to a new SQL Server 2008 installation which uses Windows authentication (aka Kerberos) I encountered this error:<\/p>\n<p><code><br \/>\nCan't generate SSPI context<br \/>\n<\/code><\/p>\n<p>A good high level explanation of what causes the error can be found on <a href=\"http:\/\/blogs.msdn.com\/b\/sql_protocols\/archive\/2005\/10\/15\/481297.aspx\">MSDN<\/a> and a detailed explanation can be found at <a href=\"http:\/\/support.microsoft.com\/?id=811889\">Microsoft Support<\/a> but neither article has any detailed explanation of how to fix the problem.<\/p>\n<p>In my case, during install, I had the server start under my user name when I should have instead had it start under the Network Service group. This is a problem because when user Bob tries to log into the server remotely, my user (the one the server is running under) doesn&#8217;t have the necessary permissions to run as Bob so Bob gets an error that SSPI can&#8217;t be generated. To fix this I needed to change the user that SQL Server runs under to Network Service.  To do this:<\/p>\n<ol>\n<li>Open the <strong>Task Manager<\/strong> and go to the <strong>Services<\/strong> tab<\/li>\n<li>Click the <strong>Services<\/strong> button in the lower right corner<\/li>\n<li>Sort by name and find all the SQL entries<\/li>\n<li>In the &#8220;Log on as&#8221; column you should see some of the services have a user name. For each:\n<ol>\n<li>Right click and select <strong>Properties<\/strong><\/li>\n<li>Select the <strong>Log On<\/strong> tab<\/li>\n<li>Make sure <strong>This account<\/strong> is selected<\/li>\n<li>Fill in <strong>Network Service<\/strong> in the box next to &#8220;This account&#8221;<\/li>\n<li>Delete both passwords<\/li>\n<li>Click <strong>Ok<\/strong><\/li>\n<\/ol>\n<\/li>\n<li>Restart the SQL Server<\/li>\n<\/ol>\n<p>This should cause the server to run under Network Service instead of a particular user.<\/p>\n<p>Some extra technical details about my setup:<\/p>\n<ul>\n<li>The SQL Server was already setup to accept remote connections<\/li>\n<li>The Windows Firewall was already setup to accept incoming SQL requests<\/li>\n<li>The SQL Server was configured to accept incoming TCP requests<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>While trying to setup a remote connection to a new SQL Server 2008 installation which uses Windows authentication (aka Kerberos) I encountered this error: Can&#8217;t generate SSPI context A good high level explanation of what causes the error can be found on MSDN and a detailed explanation can be found at Microsoft Support but neither [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[50,51],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-application-debug","tag-sql-server-2008","tag-sspi"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2u4LH-4L","_links":{"self":[{"href":"http:\/\/kamivaniea.com\/index.php?rest_route=\/wp\/v2\/posts\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/kamivaniea.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kamivaniea.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kamivaniea.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/kamivaniea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=295"}],"version-history":[{"count":10,"href":"http:\/\/kamivaniea.com\/index.php?rest_route=\/wp\/v2\/posts\/295\/revisions"}],"predecessor-version":[{"id":301,"href":"http:\/\/kamivaniea.com\/index.php?rest_route=\/wp\/v2\/posts\/295\/revisions\/301"}],"wp:attachment":[{"href":"http:\/\/kamivaniea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kamivaniea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kamivaniea.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}