<?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>Connection Issue - Techyaz.com</title>
	<atom:link href="https://techyaz.com/tag/connection-issue/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Sun, 09 Apr 2023 08:23:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>Connection Issue - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Change Session Timeout for Availability Group Replica</title>
		<link>https://techyaz.com/sql-server/alwayson/change-session-timeout-for-availability-group-replica/</link>
					<comments>https://techyaz.com/sql-server/alwayson/change-session-timeout-for-availability-group-replica/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Staff]]></dc:creator>
		<pubDate>Thu, 22 Jul 2021 17:44:39 +0000</pubDate>
				<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[Connection Issue]]></category>
		<category><![CDATA[connectivity Issue]]></category>
		<category><![CDATA[HowTO]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2615</guid>

					<description><![CDATA[<p>Sometimes we get alwayson connection timeout errors on availability group replicas. Always on Connection timeout or alwayson session timeout is same and must be configured as per Microsoft recommendation. SQL Server Session timeout for availability replica is the time (in&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/change-session-timeout-for-availability-group-replica/">How to Change Session Timeout for Availability Group Replica</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Sometimes we get alwayson connection timeout errors on availability group replicas. Always on Connection timeout or alwayson session timeout is same and must be configured as per Microsoft recommendation. SQL Server Session timeout for availability replica is the time (in seconds) an availability replica will wait to get a ping response from connected replica before considering the connection as failed. </p>



<p>The connection timeout setting in AOAG applies only to identified secondary replica and its respective primary replica. Each secondary replica has its different session timeout value which works between the given replica and its primary replica. The default value for session timeout configuration is 10 seconds. Microsoft recommends to keep this setting value to 10 seconds or more to prevent system missing pings and false failure alerts.</p>



<h2 class="wp-block-heading">Change Session Timeout for Availability Replica</h2>



<p>This section will explain how to change or modify connection or session timeout value for an AOAG availability replica. This is needed sometimes if you are frequently getting connection timeout errors for your availability replicas. I will show two ways to modify session timeout in always on availability group. One is by using SQL Server Management Studio and another one by using T-SQL statement.</p>



<h3 class="wp-block-heading">Modify Alwayson Connection Timeout using SQL Server Management Studio</h3>



<p>Make sure you have connected to your SQL Server Instance which is hosting primary replica of always on availability group configuration. Follow below steps to change session timeout or connection timeout for identified availability replica where you are facing connection timeout errors 35206 or 35201.</p>



<ul class="wp-block-list"><li>Launch SQL Server Management Studio and connect to the primary replica</li><li>Expand folders once you connected to the primary replica instance. Click at plus sign to expand Always on High Availability node followed by Availability Groups node.</li><li>Identify and click the availability group for which you have to configure connection timeout for one of its availability replica</li><li>Identify the availability replica for which you have to change this value. Right click at this replica and click at Properties option to launch its properties page</li><li>You can see Session timeout (seconds)&nbsp;option In the&nbsp;Availability Replica Properties&nbsp;dialog box. Use Session timeout (seconds)&nbsp;option to change the number of seconds for the session timeout period on this replica. Always keep it 10 or more as per your specific need. </li></ul>



<p>We have successfully changed alwayson connection timeout for an availability replica using SQL Server management studio in above steps. Now, i will show you T-SQL approach to get this done in below section.</p>



<h3 class="wp-block-heading">Change Alwayson Connection Timeout using T-SQL Statement</h3>



<p>Here, i will show you how to change session timeout for an availability replica using T-SQL statement.</p>



<ul class="wp-block-list"><li>Launch SQL Server Management Studio and connect to the primary replica.</li><li>Open New Query window and run below ALTER AVAILABILITY GROUP statement.</li></ul>



<p class="has-text-align-left has-black-color has-text-color"><strong>ALTER AVAILABILITY GROUP&nbsp;<em>group_name</em></strong></p>



<p class="has-text-align-left has-black-color has-text-color"><strong>MODIFY REPLICA ON &#8216;<em>instance_name</em>&#8216; WITH ( SESSION_TIMEOUT =<em>seconds</em>&nbsp;)</strong></p>



<p>Make sure to replace <em>group_name</em> with your availability group name, <em>instance_name</em> with your secondary replica name for which you want to change session timeout value and <em>seconds</em> with appropriate time in seconds.</p>



<p>Once you will execute above statement, connection timeout value will change as per your specified value for your availability replica. Now, you can go ahead and monitor the connection timeout errors to see whether your issue has been fixed or not.</p>



<p>Here, i have explained how to modify or change session timeout for an always on availability group replica.</p>



<p><strong><em>Read More:</em></strong></p>



<ul class="wp-block-list"><li><strong><a href="https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-alwayson-interview-questions-answers/" target="_blank" rel="noreferrer noopener">SQL Server Alwayson Interview Questions &amp; Answers</a> </strong></li><li><strong><a href="https://techyaz.com/sql-server/alwayson/fix-alwayson-error-35250-joining-database-secondary-replica-resulted-error/" target="_blank" rel="noreferrer noopener">SQL Server Alwayson Error 35250: Joining database on Secondary Replica resulted in an error</a> </strong></li><li><strong><a href="https://techyaz.com/sql-server/alwayson/understanding-sql-server-backup-databases-availability-group/" target="_blank" rel="noreferrer noopener">Understanding Backup Preferences for AlwaysOn Availability Group Databases</a></strong></li></ul>



<p></p>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/change-session-timeout-for-availability-group-replica/">How to Change Session Timeout for Availability Group Replica</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/alwayson/change-session-timeout-for-availability-group-replica/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix SQL Server Error 53: Could not open a connection on SQL Server</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 17 Jan 2018 14:37:43 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Connection Issue]]></category>
		<category><![CDATA[connectivity Issue]]></category>
		<category><![CDATA[SQL Server Configuration Manager]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1506</guid>

					<description><![CDATA[<p>Today, I will explain how to fix SQL Server error 53 (The network path was not found). The details about SQL error 53 are given as “A network-related or instance specific error occurred while establishing a connection to SQL Server.&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/">Fix SQL Server Error 53: Could not open a connection on SQL Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today, I will explain how to fix SQL Server error 53 (The network path was not found). The details about SQL error 53 are given as “<em><span style="color: #ff0000;">A network-related or instance specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible verify that the instance name is correct and that SQL Server is configured to allow remote connections. (Provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection on SQL Server) (Microsoft SQL Server, Error : 53)</span>”</em></p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1508" src="http://techyaz.com/wp-content/uploads/2018/01/error-53-min.jpg" alt="SQL Server error 53" width="629" height="233" srcset="https://techyaz.com/wp-content/uploads/2018/01/error-53-min.jpg 629w, https://techyaz.com/wp-content/uploads/2018/01/error-53-min-300x111.jpg 300w" sizes="(max-width: 629px) 100vw, 629px" /></p>
<p>You can also get below error similar to error 53 under below details.</p>
<p><span style="color: #ff0000;"><em>An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server) (.Net SqlClient Data Provider)</em></span></p>
<h4><span style="color: #333399;">Root Cause</span></h4>
<p>Microsoft SQL Server Error 53 looks very much like the <a href="http://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/" target="_blank" rel="noopener">Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server</a> at first look. Like SQL Server error 40, here also SQL Server client cannot connect to the SQL Server Instance. This error could occur because either the client cannot resolve the name of the server or the name of the server is incorrect.</p>
<p>You might get this issue due to other reasons as well although main reason is the wrong server name or port name. I have given all those possible reasons behind the Microsoft SQL Server error 53 in below points.</p>
<ol>
<li>Wrong SQL Server Instance name while establishing database connection.</li>
<li>Entering wrong port no can be one of the reason for SQL Server error 53.</li>
<li>SQL Server Instance is not accessible due to firewall or any reason.</li>
<li>Telnet port 1433 or port no on which SQL Server is running. These ports might be blocked.</li>
<li>TCP/IP or Named Pipes protocol is disabled in SQL Server Configuration Manager.</li>
<li>Remote Connection is disabled for this SQL Server Instance.</li>
<li>SQL Server Browser service is stopped.</li>
</ol>
<h4><span style="color: #333399;">Solution</span></h4>
<p>We need to check and validate multiple factors to rectify Microsoft SQL Server error 53. Check all factors given in below step by step points to fix all possibilities for this error.</p>
<ol>
<li>Sometimes, we enter wrong server details by mistake. Make sure to enter <strong>correct SQL Server instance name</strong> while making database connection otherwise you will face sql error 53.</li>
<li>Try to connect using <strong>ip address</strong> and <strong>port number</strong> instead of putting server name in connection string.</li>
<li>Make sure <strong>SQL Server services</strong> are running fine and its accessible.</li>
<li><strong>Check firewall</strong> details. Firewall should open between your client machine and database server. Port 1433 and 1434 should be enabled. Telnet both ports to make sure ports are open.</li>
<li>Make sure to enable <strong>TCP/IP </strong>and <strong>Named Pipes. </strong>Launch <strong>SQL Server Configuration Manager</strong>. Expand <strong>SQL Server Network Configuration</strong> from left side pane and click on <strong>Protocols for MSSQLSERVER</strong>. MSSQLSERVER is SQL Server Instance name. Now you will see all protocols in to right side pane. Right click on given protocols and select <strong>Enable</strong> button to enable both protocols.</li>
<li><strong>Check TCP/IP</strong> name resolution, you can use the <strong>ping </strong>command in the Windows operating system. You can also right-click on <strong>TCP/IP</strong> and select <strong>Properties </strong>in SQL Server Configuration Manager. Verify that, under IP2, the IP Address is set to the computer&#8217;s IP address on the local subnet. Scroll down to <strong>IPAll</strong>. Make sure that <strong>TCP Dynamic Ports</strong> is blank. Make sure that TCP Port is set to 1433 or your identified port no.</li>
<li>Remote connection must be enabled to connect to databases remotely. Connect to SQL Server Instance in SSMS. Right click on <strong>SQL Server instance name </strong>in SSMS and choose <strong>Properties</strong>. You will get Server properties window. Click on <strong>Connections </strong>from left side pane and tick the check box on <strong>Allow remote connections to this server</strong> option from right side pane.</li>
<li>SQL browser service should not be stopped if your security policy allows it. If you have disabled this service to apply hardening then make sure to pass port no along with SQL Server instance name/IP while making database connection.</li>
</ol>
<p>You can fix SQL error 53 by applying above solutions on your SQL Server instance. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><strong><em><span style="color: #800000;">Related Articles:</span></em></strong></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/" target="_blank" rel="noopener">Fix Error 28 &#8211; Server doesn&#8217;t support requested protocol</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/" target="_blank" rel="noopener">Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-4064-cannot-open-user-default-database-login-failed/" target="_blank" rel="noopener">Error 4064: Cannot open user default database. Login failed.</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-15138-error-3729/" target="_blank" rel="noopener">Fix Login Drop issue Error 15138 and Error 3729</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/">Fix SQL Server Error 53: Could not open a connection on SQL Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server.</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 06:14:45 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Connection Issue]]></category>
		<category><![CDATA[connectivity Issue]]></category>
		<category><![CDATA[SQL Server Configuration Manager]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1459</guid>

					<description><![CDATA[<p>Today, a user has raised a request to fix an error (Microsoft SQL Server Error 40 &#8211; Could not open a connection to SQL Server or Microsoft SQL Server, Error 2) he was getting while establishing the database connection. Sometimes you might&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/">SQL Server Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today, a user has raised a request to fix an error (Microsoft <em>SQL Server Error 40 &#8211; Could not open a connection to SQL Server or Microsoft SQL Server, Error 2</em>) he was getting while establishing the database connection. Sometimes you might get this error with text<span style="color: #000000;"> ( <em>provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server).</em></span></p>
<p>The error details are given below.</p>
<p><em><span style="color: #ff0000;">A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error:40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)</span></em></p>
<p>Below is the screenshot of above Microsoft SQL Server error 40.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1461" src="http://techyaz.com/wp-content/uploads/2018/01/error-40-min.jpg" alt="error 40" width="627" height="312" srcset="https://techyaz.com/wp-content/uploads/2018/01/error-40-min.jpg 627w, https://techyaz.com/wp-content/uploads/2018/01/error-40-min-300x149.jpg 300w" sizes="(max-width: 627px) 100vw, 627px" /></p>
<p>Sometimes, we get same error under below error text.</p>
<p><span style="color: #ff0000;"><em>An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server) (.Net SqlClient Data Provider)</em></span></p>
<h3><span style="color: #333399;">Microsoft SQL Server Error 40 &#8211; </span><span style="color: #333399;">Root Cause</span></h3>
<p>We get SQL error 40 because SQL Server did not respond to the client request. This issue occurs due to multiple reasons. I have given all those possible reasons behind Microsoft SQL Server error 40 in below points.</p>
<ol>
<li>Server is probably not started and shutdown.</li>
<li>SQL Server Service is down.</li>
<li>SQL Server Instance is not accessible due to firewall or any reason.</li>
<li>Telnet port 1433 or port no on which SQL Server is running. These ports might be blocked.</li>
<li>TCP/IP or Named Pipes protocol is disabled in SQL Server Configuration Manager.</li>
<li>Remote Connection is disabled for this SQL Server Instance.</li>
<li>SQL Server browser service is stopped.</li>
<li>Wrong SQL Server Instance name while establishing database connection</li>
</ol>
<h3><span style="color: #333399;">Solution</span></h3>
<p>We need to check and validate multiple factors to rectify Microsoft SQL Server error 40. Check all factors given in below step by step points to fix all possibilities for this error.</p>
<ol>
<li>Make sure that database server is up and running fine.</li>
<li>Make sure SQL Server services are running fine and its accessible.</li>
<li>Check firewall details. Firewall should open between your client machine and database server.</li>
<li>Port 1433 and 1434 should be enabled. Telnet both ports to make sure ports are open.</li>
<li>Make sure to enable <strong>TCP/IP</strong> and <strong>Named Pipes</strong> protocols. Launch <strong>SQL Server Configuration Manager</strong>. Expand <strong>SQL Server Network Configuration</strong> from left side pane and click on <strong>Protocols for MSSQLSERVER</strong>. MSSQLSERVER is SQL Server Instance name. Now you will see all protocols in to right side pane. Right click on given protocols and select <strong>Enable</strong> button to enable both protocols.</li>
<li>Remote connection must be enabled to connect to databases remotely. Connect to SQL Server Instance in SSMS. Right click on <strong>SQL Server instance name</strong> in SSMS and choose <strong>Properties</strong>. You will get Server properties window. Click on <strong>Connections</strong> from left side pane and tick the check box on <strong>Allow remote connections to this server</strong> option from right side pane.</li>
<li>SQL browser service should not be stopped if your security policy allows it. If you have disabled this service to apply hardening then make sure to pass port no along with SQL Server instance name while making database connection.</li>
<li>Sometimes, we enter wrong server details. Make sure to enter correct SQL Server instance name while making database connection.</li>
</ol>
<p><em><strong><span style="color: #800000;">Related Articles</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/" target="_blank" rel="noopener noreferrer">Fix Error 28 &#8211; Server doesn&#8217;t support requested protocol</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fixing-error-233-how-to-set-the-user-connections-server-configuration-option-in-sql-server/" target="_blank" rel="noopener noreferrer">Fix Error 233: How to set user connections server configuration in SQL Server?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-4064-cannot-open-user-default-database-login-failed/" target="_blank" rel="noopener noreferrer">Error 4064: Cannot open user default database. Login failed.</a></strong></li>
</ul>
<p>Here, I have given different solutions to fix sql error 40 in SQL Server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/">SQL Server Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix SQL Server Error 18456: Login failed for user &#8216;User_Name&#8217;.</title>
		<link>https://techyaz.com/sql-server/troubleshooting/login-failed-user_name-microsoft-sql-server-error-18456/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/login-failed-user_name-microsoft-sql-server-error-18456/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sun, 24 Dec 2017 07:42:29 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Connection Issue]]></category>
		<category><![CDATA[connectivity Issue]]></category>
		<category><![CDATA[login failed]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1377</guid>

					<description><![CDATA[<p>Yesterday, a developer has reported an SQL Server error 18456 Login failed for user ‘username’. (Microsoft SQL Server, Error: 18456) on one of the SQL Server instance that are running in lower life cycle. The details about SQL Server error&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/login-failed-user_name-microsoft-sql-server-error-18456/">Fix SQL Server Error 18456: Login failed for user &#8216;User_Name&#8217;.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Yesterday, a developer has reported an SQL Server error 18456 <strong><em>Login failed for user ‘username’. (Microsoft SQL Server, Error: 18456)</em></strong> on one of the SQL Server instance that are running in lower life cycle. The details about SQL Server error 18456 are given below with the screenshot.</p>
<p><em><span style="color: #ff0000;">Cannot Connect to ‘SERVERNAME’.</span></em><br />
<em><span style="color: #ff0000;"> Login failed for user ‘username’. (Microsoft SQL Server, Error: 18456)</span></em></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1379" src="http://techyaz.com/wp-content/uploads/2017/12/error-18456.png" alt="error 18456" width="626" height="321" srcset="https://techyaz.com/wp-content/uploads/2017/12/error-18456.png 626w, https://techyaz.com/wp-content/uploads/2017/12/error-18456-300x154.png 300w" sizes="(max-width: 626px) 100vw, 626px" /></p>
<h3><span style="color: #333399;"><strong>SQL Server Error 18456 &#8211; </strong></span><span style="color: #333399;"><strong>Login failed  </strong></span></h3>
<p>Initially, I thought <em>login failed</em> SQL <em>error 18456 </em>was reported because user might have entered wrong password, but when I tried it with correct password, it displayed same error again. Read this article to fix this error.</p>
<p>When I received same MSSQL error 18456 even after entering correct login id and password then we have decided to check the server authentication mode configured for this instance. Here we got the answer because this SQL Server instance was configured to run in only Windows Authentication mode, that is why SQL Server database engine was not allowing us to login using SQL Server login that comes in to Mixed authentication mode.</p>
<p>As we know there are two types of authentication mode in SQL Server.</p>
<ol>
<li>Windows Authentication Mode</li>
<li>SQL Server and Windows Authentication Mode (Mixed Authentication Mode)</li>
</ol>
<p>Only windows login accounts can connect to SQL Server if your instance is configured in Windows Authentication mode but when Mixed Authentication mode is configured you can connect using windows and SQL Server logins both way.</p>
<h3><span style="color: #333399;"><strong>Solution</strong></span></h3>
<p>So, to fix this SQL Server error 18456 ( <em>Login failed error 18456 ),</em> we have two options:</p>
<ol>
<li>Either Change Server Authentication mode of this SQL Server Instance to Mixed mode (<strong>SQL Server and Windows Authentication Mode</strong>)</li>
<li>Or, <strong>always use windows login</strong> or Domain login account to connect to SQL Server Instance.</li>
</ol>
<p><em><strong>You can also read the below articles which is a comprehensive guide to fix this error 18456:</strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/how-to-fix-sql-server-error-18456-a-comprehensive-guide/" target="_blank" rel="noopener">How to Fix SQL Server Error 18456: A Comprehensive Guide</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/failed-to-open-the-explicitly-specified-database/" target="_blank" rel="noopener">Fix SQL Error 18456: failed to open the explicitly specified database</a></strong></li>
</ul>
<p>Now, let&#8217;s come back to this specific issue. Here, we have decided to change the Server Authentication mode from Windows Authentication to Mixed mode authentication. Below are the steps:</p>
<ol>
<li>Right click on <strong>SQL Server Instance</strong> name in SSMS and choose <strong>properties</strong>.</li>
<li>Select <strong>Security</strong> from left side pane.</li>
<li>You can see Server Authentication mode is set to <strong>Windows Authentication</strong> mode in below screenshot.<br />
<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1380" src="http://techyaz.com/wp-content/uploads/2017/12/Authentication-Mode.jpg" alt="Set Authentication Mode to Mixed mode" width="711" height="635" srcset="https://techyaz.com/wp-content/uploads/2017/12/Authentication-Mode.jpg 711w, https://techyaz.com/wp-content/uploads/2017/12/Authentication-Mode-300x268.jpg 300w" sizes="auto, (max-width: 711px) 100vw, 711px" /></li>
<li>Change this to <strong>SQL Server and Windows Authentication</strong> mode that is second option in above screenshot and click on <strong>OK </strong>button.</li>
<li><strong>Restart SQL Server</strong> and <strong>SQL Server Agent</strong> <strong>services</strong> to apply the changes to database engine.</li>
<li>Now you would be able to login to your SQL Server Instance using SQL logins as well.</li>
</ol>
<p>Here, i have shown you how to fix a SQL Server error 18456 by changing its authentication mode. Read more articles in related section given below.</p>
<p><em><strong><span style="color: #800000;">Related Articles</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-15170/" target="_blank" rel="noopener noreferrer">Fix Error 15170: Login owns one or more Agent Jobs</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-4064-cannot-open-user-default-database-login-failed/" target="_blank" rel="noopener noreferrer">Fix Login failed Error 4064: Cannot open user default database</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/" target="_blank" rel="noopener noreferrer">How to fix error 28 &#8211; Server doesn&#8217;t support requested protocol</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-18452-login-failed-login-from-untrusted-domain/" target="_blank" rel="noopener noreferrer">Fix Error 18452: Login Failed</a></strong></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/login-failed-user_name-microsoft-sql-server-error-18456/">Fix SQL Server Error 18456: Login failed for user &#8216;User_Name&#8217;.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/login-failed-user_name-microsoft-sql-server-error-18456/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Fix: SQL Network Interfaces Error 28 – Server doesn’t support requested protocol</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 19 Dec 2017 15:00:52 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Connection Issue]]></category>
		<category><![CDATA[connectivity Issue]]></category>
		<category><![CDATA[SQL Server Configuration Manager]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1361</guid>

					<description><![CDATA[<p>Today I am going to discuss about Microsoft SQL Server Error 28 that most of the SQL Server users might have faced at least once in their career. It belongs to SQL Server connectivity issue SQL Network Interfaces Error 28.&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/">Fix: SQL Network Interfaces Error 28 – Server doesn’t support requested protocol</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today I am going to discuss about Microsoft SQL Server Error 28 that most of the SQL Server users might have faced at least once in their career. It belongs to SQL Server connectivity issue SQL Network Interfaces Error 28.</p>
<h3><span style="color: #333399;">Microsoft SQL Server Error 28</span></h3>
<p>This is very common error that most of the people have gone through. Microsoft SQL Server Error 28 details are given below:</p>
<div><em><span style="color: #ff0000;">An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 28 &#8211; Server doesn&#8217;t support requested protocol) (Microsoft SQL Server, Error: -1)</span></em></div>
<p>Sometime you might get same error as below description.</p>
<div><em><span style="color: #ff0000;">A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 28 – Server doesn’t support requested protocol)</span></em></div>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1363" src="http://techyaz.com/wp-content/uploads/2017/12/error-28.png" alt="SQL Network Interfaces error 28" width="642" height="200" srcset="https://techyaz.com/wp-content/uploads/2017/12/error-28.png 607w, https://techyaz.com/wp-content/uploads/2017/12/error-28-300x93.png 300w" sizes="auto, (max-width: 642px) 100vw, 642px" /></p>
<h3><span style="color: #333399;">Root Cause</span></h3>
<p>Generally, we get <em>SQL Network Interfaces Error 28</em> while connecting to SQL Server instance either using SQL Server Management studio or using any other way. There might be several reasons behind generating Microsoft SQL Server Error 28. I have tried to capture all such reasons in below points..</p>
<ul>
<li>A specified SQL Server instance name is not valid. Wrong SQL Server Instance Name can lead to generate Microsoft SQL Server Error 28.</li>
<li>Remote access is not enabled for your SQL Server instance.</li>
<li>The firewall on the server has refused the connection because ports used by SQLBROWSER.EXE and SQLSERVR.EXE is still blocked.</li>
<li>The SQL Server Browser service (sqlbrowser) is not started.</li>
</ul>
<h3><span style="color: #333399;">Solution</span></h3>
<p>We need to check and validate multiple factors to fix Microsoft SQL Server error 28. Check all factors given in below step by step points to fix all possibilities for this SQL error 28.</p>
<ul>
<li>Validate whether server on which SQL Server is hosted is reachable from your client machine or not. Run ping and telnet to make sure server connectivity.</li>
<li>Make sure SQL Server is running fine on your server. Check SQL Server services.</li>
<li>Firewall ports 1433 for SQL Server and 1434 for SQL Server Browser services should be opened.</li>
<li>Verify correct SQL Server Instance name. Check the spelling of the SQL Server instance name that is specified in the connection string.</li>
<li>Make sure to enter full SQL Server Instance name in case you have named instance like SERVERNAME\SQL2017.</li>
<li>Make sure that the SQL Server Browser service is started on the server.</li>
<li>Enable Remote connection for your SQL Server Instance. Most of the people face Microsoft SQL Server error 28 because remote connection was disabled on the SQL Server Instance. Use the SQL Server Configuration Manager tool to enable SQL Server to accept remote connections over the TCP or named pipes protocols. Below steps you can follow to enable remote connections.</li>
</ul>
<ol>
<li>Launch <strong>SQL Server Configuration Manager</strong>. Expand <strong>SQL Server Network Configuration</strong> from left side pane and then click <strong>Protocols for </strong><em>InstanceName</em>. If your server has default instance then it will look like “<strong>Protocols for MSSQLSERVER</strong>”</li>
<li>You can see all three protocols in right side pane. <strong>Shared Memory, Named Pipes and TCP/IP.</strong></li>
<li>Make sure to enable <strong>Named Pipes and TCP/IP. </strong>Right-click at the protocol name and then click <strong>Enable</strong>. The icon for the protocol will change to show that the protocol is enabled.</li>
<li>You need to restart the SQL Server services to bring the changes into effect so restart your SQL Server services.</li>
</ol>
<p><em><strong><span style="color: #800000;">Related Articles</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/" target="_blank" rel="noopener">Fix SQL Server Error 40: A Network related or Instance specific Error Occurred while establishing a connection to SQL Server</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/" target="_blank" rel="noopener">How to Fix SQL Server Error 53: Could Not Open a Connection on SQL Server?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-4064-cannot-open-user-default-database-login-failed/" target="_blank" rel="noopener">Fix Error 4064: Cannot open user default database</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fixing-sap-connectivity-issue-aoag-automatic-failover/" target="_blank" rel="noopener">SAP Connectivity Issue After AlwaysON Automatic failover</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-976/" target="_blank" rel="noopener">Fix Error 976: Cannot connect to Secondary Replica of AOAG</a></strong></li>
</ul>
<p>Here, i have shown you how to fix sql error 28. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/">Fix: SQL Network Interfaces Error 28 – Server doesn’t support requested protocol</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Fix SQL Server Error 976: Cannot connect to Secondary Replica of AlwaysON Availability Group</title>
		<link>https://techyaz.com/sql-server/alwayson/fix-error-976/</link>
					<comments>https://techyaz.com/sql-server/alwayson/fix-error-976/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 13 Sep 2017 10:00:51 +0000</pubDate>
				<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[Database Mirroring]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[AOAG]]></category>
		<category><![CDATA[Connection Issue]]></category>
		<category><![CDATA[connectivity Issue]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[logins]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=883</guid>

					<description><![CDATA[<p>Today an application user has reported that he is not able to connect to the secondary replica of AlwaysOn Availability Group configuration. The details about error Microsoft SQL Server 976 that he was getting is given below. Cannot connect to&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/fix-error-976/">Fix SQL Server Error 976: Cannot connect to Secondary Replica of AlwaysON Availability Group</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today an application user has reported that he is not able to connect to the secondary replica of <a href="https://techyaz.com/sql-server/alwayson-availability-group/" target="_blank" rel="noopener">AlwaysOn Availability Group</a> configuration. The details about error Microsoft SQL Server 976 that he was getting is given below.</p>
<p><span style="color: #ff0000;"><strong><em>Cannot connect to &#8216;Secondary Replica Server&#8217;.<br />
ADDITIONAL INFORMATION:<br />
</em></strong><em>The target database, &#8216;SDGC&#8217;, is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access. To allow read-only access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group.  For more information, see the ALTER AVAILABILITY GROUP statement in SQL Server Books Online. (Microsoft SQL Server, Error: 976)</em></span></p>
<p>The screenshot of this error is given below.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-884" src="http://techyaz.com/wp-content/uploads/2017/09/1-Error-976.jpg" alt="Error 976" width="614" height="326" srcset="https://techyaz.com/wp-content/uploads/2017/09/1-Error-976.jpg 614w, https://techyaz.com/wp-content/uploads/2017/09/1-Error-976-300x159.jpg 300w" sizes="auto, (max-width: 614px) 100vw, 614px" /></p>
<h3><span style="color: #000080;">Solution</span></h3>
<p>Before going ahead let me give you a background about SQL Server configurations.</p>
<ul>
<li>We have <strong>two SQL Servers Server A &amp; Server B</strong> and there is an user database <strong>SDGC</strong> is hosted on both SQL Server Instances.</li>
<li><strong>AOAG</strong> is configured between both servers in <strong>Automatic failover</strong> mode for database <strong>SDGC</strong>.</li>
<li>Availability database <strong>SDGC </strong>hosted on instance B is <strong>inaccessible</strong> because it was restored in <strong>no recovery mode</strong> and not set in read only mode for AOAG configuration.</li>
<li>User&#8217;s login was created on both SQL Server instances with having default database as <strong>SDGC</strong> that are participating in AOAG.</li>
</ul>
<p>Now, the problem is whenever user tries to connect to the secondary replica whether AOAG is active from instance A or instance B, he is not able to connect to the SQL Server Instance and getting given SQL Server error 976. I analyzed this issue and found two solutions to fix this issue:</p>
<ul>
<li>Change <strong>Connect to database</strong> value in SSMS while establishing the connection.</li>
<li>Change <strong>default database </strong>value of your Login in Login Property window.</li>
</ul>
<p><span style="color: #800000;"><strong>Change Connect to database value in SSMS</strong></span></p>
<p>Launch <strong>SQL Server Management Studio</strong>. Click on <strong>Options</strong> tab of connection details window in SSMS as shown in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-885" src="http://techyaz.com/wp-content/uploads/2017/09/2-connect-using-different-user-Copy.jpg" alt="click on connect button in SSMS" width="397" height="290" srcset="https://techyaz.com/wp-content/uploads/2017/09/2-connect-using-different-user-Copy.jpg 397w, https://techyaz.com/wp-content/uploads/2017/09/2-connect-using-different-user-Copy-300x219.jpg 300w" sizes="auto, (max-width: 397px) 100vw, 397px" /></p>
<p>You can see, <strong>Connect to database</strong> value showing as <strong>default</strong> that means it is connecting to the database that is set as <strong>default database</strong> for user&#8217;s login. Remember, <strong>default database</strong> for user&#8217;s login is set as <strong>SDGC</strong> that is running in <strong>norecovery mode</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-886" src="http://techyaz.com/wp-content/uploads/2017/09/3.0-connect-default-db.jpg" alt="connect to database in ssms" width="374" height="436" srcset="https://techyaz.com/wp-content/uploads/2017/09/3.0-connect-default-db.jpg 374w, https://techyaz.com/wp-content/uploads/2017/09/3.0-connect-default-db-257x300.jpg 257w" sizes="auto, (max-width: 374px) 100vw, 374px" /></p>
<p>Now, we just need to change the <strong>connect to database</strong> value from <strong>default</strong> to <strong>master</strong> or some other database. As <strong>default database</strong> for user&#8217;s login was set to SDGC, so change it master to make database engine to read an accessible database.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-887" src="http://techyaz.com/wp-content/uploads/2017/09/3.5-Change-default-db.jpg" alt="Change connect to database to master in ssms" width="374" height="436" srcset="https://techyaz.com/wp-content/uploads/2017/09/3.5-Change-default-db.jpg 374w, https://techyaz.com/wp-content/uploads/2017/09/3.5-Change-default-db-257x300.jpg 257w" sizes="auto, (max-width: 374px) 100vw, 374px" /></p>
<p>Once you make changes, hit the connect button and establish a database connection. This time you will be able to establish database connection to secondary replica.</p>
<p><span style="color: #800000;"><strong>Change default database value of your Login</strong></span></p>
<p>If <strong>default database</strong> of your login is <strong>not mandatory</strong> to set to <strong>availability database</strong> then you can change it to master and remove this issue permanently. Otherwise, you need to change default database every time you make a connection to secondary replica as discussed in above section.<br />
You can connect to your <strong>secondary replica</strong> or to the server where you are facing this issue using <strong>different admin or security admin account</strong>. If you have such account and password, you don&#8217;t need to logoff and relogin. You can just <strong>right click on SSMS icon</strong> while <strong>pressing SHIFT button</strong> to logged in using different user to the SQL Server instance. You can see that option in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-888" src="http://techyaz.com/wp-content/uploads/2017/09/4-connect-using-different-user.jpg" alt="login using different account" width="451" height="355" srcset="https://techyaz.com/wp-content/uploads/2017/09/4-connect-using-different-user.jpg 451w, https://techyaz.com/wp-content/uploads/2017/09/4-connect-using-different-user-300x236.jpg 300w" sizes="auto, (max-width: 451px) 100vw, 451px" /></p>
<p>Click on &#8220;<strong>Run as different user</strong>&#8221; option. It will display below login screen to enter your new login and password. Enter the credentials.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-889" src="http://techyaz.com/wp-content/uploads/2017/09/5-connect-different-user.jpg" alt="Enter Credentials" width="382" height="329" srcset="https://techyaz.com/wp-content/uploads/2017/09/5-connect-different-user.jpg 382w, https://techyaz.com/wp-content/uploads/2017/09/5-connect-different-user-300x258.jpg 300w" sizes="auto, (max-width: 382px) 100vw, 382px" /></p>
<p>Once your new account will be authenticated, SSMS will be launched and show you the details as shown in below image. Click on <strong>Connect</strong> button to establish the connection.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-890" src="http://techyaz.com/wp-content/uploads/2017/09/6-connect-using-different-user.jpg" alt="connect using different account in ssms" width="397" height="290" srcset="https://techyaz.com/wp-content/uploads/2017/09/6-connect-using-different-user.jpg 397w, https://techyaz.com/wp-content/uploads/2017/09/6-connect-using-different-user-300x219.jpg 300w" sizes="auto, (max-width: 397px) 100vw, 397px" /></p>
<p>Expand <strong>Security</strong> folder. <strong>Identify</strong> your login for which you have to change the default database setting. <strong>Right click</strong> and choose <strong>properties</strong> on this login to launch properties window. You can <strong>double click</strong> on this login as well to launch this properties window. Below window will come to your screen where you can see the default database set for this login.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-891" src="http://techyaz.com/wp-content/uploads/2017/09/7-login.jpg" alt="login property" width="625" height="559" srcset="https://techyaz.com/wp-content/uploads/2017/09/7-login.jpg 625w, https://techyaz.com/wp-content/uploads/2017/09/7-login-300x268.jpg 300w" sizes="auto, (max-width: 625px) 100vw, 625px" /></p>
<p>You can see <strong>default database</strong> is set as <strong>SDGC</strong> in above screenshot. Now we need to <strong>change</strong> it to <strong>master</strong> or any accessible database. Do the changes, you can see i have changed it to master in our screenshot. Once you make changes, click on <strong>Ok</strong> button to proceed.</p>
<p><strong>NOTE:</strong> <em>If you need to change default database back to availability database due to some application dependencies then you need to first make your availability database accessible. You can perform failover to make secondary replica as primary then you can make changes and then you can failback. If you don&#8217;t want to perform failover/failback, then you can do this by changing the availability database from norecovery to read only mode.</em></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-892" src="http://techyaz.com/wp-content/uploads/2017/09/8-login.jpg" alt="login property" width="621" height="547" srcset="https://techyaz.com/wp-content/uploads/2017/09/8-login.jpg 621w, https://techyaz.com/wp-content/uploads/2017/09/8-login-300x264.jpg 300w" sizes="auto, (max-width: 621px) 100vw, 621px" /></p>
<p>Now your <strong>issue is fixed. </strong>You would be able to connect to the SQL Server Instance that are running as secondary replica in AOAG configuration.  You can see, i have connected to secondary replica using same account with whom i was facing issue.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-893" src="http://techyaz.com/wp-content/uploads/2017/09/9-connect-using-samelogin.jpg" alt="" width="419" height="452" srcset="https://techyaz.com/wp-content/uploads/2017/09/9-connect-using-samelogin.jpg 419w, https://techyaz.com/wp-content/uploads/2017/09/9-connect-using-samelogin-278x300.jpg 278w" sizes="auto, (max-width: 419px) 100vw, 419px" /></p>
<p><span style="color: #800000;"><em><strong>Related Articles:</strong></em></span></p>
<ul>
<li style="list-style-type: none;">
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-19471-listener-issue-that-came-during-configuring-sql-server-alwayson-availability-group/" target="_blank" rel="noopener">Fix Error 19471: Listener Issue during Configuring AOAG</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fixing-sap-connectivity-issue-aoag-automatic-failover/" target="_blank" rel="noopener">How to Fix SAP connectivity issue after AOAG failover</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/secondary-replica-not-coming-online-showing-resolving-state-automatic-failover-alwayson-availability-group-configuration/" target="_blank" rel="noopener">Fix: Secondary Replica is showing in Resolving state</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/fix-error-15141-server-principal-owns-one-endpoints-cannot-dropped/" target="_blank" rel="noopener">Fix SQL Server Error 15141: Server Principal owns one or more endpoints</a></strong></li>
</ul>
</li>
</ul>
<p>Please comment us to give your feedback. I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook page</a> and on <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/fix-error-976/">Fix SQL Server Error 976: Cannot connect to Secondary Replica of AlwaysON Availability Group</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/alwayson/fix-error-976/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Fix PuTTY Connection Issue Network error: Connection timed out</title>
		<link>https://techyaz.com/rhel/fix-putty-network-error-connection-timed/</link>
					<comments>https://techyaz.com/rhel/fix-putty-network-error-connection-timed/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 28 Aug 2017 10:58:08 +0000</pubDate>
				<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[Connection Issue]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PuTTY]]></category>
		<category><![CDATA[PuTTY fatal error]]></category>
		<category><![CDATA[RHEL]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=679</guid>

					<description><![CDATA[<p>I explained how to installed RedHat Linux on a virtual machine in my last article. I was not able to connect to this Linux server from PuTTY terminal that was installed on my host machine.  Everytime i tried to connect&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/rhel/fix-putty-network-error-connection-timed/">How to Fix PuTTY Connection Issue Network error: Connection timed out</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I explained <a href="https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-red-hat-enterprise-linux/" target="_blank" rel="noopener">how to installed RedHat Linux on a virtual machine</a> in my last article. I was not able to connect to this Linux server from PuTTY terminal that was installed on my host machine.  Everytime i tried to connect to Linux server i got &#8220;<strong>Network error: Connection timed out</strong>&#8220;. Here I will explain how to fix this connection issue &#8220;<strong>Network error: Connection timed out</strong>&#8221;</p>
<h3><span style="color: #000080;"><strong>Network error: Connection timed out</strong></span></h3>
<p>I faced this issue during making connection to Linux virtual machine from PuTTY terminal that is running on host computer. I got below error during this operation. When i tried to <strong>ping</strong> the Linux virtual machine from host it was failed and shown <strong>request timeout</strong>.</p>
<div class="codediv"><span class="kwrd" style="color: red;">PuTTY Fatal Error<br />
Network error: Connection timed out<br />
</span></div>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-680" src="http://techyaz.com/wp-content/uploads/2017/08/1-network-issue.jpg" alt="Putty fatal error network error" width="507" height="286" srcset="https://techyaz.com/wp-content/uploads/2017/08/1-network-issue.jpg 507w, https://techyaz.com/wp-content/uploads/2017/08/1-network-issue-300x169.jpg 300w" sizes="auto, (max-width: 507px) 100vw, 507px" /></p>
<p>I did some research over internet and found lot of solutions and reason behind this issue. Some people suggested to check and disable all firewalls and some has suggested some other solutions. Most of solutions have failed to fix this issue.</p>
<p>I discussed it with one of my friend who works in VMware domain, he suggested only one solution to check the IPs of host and virtual machine that should be part of same subnet. I apply his solution and it worked. Here i will explain the fix of this issue.</p>
<p>Let&#8217;s check the IP of local host on which Linux virtual machine is hosted. Run <strong>ipconfig</strong> command to get these details.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Check Host IP</span>
ipconfig
</span></strong></pre>
<p>We can see the IP details of the host computer. We can see the range of IP is <strong>192.168.209</strong>.1 &amp; subnet mask is 255.255.255.0</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-681" src="http://techyaz.com/wp-content/uploads/2017/08/2-check-host-ip.jpg" alt="check host ip address" width="807" height="178" srcset="https://techyaz.com/wp-content/uploads/2017/08/2-check-host-ip.jpg 807w, https://techyaz.com/wp-content/uploads/2017/08/2-check-host-ip-300x66.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/2-check-host-ip-768x169.jpg 768w" sizes="auto, (max-width: 807px) 100vw, 807px" /></p>
<p>Now we will check the IP of the Linux virtual machine which we generally give during the installation. Run <strong>ifconfig</strong> command on your Linux machine.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Check Red Hat Linux Server IP</span>
ifconfig
</span></strong></pre>
<p>You can see the IP of this machine is <strong>192.168</strong>.0.1 that belongs to different IP range. This is the main issue behind this error. Our next step to <strong>change the IP of Linux machine</strong> to same IP range under which host is running.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-682" src="http://techyaz.com/wp-content/uploads/2017/08/3-check-server-ip.jpg" alt="check red hat linux server ip" width="679" height="347" srcset="https://techyaz.com/wp-content/uploads/2017/08/3-check-server-ip.jpg 679w, https://techyaz.com/wp-content/uploads/2017/08/3-check-server-ip-300x153.jpg 300w" sizes="auto, (max-width: 679px) 100vw, 679px" /></p>
<h3><span style="color: #000080;"><strong>Solution</strong></span></h3>
<p>The solution of this issue is to change the IP of Linux machine to the same range on which local host is running. We can see the connection interface name is <strong>ens33</strong> from above screenshot. Next step is to <strong>connect to Linux</strong> machine and <strong>set the new IP</strong> for this connection interface name. Run below command to get this done.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Change the IP of connection interface name ens33 to 192.168.209.10.</span>
sudo ifconfig ens33 192.168.209.10 netmask 2555.255.255.0
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-683" src="http://techyaz.com/wp-content/uploads/2017/08/4-change-ip.jpg" alt="change the IP of linux server" width="760" height="72" srcset="https://techyaz.com/wp-content/uploads/2017/08/4-change-ip.jpg 760w, https://techyaz.com/wp-content/uploads/2017/08/4-change-ip-300x28.jpg 300w" sizes="auto, (max-width: 760px) 100vw, 760px" /></p>
<p>We can see command executed successfully. Now we can validate this change by running <strong>ifconfig</strong> again and you can see the IP is changed to <strong>192.168.209.10</strong> now.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-684" src="http://techyaz.com/wp-content/uploads/2017/08/5-check-ip-post-change.jpg" alt="" width="712" height="327" srcset="https://techyaz.com/wp-content/uploads/2017/08/5-check-ip-post-change.jpg 712w, https://techyaz.com/wp-content/uploads/2017/08/5-check-ip-post-change-300x138.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/5-check-ip-post-change-980x450.jpg 980w" sizes="auto, (max-width: 712px) 100vw, 712px" /></p>
<p>Now we can go ahead and connect to this machine from host computer. Launch the PuTTY tool and enter the IP of the Linux virtual machine and click on open button as shown in below screen.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-685" src="http://techyaz.com/wp-content/uploads/2017/08/6-Putty.jpg" alt="PuTTY" width="627" height="551" srcset="https://techyaz.com/wp-content/uploads/2017/08/6-Putty.jpg 627w, https://techyaz.com/wp-content/uploads/2017/08/6-Putty-300x264.jpg 300w" sizes="auto, (max-width: 627px) 100vw, 627px" /></p>
<p>Once you click on open button, another window will come and ask you to choose <strong>Yes</strong> to proceed. Click on Yes button of this screen to proceed. Once you click on Yes button, you will get a login window which ask you to enter a correct login id and password to connect to Linux virtual machine. I did the same and you can see i have successfully connected to the Linux virtual machine from my host computer.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-686" src="http://techyaz.com/wp-content/uploads/2017/08/7-Putty.jpg" alt="login to linux server" width="570" height="165" srcset="https://techyaz.com/wp-content/uploads/2017/08/7-Putty.jpg 570w, https://techyaz.com/wp-content/uploads/2017/08/7-Putty-300x87.jpg 300w" sizes="auto, (max-width: 570px) 100vw, 570px" /></p>
<p>Now issue is fixed and you can do anything as per your requirement on the Linux virtual machine from your host computer using PuTTY terminal.</p>
<p>I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook page</a> and on <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/ubuntu/fix-putty-network-error-connection-refused-connecting-ubuntu-server/" target="_blank" rel="noopener">Fix PuTTY Network Error: Connection Refused While Connecting to Ubuntu Server</a></strong></li>
<li><strong><a href="https://techyaz.com/rhel/change-putty-text-color/" target="_blank" rel="noopener">How to Change PuTTY Text Color?</a></strong></li>
<li><strong><a href="https://techyaz.com/rhel/how-to-change-putty-cursor-color-or-mouse-pointer-color/" target="_blank" rel="noopener">How to Change Putty Cursor or Mouse Pointer Color?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/how-to-change-putty-background-color/" target="_blank" rel="noopener">Change PuTTY Background Color</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/rhel/fix-putty-network-error-connection-timed/">How to Fix PuTTY Connection Issue Network error: Connection timed out</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/rhel/fix-putty-network-error-connection-timed/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
