<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Fix : Error : 40 &#8211; could not open a connection to SQL server.</title>
	<atom:link href="http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stanlei</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-55194</link>
		<dc:creator>Stanlei</dc:creator>
		<pubDate>Tue, 25 Aug 2009 13:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-55194</guid>
		<description>i&#039;ve been trying this for days and i just dont know what the problem
is ...

im using:

private string conns = &quot;Data Source = &#039;MOI-PC/SQLEXPRESS;Initial
Catalog = Project; User ID = sa; Password = madurai&#039;; Connect Timeout
=  60;&quot;;

SqlConnection conn = new SqlConnection(conns);
            conn.ConnectionString = conns;

            try
            {
                conn.Open();
            }
            catch (Exception ex)
            {

                MessageBox.Show(&quot;ERROR \n&quot;+ex.Message);
            }

All i get is ..

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)

I use Windows Vista Ultimate SP2, SQL server 2005 SP3 and Visual
Studio 2005
sql server is configured to accept remote connections .... both tcp/ip
n named pipes
my sql browser is running ....

any help would be greatly appreciated!!</description>
		<content:encoded><![CDATA[<p>i&#8217;ve been trying this for days and i just dont know what the problem<br />
is &#8230;</p>
<p>im using:</p>
<p>private string conns = &#8220;Data Source = &#8216;MOI-PC/SQLEXPRESS;Initial<br />
Catalog = Project; User ID = sa; Password = madurai&#8217;; Connect Timeout<br />
=  60;&#8221;;</p>
<p>SqlConnection conn = new SqlConnection(conns);<br />
            conn.ConnectionString = conns;</p>
<p>            try<br />
            {<br />
                conn.Open();<br />
            }<br />
            catch (Exception ex)<br />
            {</p>
<p>                MessageBox.Show(&#8220;ERROR \n&#8221;+ex.Message);<br />
            }</p>
<p>All i get is ..</p>
<p>A network-related or instance-specific error occurred while<br />
establishing a connection to SQL Server. The server was not found or<br />
was not accessible. Verify that the instance name is correct and that<br />
SQL Server is configured to allow remote connections. (provider: Named<br />
Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server)</p>
<p>I use Windows Vista Ultimate SP2, SQL server 2005 SP3 and Visual<br />
Studio 2005<br />
sql server is configured to accept remote connections &#8230;. both tcp/ip<br />
n named pipes<br />
my sql browser is running &#8230;.</p>
<p>any help would be greatly appreciated!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hallaghan</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-54678</link>
		<dc:creator>Hallaghan</dc:creator>
		<pubDate>Mon, 10 Aug 2009 10:18:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-54678</guid>
		<description>Thanks a lot for this post, Pinaldave. The solutions you forwarded worked just fine on our instances, and for that, we deeply appreciate it!</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this post, Pinaldave. The solutions you forwarded worked just fine on our instances, and for that, we deeply appreciate it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hr_sn</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-54254</link>
		<dc:creator>hr_sn</dc:creator>
		<pubDate>Thu, 30 Jul 2009 08:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-54254</guid>
		<description>Thanks a heap! :) saved lots of hassle</description>
		<content:encoded><![CDATA[<p>Thanks a heap! :) saved lots of hassle</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sqladm</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53866</link>
		<dc:creator>sqladm</dc:creator>
		<pubDate>Mon, 20 Jul 2009 09:51:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53866</guid>
		<description>Check your event log for any error, as in this case a restore of backup file may be recovered.</description>
		<content:encoded><![CDATA[<p>Check your event log for any error, as in this case a restore of backup file may be recovered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mithalesh</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53857</link>
		<dc:creator>Mithalesh</dc:creator>
		<pubDate>Mon, 20 Jul 2009 07:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53857</guid>
		<description>Hi to All,

Its a very generous problem, which may have many solutions. But as we have witnessed so many user saying that they have tried everything.

What solved my problem is..

I upgraded sql server 2000 from sp2 to SP4 and if you already have sp4 on sql server 2000 then run Instcat.sql. As per my experience I can assure you this will work for sure, if you are exhausted with all the other workarounds.

Thanks,
Mithalesh</description>
		<content:encoded><![CDATA[<p>Hi to All,</p>
<p>Its a very generous problem, which may have many solutions. But as we have witnessed so many user saying that they have tried everything.</p>
<p>What solved my problem is..</p>
<p>I upgraded sql server 2000 from sp2 to SP4 and if you already have sp4 on sql server 2000 then run Instcat.sql. As per my experience I can assure you this will work for sure, if you are exhausted with all the other workarounds.</p>
<p>Thanks,<br />
Mithalesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mithalesh</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53802</link>
		<dc:creator>Mithalesh</dc:creator>
		<pubDate>Fri, 17 Jul 2009 14:47:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53802</guid>
		<description>Hi Pinal,

I created a linked server on sql server 2005 express edition and tried to access linked server which is sql server 2000 enterprise in my case. But, Infortunately I am not able to connect..I am getting following error...

Server: Msg 65535, Level 16, State 1, Line 0
SQL Network Interfaces: Server doesn&#039;t support requested protocol [xFFFFFFFF]. 
OLE DB provider &quot;SQLNCLI&quot; for linked server &quot;CentralDB&quot; returned message &quot;Login timeout expired&quot;.
OLE DB provider &quot;SQLNCLI&quot; for linked server &quot;CentralDB&quot; returned message &quot;An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.&quot;. 


I have checked...Browser is working...remote connection is enabled and their is not problem from firewall. Still I am getting this error. Though If I create a link server vice versa I am able to do so. I mean from sql server2000 to sql server 2005 express edition.

Let me know if you need any additional information.

Please help.

Thank you,
Mithalesh Gupta</description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I created a linked server on sql server 2005 express edition and tried to access linked server which is sql server 2000 enterprise in my case. But, Infortunately I am not able to connect..I am getting following error&#8230;</p>
<p>Server: Msg 65535, Level 16, State 1, Line 0<br />
SQL Network Interfaces: Server doesn&#8217;t support requested protocol [xFFFFFFFF].<br />
OLE DB provider &#8220;SQLNCLI&#8221; for linked server &#8220;CentralDB&#8221; returned message &#8220;Login timeout expired&#8221;.<br />
OLE DB provider &#8220;SQLNCLI&#8221; for linked server &#8220;CentralDB&#8221; returned message &#8220;An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.&#8221;. </p>
<p>I have checked&#8230;Browser is working&#8230;remote connection is enabled and their is not problem from firewall. Still I am getting this error. Though If I create a link server vice versa I am able to do so. I mean from sql server2000 to sql server 2005 express edition.</p>
<p>Let me know if you need any additional information.</p>
<p>Please help.</p>
<p>Thank you,<br />
Mithalesh Gupta</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naveen</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53758</link>
		<dc:creator>Naveen</dc:creator>
		<pubDate>Thu, 16 Jul 2009 11:06:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-53758</guid>
		<description>We are working on PHP 5.2.9, MSSQLServer 05, IIS, Win XP server. 
We are sucessfull in making the website running without any issues for 2 months, we had another website and database installed on the same server.

Now at a time span of 2 hours or so, we are getting the issue of &quot;Unable to connect to the database server&quot; from the website. After sometime, refreshing will make it working. 

Dont know whats happening over here. Website will be down for few minutes and then starts working without doing anything. 

Why is this happening? can anyone throw some light on this?

Please let me know if you had same kind of issue and have solutions for this..

Thanks</description>
		<content:encoded><![CDATA[<p>We are working on PHP 5.2.9, MSSQLServer 05, IIS, Win XP server.<br />
We are sucessfull in making the website running without any issues for 2 months, we had another website and database installed on the same server.</p>
<p>Now at a time span of 2 hours or so, we are getting the issue of &#8220;Unable to connect to the database server&#8221; from the website. After sometime, refreshing will make it working. </p>
<p>Dont know whats happening over here. Website will be down for few minutes and then starts working without doing anything. </p>
<p>Why is this happening? can anyone throw some light on this?</p>
<p>Please let me know if you had same kind of issue and have solutions for this..</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominic Maratt</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-52321</link>
		<dc:creator>Dominic Maratt</dc:creator>
		<pubDate>Sun, 24 May 2009 15:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-52321</guid>
		<description>I was playing with System Center Virtual Machine Manager on a  Test server running Windows Server 2008 and SQL Server 2008 64 bit. It was working well  in January 2009 and then I powered down the Server.

When I returned to this server after a few months of inactivity, it forced me to change (Admin) password and soon after that I found SQL Server 2008 and SCVMM  were not running.  I was getting Logon failure and was getting ready to reinstall both. 

Luckily a google search lead me to your article. I followed your directions and sure enough the SQL Server Service was in a &#039;Stopped condition&#039;.  It refused to restart till I replaced the Password in the &#039;Logon&#039; Tab of the Service. SCVMM was also in stopped condition because it requires SQL Server 2008 to be running.

Now both are running fine. 

Thanks a lot, you saved me a lot of time!

Dominic</description>
		<content:encoded><![CDATA[<p>I was playing with System Center Virtual Machine Manager on a  Test server running Windows Server 2008 and SQL Server 2008 64 bit. It was working well  in January 2009 and then I powered down the Server.</p>
<p>When I returned to this server after a few months of inactivity, it forced me to change (Admin) password and soon after that I found SQL Server 2008 and SCVMM  were not running.  I was getting Logon failure and was getting ready to reinstall both. </p>
<p>Luckily a google search lead me to your article. I followed your directions and sure enough the SQL Server Service was in a &#8216;Stopped condition&#8217;.  It refused to restart till I replaced the Password in the &#8216;Logon&#8217; Tab of the Service. SCVMM was also in stopped condition because it requires SQL Server 2008 to be running.</p>
<p>Now both are running fine. </p>
<p>Thanks a lot, you saved me a lot of time!</p>
<p>Dominic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chinki</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-52298</link>
		<dc:creator>Chinki</dc:creator>
		<pubDate>Sun, 24 May 2009 06:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-52298</guid>
		<description>I tried lot of solutions for this problem and finally the following solution worked for me.

Added and Entry of IP of the Server in the 
1. C:\Windows\System32\drivers\etc
2. Open hosts file in notepad
3. add the entry at the end of line, as i did for example
192.168.131.65 KSSQLSRVR
192.168.131.65 KSSQLSRVR\SPDEV01

Thank You Purushotam</description>
		<content:encoded><![CDATA[<p>I tried lot of solutions for this problem and finally the following solution worked for me.</p>
<p>Added and Entry of IP of the Server in the<br />
1. C:\Windows\System32\drivers\etc<br />
2. Open hosts file in notepad<br />
3. add the entry at the end of line, as i did for example<br />
192.168.131.65 KSSQLSRVR<br />
192.168.131.65 KSSQLSRVR\SPDEV01</p>
<p>Thank You Purushotam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51429</link>
		<dc:creator>pinaldave</dc:creator>
		<pubDate>Thu, 30 Apr 2009 12:07:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51429</guid>
		<description>Hi,

There can be multiple reason why this error is coming up.

http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/

http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/

http://blog.sqlauthority.com/2008/08/09/sql-server-fix-error-1326-cannot-connect-to-database-server-error-40-could-not-open-a-connection-to-sql-server/

http://blog.sqlauthority.com/2008/08/30/sql-server-fix-error-could-not-connect-to-sql-server-tdssniclient-initialization-failed-with-error-0x7e-status-code-0x60/

http://blog.sqlauthority.com/2007/06/10/sql-server-fix-error-an-error-has-occurred-while-establishing-a-connect-to-the-server-solution-with-images/

Best Regards,
Pinal</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>There can be multiple reason why this error is coming up.</p>
<p><a href="http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/" rel="nofollow">http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/</a></p>
<p><a href="http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/" rel="nofollow">http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/</a></p>
<p><a href="http://blog.sqlauthority.com/2008/08/09/sql-server-fix-error-1326-cannot-connect-to-database-server-error-40-could-not-open-a-connection-to-sql-server/" rel="nofollow">http://blog.sqlauthority.com/2008/08/09/sql-server-fix-error-1326-cannot-connect-to-database-server-error-40-could-not-open-a-connection-to-sql-server/</a></p>
<p><a href="http://blog.sqlauthority.com/2008/08/30/sql-server-fix-error-could-not-connect-to-sql-server-tdssniclient-initialization-failed-with-error-0x7e-status-code-0x60/" rel="nofollow">http://blog.sqlauthority.com/2008/08/30/sql-server-fix-error-could-not-connect-to-sql-server-tdssniclient-initialization-failed-with-error-0&#215;7e-status-code-0&#215;60/</a></p>
<p><a href="http://blog.sqlauthority.com/2007/06/10/sql-server-fix-error-an-error-has-occurred-while-establishing-a-connect-to-the-server-solution-with-images/" rel="nofollow">http://blog.sqlauthority.com/2007/06/10/sql-server-fix-error-an-error-has-occurred-while-establishing-a-connect-to-the-server-solution-with-images/</a></p>
<p>Best Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mithalesh</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51426</link>
		<dc:creator>Mithalesh</dc:creator>
		<pubDate>Thu, 30 Apr 2009 11:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51426</guid>
		<description>My Client is on Win Server 2003 and Server on Wix XP 3. I thought that might be helpful to you in helping me.</description>
		<content:encoded><![CDATA[<p>My Client is on Win Server 2003 and Server on Wix XP 3. I thought that might be helpful to you in helping me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mithalesh</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51422</link>
		<dc:creator>Mithalesh</dc:creator>
		<pubDate>Thu, 30 Apr 2009 11:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51422</guid>
		<description>Hi All,
I was able to solve it. We just need to uncheck the Encryption support in Client Network Utility. But now I am not able to connect to other sql server DB on other machine, but still I can&#039;t connect to this DB from other machinet. I am getting error
&quot;Msg 17, Level 16, State 1
[ODBC SQL Server Driver][DBNETLIB]Sql Server does not exist of access denied

Please help me to troubleshoot this.
Thanks
Mithalesh</description>
		<content:encoded><![CDATA[<p>Hi All,<br />
I was able to solve it. We just need to uncheck the Encryption support in Client Network Utility. But now I am not able to connect to other sql server DB on other machine, but still I can&#8217;t connect to this DB from other machinet. I am getting error<br />
&#8220;Msg 17, Level 16, State 1<br />
[ODBC SQL Server Driver][DBNETLIB]Sql Server does not exist of access denied</p>
<p>Please help me to troubleshoot this.<br />
Thanks<br />
Mithalesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mithalesh</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51408</link>
		<dc:creator>Mithalesh</dc:creator>
		<pubDate>Thu, 30 Apr 2009 05:32:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51408</guid>
		<description>I have a SQL Server 2000 running on Win2k3. I uninstalled SharePoint so
I could install Reporting Services and I upgraded to MDAC 2.8. I tried
connecting to SQL locally on the Enterprise Manager on the machine but
I get this error: &quot;Server does not exist or access is denied.&quot;

The odd thing is that I can connect to that SQL Server from other
remote machines through Enterprise Manager, I just can&#039;t connect
locally. All help is appreciated. 

Thanks in advance..</description>
		<content:encoded><![CDATA[<p>I have a SQL Server 2000 running on Win2k3. I uninstalled SharePoint so<br />
I could install Reporting Services and I upgraded to MDAC 2.8. I tried<br />
connecting to SQL locally on the Enterprise Manager on the machine but<br />
I get this error: &#8220;Server does not exist or access is denied.&#8221;</p>
<p>The odd thing is that I can connect to that SQL Server from other<br />
remote machines through Enterprise Manager, I just can&#8217;t connect<br />
locally. All help is appreciated. </p>
<p>Thanks in advance..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abcd</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51324</link>
		<dc:creator>abcd</dc:creator>
		<pubDate>Mon, 27 Apr 2009 14:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-51324</guid>
		<description>Thanks for ur article.</description>
		<content:encoded><![CDATA[<p>Thanks for ur article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wargames</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-50582</link>
		<dc:creator>Wargames</dc:creator>
		<pubDate>Mon, 06 Apr 2009 23:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-50582</guid>
		<description>For me, the error 40 problem occurred when I was running the ASP.NET SQL Server Setup Wizard.

My PC is named WARGAMES-PC.  I have two versions of SQL Server running on it 2005 and Express. 

The one I want to install the database in is called MSSMLBIZ.  I found this name in several places, one of which was using VS2008 Add Connection, which incidentally didn&#039;t have any problems connecting to the databases.

The solution for me was to put WARGAMES-PC\MSSMLBIZ  as the Server name.  I then picked aspnetdb as the database. 

Another hour wasted having to learn stupid configuration tricks because there is no STANDARD!</description>
		<content:encoded><![CDATA[<p>For me, the error 40 problem occurred when I was running the ASP.NET SQL Server Setup Wizard.</p>
<p>My PC is named WARGAMES-PC.  I have two versions of SQL Server running on it 2005 and Express. </p>
<p>The one I want to install the database in is called MSSMLBIZ.  I found this name in several places, one of which was using VS2008 Add Connection, which incidentally didn&#8217;t have any problems connecting to the databases.</p>
<p>The solution for me was to put WARGAMES-PC\MSSMLBIZ  as the Server name.  I then picked aspnetdb as the database. </p>
<p>Another hour wasted having to learn stupid configuration tricks because there is no STANDARD!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-49891</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 24 Mar 2009 23:13:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-49891</guid>
		<description>Thanks very much for the solution to the error 40 problem. I
recently moved to xp pro and sql server 2005. This fixed my problem and I am most appreciative.

Michael David Simmons</description>
		<content:encoded><![CDATA[<p>Thanks very much for the solution to the error 40 problem. I<br />
recently moved to xp pro and sql server 2005. This fixed my problem and I am most appreciative.</p>
<p>Michael David Simmons</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abdur rahman</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-47381</link>
		<dc:creator>abdur rahman</dc:creator>
		<pubDate>Wed, 25 Feb 2009 17:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-47381</guid>
		<description>hi, thank you so much for your help...i had to change the IP address in the configuration property to my localhost and change the port to 1433 and it worked...

thanks again

-Abdur Rahman</description>
		<content:encoded><![CDATA[<p>hi, thank you so much for your help&#8230;i had to change the IP address in the configuration property to my localhost and change the port to 1433 and it worked&#8230;</p>
<p>thanks again</p>
<p>-Abdur Rahman</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anandan R S</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-46878</link>
		<dc:creator>Anandan R S</dc:creator>
		<pubDate>Wed, 18 Feb 2009 19:20:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-46878</guid>
		<description>Hi 

I&#039;m facing a problem while accessing a SQL Server 2005 (it has been upgrated from 2000) from a SQL Server 2005 reporting service which is running in a Windows XP machine. 

I get the following error

An error has occurred during report processing.
Cannot create a connection to data source &#039;DataTest&#039;.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, 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 - Could not open a connection to SQL Server) 

The same thing works fine i create the datasource from Visual Studio and try to preview the report it works fine, but it throws an above mentioned error while it is accessed from the Reporting server site.

I tried all the solutions mentioned above.

Please help me.</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>I&#8217;m facing a problem while accessing a SQL Server 2005 (it has been upgrated from 2000) from a SQL Server 2005 reporting service which is running in a Windows XP machine. </p>
<p>I get the following error</p>
<p>An error has occurred during report processing.<br />
Cannot create a connection to data source &#8216;DataTest&#8217;.<br />
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, 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) </p>
<p>The same thing works fine i create the datasource from Visual Studio and try to preview the report it works fine, but it throws an above mentioned error while it is accessed from the Reporting server site.</p>
<p>I tried all the solutions mentioned above.</p>
<p>Please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-46536</link>
		<dc:creator>Saurabh</dc:creator>
		<pubDate>Tue, 10 Feb 2009 18:50:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-46536</guid>
		<description>Hi, everybody must concentrate on Connection String in WebConfig file before proceeding. Sometime a little problem  you don&#039;t recognize. In my case it happened. If you r using Visual Studio it&#039;s better you can put SqlDataSource control on ur ASP.NET page &amp; try to connect Sql Server instance you want to use through it &amp; after successful tested connection use the connection string created by it.  It&#039;s not a big thing I told you but you miss tiny things sometime.I hope it might be helpful for somebody.</description>
		<content:encoded><![CDATA[<p>Hi, everybody must concentrate on Connection String in WebConfig file before proceeding. Sometime a little problem  you don&#8217;t recognize. In my case it happened. If you r using Visual Studio it&#8217;s better you can put SqlDataSource control on ur ASP.NET page &amp; try to connect Sql Server instance you want to use through it &amp; after successful tested connection use the connection string created by it.  It&#8217;s not a big thing I told you but you miss tiny things sometime.I hope it might be helpful for somebody.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lidya</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/#comment-45600</link>
		<dc:creator>Lidya</dc:creator>
		<pubDate>Wed, 14 Jan 2009 04:47:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/fix-error-40-could-not-open-a-connection-to-sql-server/#comment-45600</guid>
		<description>Bingo!

Thanks :)</description>
		<content:encoded><![CDATA[<p>Bingo!</p>
<p>Thanks :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
