.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Named Pipes Provider: Could not open a connection to SQL Server [2]

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :Sql Server

I'm a complete sql/asp.net newbie and want to try this tutorial:

First I installed:
Visual Web Developer 2005 Express Edition Beta 2

systemsettings\software shows the "sql server 2005 express edition ctp (sqlexpress)" installed

mmc\service shows me the SQL Server (SQLExpress) is running

Following the guided tour I use the commandline, type cmd, and type in the commandbox:
"C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD90" -S "localhost\SqlExpress"

Instead of localhost I also tried computername.smallbusiness.local (thats my fully domain name).

However I always receive the error:

Named Pipes Provider: Could not open a connection to SQL Server [2]

Thank you very much for all your help

View Complete Post

More Related Resource Links

Named Pipes Provider, error: 40 - Could not open a connection to SQL Server


This was originally posted in the SSIS Forum, but a member of the IS team suggested it be moved here.  "Most recently I got this error (Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) so does this mean that SQL Server is still trying to use named pipes even if I only have TCP/IP enabled in SQL Server Configuration Manager?"

I'm having the same issue, and here's our scenario:

  1. Installed SQL Server 2005 Developer Edition on a machine with WinXP SP2 and enabled remote connections over TCP/IP
  2. Installed SQL Server 2005 Standard Edition on a machine with Win2003 SP1 (remote connections over TCP/IP enabled by default)
  3. Attempted to 'Copy Database' from Developer Edition TO Standard Edition using 'Detach and Attach' method and recieved the error on the Win2003 machine: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
  4. A

provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

after lots  of goes and back, I have the same problem but it is related to my Visual studio too. Because I can access to the same database  for new projects but when I use an existing project with a new default page I get the same error.
I am using visual studio 2005 connecting to MSSQL 2008 in server that has an instance of SQLServer express 2005 too
the code for boht new and existing project is bellow

I appricate any help


protected void Page_Load(object sender, EventArgs e)



SqlConnection cn =

provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server


On windows 2008 using sql 2k8 standard edition. I have a couple of apps that run on the server. One works perfectly and attaches to sql with no problem. The second app that uses THE EXACT SAME CONNECTION STRING and gives me the following error,

provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

How can one app work and the other not? What can I check for?


named pipes provide: could not open a connection to SQL server [2]

I am trying to connect to an SQL Database on SQL 2008, through an ODBC link but keep getting the above error. I do not know how to fix it. I am trying to make the connection on the server?  dont know whether that makes any difference

Named Pipes provider error - backup script

I have a couple of installs of SQL Server 2005 Express.  One thing it doesn't provide is an agent to schedule jobs so I read where you can use Windows job scheduler to execute a batch job to in turn run a sqlcmd file.  I have that working on one server but on the other server I get the dreaded Name Pipes provider error and it goes on to talk about it may not be setup to allow remote connections.  If I check using Surface Configurator it is set to allow remote connections using both tcpip and named pipes.  To my knowledge all I want it tcpip but I enabled named pipes in an effort to get things working. About the only difference I can see is on the working system the database is a named instance (ie. Servername) versus default instance on the non-working system which shows up as (Servername\SQLEXPRESS).  Hopefully I have my terminology right here. Any tips on how to troubleshoot?  Does it depend on the username I am using?  Domain admin or local server admin or what have you? I should mention I can execute the backup script and it does work.  It is when I run the batch job that it fails. The batch job just says "sqlcmd -i d:\MSSQL_Jobs\backup.sql -o d:\Logs\sqlbackup_output.txt"

Open SQL Server Connection Troubleshooting

Hello, This is regarding ASP.Net (VB) 2.0 and SQL Server 2008.  My project's (there is only one in my solution) has a "Start Action" set to a "Specific Page" (..\Forms\frmMain.aspx).  Occasionally (though not always) a large number of connections (30+) will be opened prior to the frmMain.PreInit event.  These connections stay open for quite some time.  I am closing all of my connections with extreme prejudice.  In my "finally" clause of my try...catch I have myconnection.close.  Immediately after the "End Try" I have myconnection.dispose (redundant, I know).  I have accounted for all connections.  I placed a breakpoint on frmMain.PreInit and then (sometimes) a large number of connections (used SSMS to run sp_who and sp_who2) will have just opened.  What would open a large number of connections prior to the starting page's preinit event?  I am closing (and then disposing) all of my connections.  I thought that I must be missing a myconnection.close in the "finally" clause, but I have looked repeatedly and cannot find anywhere that a connection is open and then not closed.  Also, I do not believe that I have even opened a connection prior to the frmMain's preinit event.        

how many open connection is recommended to leave - in sql server 2008 Enterprise Edition

hi i have my C# program that work with sql-server 2008 Enterprise Edition i have 40 users that connect to this database. i dont close the connection. how many open connection is recommended to leave ? or is it better to close connection ? thank's in advance

SQL Server 2008 - Connection from clients are dropping with TCP Provider: An existing connection was


I have a SQL Server 2008 on a WS 2003 cluster. Client connection is dropping intermitently. I have enabled trace flag 7827 and I founf the following result:




Record id="33" type=

Error rsReportServerDatabaseLogonFailed : The report server cannot open a connection to the report s


Hello, All

I face issue on Sql server 2008 for deployee report first time on report server and report manager,,,,,

Error rsReportServerDatabaseLogonFailed : The report server cannot open a connection to the report server database. The log on failed.

Deploy complete -- 1 errors, 0 warnings

========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Anyone please help me as soon as possible............

SQL server connection - keep it opened all the time, or open/close on demand ?



I have a VB6 app that gets data from several devices and has to store it in a SQL server 2005 database.
It may have to store small amounts of data (a few KB at most) somewhere between 5 and 500 times per day.
My app only sends data to DB, doesn't read anything.

My question is what's better in this case:

a) the app opens a connection to DB at startup and closes it at exit, or
b) when data arrives, the app opens a connection, sends data, then closes the connection


SQL 2008 could not open a connection to SQL server [53]


3 computers connect fine, but two others cannot connect to the DB.


.NET 3.5 Adds Named Pipes Support

you want a named pipe server, all you have to do is create some instances of NamedPipeServerStream to handle each client connection. I stole the following code straight from the MSDN documentation.

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.


I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

A connection could not be made to the report server http://localhost/ReportServer.



  • I created a Report using Business Intelligence Studio. Its working working well, i can able to view records. But when i try to deploy the report an error occurs specifying that "A connection could not be made to the report server http://localhost/ReportServer. (Microsoft Report Designer)".
  • I open the IIS 7 and find out virtual directories "Reports" and "ReportServer" are available.
  • I check on the browser and type "http://localhost/reports".  I find the browser direct to this url: http://localhost/reports/Pages/Folder.aspx and find error specifying the following one:

         Error:The report server is not responding. Verify that the report server is running and can be accessed from this computer.

  • when i type http://localhost/reportmanager, i found the error:

    HTTP Error 404.0 - Not Found

    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.


A connection that was expected to be kept alive was closed by the server.


When  i want to Call http://BDCRWSS/_vti_bin/BdcAdminService.svc Bdc AdminService in SharePoint Foundation  2010

the binding i use:

    <binding name="BasicHttpBinding_BusinessDataCatalogSharedService"
      closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
      sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false"
      hostNameComparisonMode="StrongWildcard" maxBufferSize="999999"
      maxBufferPoolSize="9999999" maxReceivedMessageSize="999999"
      messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
     <readerQuotas maxDepth="99" maxStringContentLength="999999" maxArrayLength="999999"
       maxBytesPerRead="999999" maxNameTableCharCount="999999" />
     <security mode="TransportCredentialOnly">
      <transport clientCredentialType="Ntlm" proxyCredentialType="None"
       <extendedProtectionPolicy policyEnforcement="Never" />
      <message clientCredentialType="Use

Connection Pooling To SQL Server

Hi Folks,

I'm a new SQL PFE and just encountered my first SharePoint installation at a customer site. (The first of many, I'm sure.) I ran some health checks on the SQL Server and noticed 600-700 user connections from the SharePoint account. The SharePoint admins and developers are novice to junior-level, and unfamiliar with connection pooling. I've never worked with SharePoint before and don't know what it's normal behavior is or how connections should be managed by SharePoint.

They indicated the SharePoint system is relatively new and only getting a small amount of use compared to what is expected soon.

SQL Server is handling the load well right now, but if the number of connections grows proportionally to the load, this will become a performance constraint.

1. Is this a normal number of connections for SharePoint?
2. If not, where can the SharePoint staff and myself find a thorough explanation of the principles of SharePoint connection pooling?

Thanks, JDL

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend