<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Allen Kinsel - SQL DBA &#187; Connections</title>
	<atom:link href="http://www.allenkinsel.com/Topics/sql-server/connections-sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.allenkinsel.com</link>
	<description>SQL Server, PASS, and other data mishaps</description>
	<lastBuildDate>Wed, 01 Sep 2010 18:37:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Shadows Rock, Filtering Platform not so much!</title>
		<link>http://www.allenkinsel.com/archive/2010/08/shadows-rock-filtering-platform-not-so-much/</link>
		<comments>http://www.allenkinsel.com/archive/2010/08/shadows-rock-filtering-platform-not-so-much/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 12:15:34 +0000</pubDate>
		<dc:creator>Allen Kinsel</dc:creator>
				<category><![CDATA[Connections]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Syndicated]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.allenkinsel.com/?p=459</guid>
		<description><![CDATA[RDP remote control (shadowing) of multiple sessions is a great way to allow geographically separated teams to work on the same Server console.  You can do this from task manager
 
Today I had a new install of windows 2008 that was rejecting the attempts at remote control, the error was &#187;remote control failed&#187;, nothing was logged in [...]]]></description>
			<content:encoded><![CDATA[<p>RDP remote control (shadowing) of multiple sessions is a great way to allow geographically separated teams to work on the same Server console.  You can do this from task manager</p>
<div id="attachment_460" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.allenkinsel.com/wp-content/uploads/2010/08/task-man.jpg"><img src="http://www.allenkinsel.com/wp-content/uploads/2010/08/task-man-300x176.jpg" class="size-medium wp-image-460 " title="task man" alt="Control your co-workers!" width="300" height="176" /></a><p class="wp-caption-text">Control your co-workers!</p></div>
<p> </p>
<p>Today I had a new install of windows 2008 that was rejecting the attempts at remote control, the error was &raquo;remote control failed&raquo;, nothing was logged in the System or Application event logs. In the Security event log was only one error: &laquo;The Windows Filtering Platform has blocked a bind to a local port&raquo;</p>
<p>After plenty of fiddling and making sure there was no &raquo;firewall&raquo; or reason for the filtering platform to be enabled, I came across this command I never knew existed &laquo;shadow&raquo;  </p>
<p>Apparently whatever had the filtering platform angry and blocking access was ok with that simple command.   So in this case going to a command window and running &laquo;shadow 3&raquo; worked perfectly, I could once again see both terminals and the windows filtering platform allowed me to actually work, instead of impeding me at every turn.</p>
<p>The Windows Filtering Platform on Server 2008 and 2008 R2 has been the culprit more times than I can count lately when the &laquo;gremlins&raquo; are inhabiting our servers, If only there were a way you could turn it off totally, but I guess that's sort of like Internet Explorer, it cant be unbundled from the OS.</p>
<p>
<strong>Related posts</strong>:
<br /><a href="http://www.allenkinsel.com/archive/2010/06/sql-server-and-sspi-handshake-failed-error-hell/" title="Permanent link to this post">Sql Server and SSPI handshake failed error hell</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/03/whose-got-my-dac/" title="Permanent link to this post">Whose got my DAC?</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/04/allowing-effective-developer-access-to-sql-server/" title="Permanent link to this post">Allowing effective developer access to SQL Server</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/02/sql-active-directory-user-id-sid-mismapings/" title="Permanent link to this post">SQL Active Directory User ID SID Mismapings</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/01/using-aliases-in-sql-server/" title="Permanent link to this post">Using Aliases with SQL Server</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenkinsel.com/archive/2010/08/shadows-rock-filtering-platform-not-so-much/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sql Server and SSPI handshake failed error hell</title>
		<link>http://www.allenkinsel.com/archive/2010/06/sql-server-and-sspi-handshake-failed-error-hell/</link>
		<comments>http://www.allenkinsel.com/archive/2010/06/sql-server-and-sspi-handshake-failed-error-hell/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 15:18:00 +0000</pubDate>
		<dc:creator>Allen Kinsel</dc:creator>
				<category><![CDATA[Connections]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Syndicated]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Logins]]></category>
		<category><![CDATA[SSPI]]></category>

		<guid isPermaLink="false">http://www.allenkinsel.com/archive/2010/06/sql-server-and-sspi-handshake-failed-error-hell/</guid>
		<description><![CDATA[The infamous SSPI Failed error strikes again!
One of our SQL servers was generating these errors for &#171;some&#187; Windows logins but not all.
Error: 17806, Severity: 20, State: 2.
SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 192.168.1.1]
Error: 18452, Severity: 14, State: 1.
Login failed for user [...]]]></description>
			<content:encoded><![CDATA[<h2>The infamous SSPI Failed error strikes again!</h2>
<p>One of our SQL servers was generating these errors for &laquo;some&raquo; Windows logins but not all.</p>
<p><span style="color: #ff0000;">Error: 17806, Severity: 20, State: 2.</span></p>
<p><span style="color: #ff0000;">SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 192.168.1.1]</span></p>
<p><span style="color: #ff0000;">Error: 18452, Severity: 14, State: 1.</span></p>
<p><span style="color: #ff0000;">Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 192.168.1.1]</span></p>
<p>After exhausting all of the normal troubleshooting for this error (accounts locked, disabled, Sql Service accts, bad connection strings, SPN's, etc.) I spent the next few hours learning more about the way SQL handles authentication requests than I had ever wanted to know.</p>
<h4>The Scenario –</h4>
<p>A couple of separate individual Windows ID's started generating these errors while attempting connections, all other windows logins were working properly. The connections were initially happening through applications, but also occurred through sqlcmd. When logged in to the server locally with the offending ID's the connections to SQL would succeed.</p>
<h4>The Troubleshooting process –</h4>
<p>Check all the regular SSPI issues, I wont bore you with the details as they are easily <a href="http://www.google.com/search?q=sspi++login+failed">searchable</a></p>
<ul>
<li>A relatively easy way of checking the &laquo;easy&raquo; authentication issues If possible/appropriate is to log into the SQL Server locally with the offending ID and fire up sqlcmd and connect to the server via sqlcmd –Sservername,port –E  (by specifying the port you force TCP/IP instead of LPC, thereby forcing the network into the equation)</li>
</ul>
<p>Verify whether the login is trying to use NTLM or Kerberos (many ways to do this but simplest is to see if there are any other KERBEROS connections on the machine)</p>
<ul>
<li><span style="color: #0000ff;">SELECT DISTINCT</span> auth_scheme <span style="color: #0000ff;">FROM</span> <span style="color: #00ff00;">sys.dm_exec_connections</span></li>
<li>If Kerberos is in use, there are a few additional things to verify related to SPN's, since only NTLM was in use on this server I skipped that</li>
</ul>
<p>Determine if the accounts were excluded from connecting to the machine through the network through a group policy or some other AD setting</p>
<p>After all of these checked out OK, I began to try and figure out what the error code 0x8009030c meant, turns out, its fairly obvious what the description is : sec_e_logon_denied.  This description was so helpful I thought about making this server into a boat anchor but, luckily for my employer the server room is located many miles away and has armed guards.</p>
<p>Since I knew we could logon locally to the SQL Server with the ID that SQL was rejecting with logon denied something else was trying to make my life miserable.</p>
<p>We didn't have logon failure security auditing turned on so, I had no way of getting a better error description, As luck would have it though this would prove instrumental in finding the root cause. To get a better error message, I found this handy <a href="http://support.microsoft.com/kb/109626/EN-US/">KB article </a>detailing steps needed to put net logon into debug mode.</p>
<h4>Say hello to my new best friend!  -- nltest.exe</h4>
<p>After downloading <a href="http://www.microsoft.com/downloads/details.aspx?familyid=49ae8576-9bb9-4126-9761-ba8011fabf38&amp;displaylang=en">nltest</a> &amp; using it to enable netlogon debugging on the SQL Server, I got this slightly better message in the netlogon.log file</p>
<p><span style="color: #3366ff;">06/15 14:15:39 [LOGON] SamLogon: Network logon of DOMAIN\USER from Laptop Entered</span></p>
<p><span style="color: #3366ff;">06/15 14:15:39 [CRITICAL] NlPrintRpcDebug: Couldn't get EEInfo for I_NetLogonSamLogonEx: 1761 (may be legitimate for 0xc0000064)</span></p>
<p><span style="color: #3366ff;">06/15 14:15:39 [LOGON] SamLogon: Network logon of DOMAIN\USER from Laptop Returns 0xC0000064</span></p>
<p>The error code 0XC0000064 maps to &laquo;NO_SUCH_USER&raquo;</p>
<p>Since I was currently logged in to the server with the ID that was returning no such user, something else was obviously wrong, and luckily at this point I knew it wasn't SQL.</p>
<p>Running &laquo;set log&raquo; on the server revealed that a local DC (call it DC1) was servicing the local logon request.</p>
<p>After asking our AD guys about DC1 and its synchronization status, as well as whether the user actually existed there, everything still looked OK.</p>
<p>After looking around a bit more I discovered this gem of a command for nltest to determine which DC will handle a logon request</p>
<p>C:\&gt;nltest /whowill:Domain Account</p>
<p><span style="color: #3366ff;">[16:32:45] Mail message 0 sent successfully (\MAILSLOT\NET\GETDC579)<br />
[16:32:45] Response 0: DC2 D:Domain A:Account (Act found)<br />
The command completed successfully</span></p>
<p>Even though this command returned &laquo;act found&raquo; it was returning from DC2.  (I dont exactly understand why the same account would authenticate against 2 different DC's based on a local desktop login or a SQL login but it apparently can)</p>
<p>After asking the AD guys about DC2 the light bulbs apparently went off for them as that server actually exists behind a different set of firewalls, in a totally different location. While DC2 would return a ping, the console wouldn't allow logons for some reason. After a quick reboot of DC2, and some magic AD pixie dust (I am not an AD admin, if it wasn't totally obvious from my newfound friend nltest) the windows Id's that were having trouble started authenticating against DC3 and our SSPI errors went away.</p>
<p>Interesting tidbit -- During troubleshooting, I found that this particular SQL Server was authenticating accounts against at least 5 different DC's. Some of this might be expected since there are different domains at play but, I haven't heard a final answer from the AD guys about whether it should work that way.</p>
<h4>The solution</h4>
<p>Reboot the misbehaving DC, of course there may be other ways to fix this by redirecting requests to a different DC without a reboot but, since it was misbehaving anyway, and the AD experts wanted to reboot so we went with that. A reboot of SQL would have likely solved this problem too but, I hate reboot fixes of issues, they always seem to come back!</p>
<p>
<strong>Related posts</strong>:
<br /><a href="http://www.allenkinsel.com/archive/2010/03/whose-got-my-dac/" title="Permanent link to this post">Whose got my DAC?</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/02/sql-active-directory-user-id-sid-mismapings/" title="Permanent link to this post">SQL Active Directory User ID SID Mismapings</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/04/allowing-effective-developer-access-to-sql-server/" title="Permanent link to this post">Allowing effective developer access to SQL Server</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/01/using-aliases-in-sql-server/" title="Permanent link to this post">Using Aliases with SQL Server</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/05/special-houston-area-sql-server-group-meeting/" title="Permanent link to this post">Special Houston Area SQL Server group meeting</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenkinsel.com/archive/2010/06/sql-server-and-sspi-handshake-failed-error-hell/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Whose got my DAC?</title>
		<link>http://www.allenkinsel.com/archive/2010/03/whose-got-my-dac/</link>
		<comments>http://www.allenkinsel.com/archive/2010/03/whose-got-my-dac/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 15:08:00 +0000</pubDate>
		<dc:creator>Allen Kinsel</dc:creator>
				<category><![CDATA[Connections]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Syndicated]]></category>
		<category><![CDATA[DAC]]></category>
		<category><![CDATA[Error]]></category>

		<guid isPermaLink="false">http://www.allenkinsel.com/archive/2010/03/whose-got-my-dac/</guid>
		<description><![CDATA[What is the DAC?
The Dedicated Admin Connection, Commonly called the DAC is used to manage SQL Server when a regular connection wont succeed.  Here's what SQL Books Online (BOL) has to say about the DAC &#171;This diagnostic connection allows an administrator to access SQL Server to execute diagnostic queries and troubleshoot problems even when SQL [...]]]></description>
			<content:encoded><![CDATA[<h4>What is the DAC?</h4>
<p>The Dedicated Admin Connection, Commonly called the DAC is used to manage SQL Server when a regular connection wont succeed.  Here's what SQL Books Online (BOL) has to say about the DAC &laquo;This diagnostic connection allows an administrator to access SQL Server to execute diagnostic queries and troubleshoot problems even when SQL Server is not responding to standard connection requests.&raquo;</p>
<h4>DAC Errors</h4>
<p>Occasionally, while troubleshooting SQL servers in a large environment, especially one thats managed from many different geographic locations you could come up with this error, if more than 1 person is using the DAC.  It should also be noted this only happens if you have remote DAC enabled in your environment</p>
<p><span style="font-size: x-small; color: #ff0000;">Error 17810</span></p>
<p><span style="font-size: x-small; color: #ff0000;">Could not connect because the maximum number of '1' dedicated administrator connections already exists. Before a new connection can be made, the existing dedicated administrator connection must be dropped, either by logging off or ending the process. [CLIENT: 127.0.0.1]</span></p>
<p>Since I could still connect with a regular connection currently, I set out looking for a query to determine who was using the DAC connection.  I whipped this up, and since I couldnt find anything in search, I thought id blog it</p>
<p>select conn.session_id, sess.login_name, sess.nt_domain, sess.nt_user_name, conn.connect_time, conn.last_read, conn.last_write, sess.host_name, conn.client_net_address<br />
    from sys.dm_exec_connections conn<br />
    join sys.endpoints edp<br />
        on conn.endpoint_id = edp.endpoint_id<br />
    join sys.dm_exec_sessions sess<br />
        on sess.session_id = conn.session_id   <br />
    where edp.is_admin_endpoint = 1</p>
<p>This should return everything you need to know about who is using your DAC connection so you can ask them to disconnect, or KILL their connection.</p>
<p>
<strong>Related posts</strong>:
<br /><a href="http://www.allenkinsel.com/archive/2010/02/sql-active-directory-user-id-sid-mismapings/" title="Permanent link to this post">SQL Active Directory User ID SID Mismapings</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/01/using-aliases-in-sql-server/" title="Permanent link to this post">Using Aliases with SQL Server</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/03/convincing-your-boss-to-pay-for-your-training/" title="Permanent link to this post">Convincing your boss to pay for your training</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/02/accessing-top-quality-training/" title="Permanent link to this post">Accessing Top Quality Training</a>
<br /><a href="http://www.allenkinsel.com/archive/2010/02/sql-windows-clustering-stupidity/" title="Permanent link to this post">SQL/Windows Clustering Stupidity</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenkinsel.com/archive/2010/03/whose-got-my-dac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
