Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Friday, March 30, 2012

Named pipes vs TCP/IP

Hi all.
We have a customer with some connection problems running Remote desctop
(Terminal server). In the startuplog of the SQL2000 server we can't find
anything else than:
2005-10-26 07:28:49.95 server SQL server listening on Shared Memory, Named
Pipes.
On our server we have the following started. What should we do to get the
server listening on the TCP/IP too? We think this could be the problem.
2005-10-24 12:10:06.71 server SQL server listening on 10.120.1.26: 1433.
2005-10-24 12:10:06.78 server SQL server listening on 127.0.0.1: 1433.
2005-10-24 12:10:07.67 server SQL server listening on TCP, Shared Memory,
Named Pipes.
Thanks all.
geir
Is the IP netlib enabled (Server Network Utility)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Geir Holme" <geir@.multicase.no> wrote in message news:u1OjFIJ5FHA.1032@.TK2MSFTNGP11.phx.gbl...
> Hi all.
> We have a customer with some connection problems running Remote desctop
> (Terminal server). In the startuplog of the SQL2000 server we can't find
> anything else than:
> 2005-10-26 07:28:49.95 server SQL server listening on Shared Memory, Named
> Pipes.
> On our server we have the following started. What should we do to get the
> server listening on the TCP/IP too? We think this could be the problem.
>
> 2005-10-24 12:10:06.71 server SQL server listening on 10.120.1.26: 1433.
> 2005-10-24 12:10:06.78 server SQL server listening on 127.0.0.1: 1433.
> 2005-10-24 12:10:07.67 server SQL server listening on TCP, Shared Memory,
> Named Pipes.
>
>
> Thanks all.
> geir
>

Named pipes vs TCP/IP

Hi all.
We have a customer with some connection problems running Remote desctop
(Terminal server). In the startuplog of the SQL2000 server we can't find
anything else than:
2005-10-26 07:28:49.95 server SQL server listening on Shared Memory, Named
Pipes.
On our server we have the following started. What should we do to get the
server listening on the TCP/IP too? We think this could be the problem.
2005-10-24 12:10:06.71 server SQL server listening on 10.120.1.26: 1433.
2005-10-24 12:10:06.78 server SQL server listening on 127.0.0.1: 1433.
2005-10-24 12:10:07.67 server SQL server listening on TCP, Shared Memory,
Named Pipes.
Thanks all.
geirIs the IP netlib enabled (Server Network Utility)?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Geir Holme" <geir@.multicase.no> wrote in message news:u1OjFIJ5FHA.1032@.TK2MSFTNGP11.phx.gbl...
> Hi all.
> We have a customer with some connection problems running Remote desctop
> (Terminal server). In the startuplog of the SQL2000 server we can't find
> anything else than:
> 2005-10-26 07:28:49.95 server SQL server listening on Shared Memory, Named
> Pipes.
> On our server we have the following started. What should we do to get the
> server listening on the TCP/IP too? We think this could be the problem.
>
> 2005-10-24 12:10:06.71 server SQL server listening on 10.120.1.26: 1433.
> 2005-10-24 12:10:06.78 server SQL server listening on 127.0.0.1: 1433.
> 2005-10-24 12:10:07.67 server SQL server listening on TCP, Shared Memory,
> Named Pipes.
>
>
> Thanks all.
> geir
>

Named pipes vs TCP/IP

Hi all.
We have a customer with some connection problems running Remote desctop
(Terminal server). In the startuplog of the SQL2000 server we can't find
anything else than:
2005-10-26 07:28:49.95 server SQL server listening on Shared Memory, Named
Pipes.
On our server we have the following started. What should we do to get the
server listening on the TCP/IP too? We think this could be the problem.
2005-10-24 12:10:06.71 server SQL server listening on 10.120.1.26: 1433.
2005-10-24 12:10:06.78 server SQL server listening on 127.0.0.1: 1433.
2005-10-24 12:10:07.67 server SQL server listening on TCP, Shared Memory,
Named Pipes.
Thanks all.
geirIs the IP netlib enabled (Server Network Utility)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Geir Holme" <geir@.multicase.no> wrote in message news:u1OjFIJ5FHA.1032@.TK2MSFTNGP11.phx.gbl
..
> Hi all.
> We have a customer with some connection problems running Remote desctop
> (Terminal server). In the startuplog of the SQL2000 server we can't find
> anything else than:
> 2005-10-26 07:28:49.95 server SQL server listening on Shared Memory, Named
> Pipes.
> On our server we have the following started. What should we do to get the
> server listening on the TCP/IP too? We think this could be the problem.
>
> 2005-10-24 12:10:06.71 server SQL server listening on 10.120.1.26: 1433.
> 2005-10-24 12:10:06.78 server SQL server listening on 127.0.0.1: 1433.
> 2005-10-24 12:10:07.67 server SQL server listening on TCP, Shared Memory,
> Named Pipes.
>
>
> Thanks all.
> geir
>

Named Pipes vs TCP

How would one go about adjusting the default connection to the SQL Server on the client side, using either Named Pipes or TCP as the default?Look for the Client Network Utility tool in the SQL Server program group. Or start->run CliConfig.exe.|||any way to pull of the defaulting programmatically??|||Yes, but the mechanics vary a lot depending on how you are programming. The easiest/surest way is to use the NETWORK parameter within DSN-Less connection strings (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnodbc/html/odbcsql.asp).

-PatP|||Looks like the ticket, thanks for your assistance...

Wednesday, March 28, 2012

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

I am trying to setup a notification service sample (from Joel Webb's book) for SQL server 2000 and notification service 2.0.

When i run nscontrol create at the cmd prompt, i am getting the following error:

Notification Services failed to retrieve the SQL Server edition.

SqlServerError:
Source: .Net SqlClient Data Provider
Number: 53
State: 0
Class: 20
Server:
Message: 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)
Procedure:
Line Number: 0

Any help on how this could be resolved would be really appreciated.

Thanks,

Nirmala

Hi Nirmala -

Thanks for buying the book. I hope you find it useful!

As for your issues, you may want to double check the name of the server and SQL Server instance to make sure they are correct. You may also want to verify that the server does indeed allow remote connections and that it is using named pipes as a communication protocol.

HTH...

Joe|||

I tried all the suggested things but unfortunately still seeing the same errors. Any more thoughts?

Thanks,

Nirmala

|||In the description of the problem you mention SQL Server 2000 and SSNS v2.0. However, in the actual error message it references SSNS 2005.

SSNS v2.0 was developed using version 1.1 of the .net framework and will only work with SQL Server 2000. SSNS 2005 was developed with v2.0 of the .net framework and is only available for use with SQL Server 2005.

Could it be that you have mismatched versions? And that is what is causing the problems you are seeing?

HTH...

Joe|||

Hi

I had a similar error in analysis project.

In my case I did not use the real servername as I had put an alias name for the server in my hosts file.

When I changed the server name in my datasource to reflect the real server name in stead of the alias name, I was able to deploy the project.

Regards

Per

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

I am trying to setup a notification service sample (from Joel Webb's book) for SQL server 2000 and notification service 2.0.

When i run nscontrol create at the cmd prompt, i am getting the following error:

Notification Services failed to retrieve the SQL Server edition.

SqlServerError:
Source: .Net SqlClient Data Provider
Number: 53
State: 0
Class: 20
Server:
Message: 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)
Procedure:
Line Number: 0

Any help on how this could be resolved would be really appreciated.

Thanks,

Nirmala

Hi Nirmala -

Thanks for buying the book. I hope you find it useful!

As for your issues, you may want to double check the name of the server and SQL Server instance to make sure they are correct. You may also want to verify that the server does indeed allow remote connections and that it is using named pipes as a communication protocol.

HTH...

Joe|||

I tried all the suggested things but unfortunately still seeing the same errors. Any more thoughts?

Thanks,

Nirmala

|||In the description of the problem you mention SQL Server 2000 and SSNS v2.0. However, in the actual error message it references SSNS 2005.

SSNS v2.0 was developed using version 1.1 of the .net framework and will only work with SQL Server 2000. SSNS 2005 was developed with v2.0 of the .net framework and is only available for use with SQL Server 2005.

Could it be that you have mismatched versions? And that is what is causing the problems you are seeing?

HTH...

Joe|||

Hi

I had a similar error in analysis project.

In my case I did not use the real servername as I had put an alias name for the server in my hosts file.

When I changed the server name in my datasource to reflect the real server name in stead of the alias name, I was able to deploy the project.

Regards

Per

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

I am trying to setup a notification service sample (from Joel Webb's book) for SQL server 2000 and notification service 2.0.

When i run nscontrol create at the cmd prompt, i am getting the following error:

Notification Services failed to retrieve the SQL Server edition.

SqlServerError:
Source: .Net SqlClient Data Provider
Number: 53
State: 0
Class: 20
Server:
Message: 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)
Procedure:
Line Number: 0

Any help on how this could be resolved would be really appreciated.

Thanks,

Nirmala

Hi Nirmala -

Thanks for buying the book. I hope you find it useful!

As for your issues, you may want to double check the name of the server and SQL Server instance to make sure they are correct. You may also want to verify that the server does indeed allow remote connections and that it is using named pipes as a communication protocol.

HTH...

Joe|||

I tried all the suggested things but unfortunately still seeing the same errors. Any more thoughts?

Thanks,

Nirmala

|||In the description of the problem you mention SQL Server 2000 and SSNS v2.0. However, in the actual error message it references SSNS 2005.

SSNS v2.0 was developed using version 1.1 of the .net framework and will only work with SQL Server 2000. SSNS 2005 was developed with v2.0 of the .net framework and is only available for use with SQL Server 2005.

Could it be that you have mismatched versions? And that is what is causing the problems you are seeing?

HTH...

Joe|||

Hi

I had a similar error in analysis project.

In my case I did not use the real servername as I had put an alias name for the server in my hosts file.

When I changed the server name in my datasource to reflect the real server name in stead of the alias name, I was able to deploy the project.

Regards

Per

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

Ok,
I've spent a bunch of hours trying to figure out how to connect to SQL
Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
I can run ASP.net code with no problem. I can access SQL Server from the
command line using osql with no problem.
But trying to access sql server 2005 from asp.net yields the following
message:
System.Data.SqlClient.SqlException: 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)
Can someone help me with this? I have both tcp/ip and named pipes enabled.
--
ThanksCan you post your connection string?
specifying
Network=DBMSSOCN
in your connection string will cause it to use tcp instead of named pipes,
which is less error prone.
See here for more details:
http://www.aspfaq.com/show.asp?id=2126
Also, check out the post regarding connections to sql express.
http://www.aspfaq.com/sql2005/show.asp?id=3
HTH
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Greg" wrote:
> Ok,
> I've spent a bunch of hours trying to figure out how to connect to SQL
> Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> I can run ASP.net code with no problem. I can access SQL Server from the
> command line using osql with no problem.
> But trying to access sql server 2005 from asp.net yields the following
> message:
> System.Data.SqlClient.SqlException: 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)
> Can someone help me with this? I have both tcp/ip and named pipes enabled.
> --
> Thanks|||The connections string is:
Cn = new SqlConnection("Network=DBMSSOCN;Data Source=192.168.1.103;Initial
Catalog=sqlexpress;Integrated Security=SSPI");
The new error message I get is:
(provider: TCP Provider, error: 0 - No connection could be made because the
target machine actively refused it.)
The detail is as follows:
System.Data.SqlClient.SqlException: 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: TCP Provider, error: 0 - No connection
could be made because the target machine actively refused it.)
It appears that the connection is blocked but I'm not sure where. I've
checked Windows Firewall and made sure that the appropriate ports are open...
--
Thanks
"Ryan Powers" wrote:
> Can you post your connection string?
> specifying
> Network=DBMSSOCN
> in your connection string will cause it to use tcp instead of named pipes,
> which is less error prone.
> See here for more details:
> http://www.aspfaq.com/show.asp?id=2126
> Also, check out the post regarding connections to sql express.
> http://www.aspfaq.com/sql2005/show.asp?id=3
> HTH
> --
> Ryan Powers
> Clarity Consulting
> http://www.claritycon.com
>
> "Greg" wrote:
> > Ok,
> >
> > I've spent a bunch of hours trying to figure out how to connect to SQL
> > Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> > I can run ASP.net code with no problem. I can access SQL Server from the
> > command line using osql with no problem.
> >
> > But trying to access sql server 2005 from asp.net yields the following
> > message:
> >
> > System.Data.SqlClient.SqlException: 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)
> >
> > Can someone help me with this? I have both tcp/ip and named pipes enabled.
> >
> > --
> > Thanks|||Check out this link.
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
This is a post that explains exactly how to enable remote connections for
express.
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Greg" wrote:
> The connections string is:
> Cn = new SqlConnection("Network=DBMSSOCN;Data Source=192.168.1.103;Initial
> Catalog=sqlexpress;Integrated Security=SSPI");
> The new error message I get is:
> (provider: TCP Provider, error: 0 - No connection could be made because the
> target machine actively refused it.)
> The detail is as follows:
> System.Data.SqlClient.SqlException: 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: TCP Provider, error: 0 - No connection
> could be made because the target machine actively refused it.)
> It appears that the connection is blocked but I'm not sure where. I've
> checked Windows Firewall and made sure that the appropriate ports are open...
> --
> Thanks
>
> "Ryan Powers" wrote:
> > Can you post your connection string?
> >
> > specifying
> > Network=DBMSSOCN
> > in your connection string will cause it to use tcp instead of named pipes,
> > which is less error prone.
> >
> > See here for more details:
> > http://www.aspfaq.com/show.asp?id=2126
> >
> > Also, check out the post regarding connections to sql express.
> > http://www.aspfaq.com/sql2005/show.asp?id=3
> >
> > HTH
> >
> > --
> > Ryan Powers
> > Clarity Consulting
> > http://www.claritycon.com
> >
> >
> > "Greg" wrote:
> >
> > > Ok,
> > >
> > > I've spent a bunch of hours trying to figure out how to connect to SQL
> > > Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> > > I can run ASP.net code with no problem. I can access SQL Server from the
> > > command line using osql with no problem.
> > >
> > > But trying to access sql server 2005 from asp.net yields the following
> > > message:
> > >
> > > System.Data.SqlClient.SqlException: 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)
> > >
> > > Can someone help me with this? I have both tcp/ip and named pipes enabled.
> > >
> > > --
> > > Thanks|||Excellent! I had to change from dynamic to static TCP port number. It works
great now.
Thanks for all your help
Greg
"Ryan Powers" wrote:
> Check out this link.
> http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
> This is a post that explains exactly how to enable remote connections for
> express.
>
> --
> Ryan Powers
> Clarity Consulting
> http://www.claritycon.com
>
> "Greg" wrote:
> > The connections string is:
> > Cn = new SqlConnection("Network=DBMSSOCN;Data Source=192.168.1.103;Initial
> > Catalog=sqlexpress;Integrated Security=SSPI");
> >
> > The new error message I get is:
> > (provider: TCP Provider, error: 0 - No connection could be made because the
> > target machine actively refused it.)
> >
> > The detail is as follows:
> > System.Data.SqlClient.SqlException: 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: TCP Provider, error: 0 - No connection
> > could be made because the target machine actively refused it.)
> >
> > It appears that the connection is blocked but I'm not sure where. I've
> > checked Windows Firewall and made sure that the appropriate ports are open...
> >
> > --
> > Thanks
> >
> >
> > "Ryan Powers" wrote:
> >
> > > Can you post your connection string?
> > >
> > > specifying
> > > Network=DBMSSOCN
> > > in your connection string will cause it to use tcp instead of named pipes,
> > > which is less error prone.
> > >
> > > See here for more details:
> > > http://www.aspfaq.com/show.asp?id=2126
> > >
> > > Also, check out the post regarding connections to sql express.
> > > http://www.aspfaq.com/sql2005/show.asp?id=3
> > >
> > > HTH
> > >
> > > --
> > > Ryan Powers
> > > Clarity Consulting
> > > http://www.claritycon.com
> > >
> > >
> > > "Greg" wrote:
> > >
> > > > Ok,
> > > >
> > > > I've spent a bunch of hours trying to figure out how to connect to SQL
> > > > Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> > > > I can run ASP.net code with no problem. I can access SQL Server from the
> > > > command line using osql with no problem.
> > > >
> > > > But trying to access sql server 2005 from asp.net yields the following
> > > > message:
> > > >
> > > > System.Data.SqlClient.SqlException: 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)
> > > >
> > > > Can someone help me with this? I have both tcp/ip and named pipes enabled.
> > > >
> > > > --
> > > > Thanks

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

Hi,
I have a big problem, I have a website in a Windows 2003 and SQL Server
2005, and the website usually goes weel, but some times and error appears,
the error is "Named Pipes Provider, error: 40 - Could not open a connection
to SQL Server".
There is not installed a firewall and TCP and Pipes connection are enabled.
Any ideas?
Thanks in advance,
Miguel
I have seen this before in SQL Servers that have been configured to support
N connections and no more. In this case, the named pipe is opened (the
Connection) but the server finds that the connection limit has been reached
so it closes the pipe at the server end. This confuses the connection pooler
who responds that the named pipe has failed and the connection could not be
opened after all.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"JMLA" <JMLA@.discussions.microsoft.com> wrote in message
news:FFF29A16-3C52-4596-AC88-F18D41E31309@.microsoft.com...
> Hi,
> I have a big problem, I have a website in a Windows 2003 and SQL Server
> 2005, and the website usually goes weel, but some times and error appears,
> the error is "Named Pipes Provider, error: 40 - Could not open a
> connection
> to SQL Server".
> There is not installed a firewall and TCP and Pipes connection are
> enabled.
> Any ideas?
> Thanks in advance,
> Miguel
|||Hi William Vaughn,
I have upgraded the MaxUserPort in the registry to 40000, and nothing
happens, any ideas?
Thanks in advance,
Miguel.
"William (Bill) Vaughn" wrote:

> I have seen this before in SQL Servers that have been configured to support
> N connections and no more. In this case, the named pipe is opened (the
> Connection) but the server finds that the connection limit has been reached
> so it closes the pipe at the server end. This confuses the connection pooler
> who responds that the named pipe has failed and the connection could not be
> opened after all.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "JMLA" <JMLA@.discussions.microsoft.com> wrote in message
> news:FFF29A16-3C52-4596-AC88-F18D41E31309@.microsoft.com...
>
>
|||It's not ports, it's "Connections". It might be a license restriction as
well...
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"JMLA" <JMLA@.discussions.microsoft.com> wrote in message
news:CB4C9FE7-A3F2-4720-B163-0DF2784C952E@.microsoft.com...[vbcol=seagreen]
> Hi William Vaughn,
> I have upgraded the MaxUserPort in the registry to 40000, and nothing
> happens, any ideas?
> Thanks in advance,
> Miguel.
> "William (Bill) Vaughn" wrote:
sql

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

Hi,
I have a big problem, I have a website in a Windows 2003 and SQL Server
2005, and the website usually goes weel, but some times and error appears,
the error is "Named Pipes Provider, error: 40 - Could not open a connection
to SQL Server".
There is not installed a firewall and TCP and Pipes connection are enabled.
Any ideas?
Thanks in advance,
MiguelI have seen this before in SQL Servers that have been configured to support
N connections and no more. In this case, the named pipe is opened (the
Connection) but the server finds that the connection limit has been reached
so it closes the pipe at the server end. This confuses the connection pooler
who responds that the named pipe has failed and the connection could not be
opened after all.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"JMLA" <JMLA@.discussions.microsoft.com> wrote in message
news:FFF29A16-3C52-4596-AC88-F18D41E31309@.microsoft.com...
> Hi,
> I have a big problem, I have a website in a Windows 2003 and SQL Server
> 2005, and the website usually goes weel, but some times and error appears,
> the error is "Named Pipes Provider, error: 40 - Could not open a
> connection
> to SQL Server".
> There is not installed a firewall and TCP and Pipes connection are
> enabled.
> Any ideas?
> Thanks in advance,
> Miguel

Named Pipes Connection

Any use for having Named pipes turned on? Can i turn it off? Will it
be more secure after named pipes is turned off? These servers are
behind a corporate firewall and are not going to be exposed to the
outside world.Extreme security folks would have you turn off named pipes... Inside the
firewall it doesn't bother me personally..
If you do turn it off, be aware that upgrading to the next version of SQL
Server ( in the past) using the upgrade wizard REQUIRES that named pipes be
installed. ( So you might have to turn in back on when you upgrade next
time.)
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Shaun Farrugia" <far!!!!ugia!!!s@.dte!!!!ener!gy.com> wrote in message
news:u#ZHs7pjDHA.2536@.tk2msftngp13.phx.gbl...
> Any use for having Named pipes turned on? Can i turn it off? Will it
> be more secure after named pipes is turned off? These servers are
> behind a corporate firewall and are not going to be exposed to the
> outside world.
>|||In your environment, turning off named pipes is probably not necessary.
With named pipes, only NT authenticated users can connect to SQL Server so
you can completely control who can connect.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Named Pipe question

Hi,
I'm wondering when do I need to use the Named Pipes connection in our SQL
Server 2000 and clients environment?
If all our LAN are running on the TCP/IP, do we need to use the Name Pipes?
Thanks for help.
JasonNamed Pipes is used only for LANs. However it does not support routing and
gateways. As it requires more interaction between your server and your
client you'll need a fast network because of the extra burden (especially
when compared to TCP\IP).
If TCP\IP works fine for you, go with it and disable NP to free some
resources and close extra ways for potention intruders.
--
Ekrem Önsoy
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:uiQd%23KFIIHA.5400@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I'm wondering when do I need to use the Named Pipes connection in our SQL
> Server 2000 and clients environment?
> If all our LAN are running on the TCP/IP, do we need to use the Name
> Pipes?
> Thanks for help.
>
> Jason
>|||> Named Pipes is used only for LANs. However it does not support
> routing and gateways.
It's true that you don't route named pipes. But it's also the case you don't
directly route any other SQL Server netlib protocols such as TCP/IP which in
this particular context is really meant to refer to sockets instead of TCP at
the transport layer or IP at the network layer. In other words, you don't
care whether you can directly route any of the session layer protocols such
as sockets, named pipes, or RPC as long as they are built on IP that is
routable.
I don't know all the ancient history of SQL Server, but since 7.0 at least
and possibly with 6.5, named pipes for all that matters are built on top of
TCP/IP and can rely on IP for routing at the network layer.
Linchi
"Ekrem Ã?nsoy" wrote:
> Named Pipes is used only for LANs. However it does not support routing and
> gateways. As it requires more interaction between your server and your
> client you'll need a fast network because of the extra burden (especially
> when compared to TCP\IP).
> If TCP\IP works fine for you, go with it and disable NP to free some
> resources and close extra ways for potention intruders.
> --
> Ekrem nsoy
>
> "Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
> news:uiQd%23KFIIHA.5400@.TK2MSFTNGP04.phx.gbl...
> > Hi,
> >
> > I'm wondering when do I need to use the Named Pipes connection in our SQL
> > Server 2000 and clients environment?
> > If all our LAN are running on the TCP/IP, do we need to use the Name
> > Pipes?
> > Thanks for help.
> >
> >
> > Jason
> >
>|||> I don't know all the ancient history of SQL Server, but since 7.0 at least
> and possibly with 6.5, named pipes for all that matters are built on top of
> TCP/IP and can rely on IP for routing at the network layer.
Here's how I understand it:
There are network protocols, such as:
TCP/IP (has routing functionality of course)
NetBEUI (very limited, if any, routing functionality)
IPX (original protocol in Novell)
A network protocol is of little use if we can't send data back and fort between application over
that network protocol. So, there are APIs:
NETBIOS (originally developed for NetBEUI, but is also supported over IP (requires WINS for name
resolution))
Sockets (not available for NetBEUI AFAIK, only TCP/IP)
Named Pipes (built on top of NETBIOS)
RPC (implemented and available over both NetBEUI and IP)
SPX (as I understand it, the API over IPX)
When MS released "their" SQL Server, they needed a way for the client app to communicate to the
server. They decided to go for Named Pipes and developed what we call "netlib". I.e., the MS
deveopers used the Named Pipes API (which is similar to reading and writing to a file from the
programmers perspective) when developing the Named Pipes netlib.
Over time, new netlibs were developed, where in 2000, this culminated in below list (netlibs using
the API):
Named Pipes
Sockets
RPC
VIA
SPX
There was never a netlib deveoped directly on top of NETBIOS, but indirectly through Named Pipes.
So, back to the original comment:
> but since 7.0 at least
> and possibly with 6.5, named pipes for all that matters are built on top of
> TCP/IP and can rely on IP for routing at the network layer.
Named Pipes uses NETBIOS, which available over IP, and hence is routable. This isn't tied to a
specific version of SQL Server.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:0A9D3D0D-2539-477C-8885-7CF2A55696F0@.microsoft.com...
>> Named Pipes is used only for LANs. However it does not support
>> routing and gateways.
> It's true that you don't route named pipes. But it's also the case you don't
> directly route any other SQL Server netlib protocols such as TCP/IP which in
> this particular context is really meant to refer to sockets instead of TCP at
> the transport layer or IP at the network layer. In other words, you don't
> care whether you can directly route any of the session layer protocols such
> as sockets, named pipes, or RPC as long as they are built on IP that is
> routable.
> I don't know all the ancient history of SQL Server, but since 7.0 at least
> and possibly with 6.5, named pipes for all that matters are built on top of
> TCP/IP and can rely on IP for routing at the network layer.
> Linchi
> "Ekrem Önsoy" wrote:
>> Named Pipes is used only for LANs. However it does not support routing and
>> gateways. As it requires more interaction between your server and your
>> client you'll need a fast network because of the extra burden (especially
>> when compared to TCP\IP).
>> If TCP\IP works fine for you, go with it and disable NP to free some
>> resources and close extra ways for potention intruders.
>> --
>> Ekrem nsoy
>>
>> "Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
>> news:uiQd%23KFIIHA.5400@.TK2MSFTNGP04.phx.gbl...
>> > Hi,
>> >
>> > I'm wondering when do I need to use the Named Pipes connection in our SQL
>> > Server 2000 and clients environment?
>> > If all our LAN are running on the TCP/IP, do we need to use the Name
>> > Pipes?
>> > Thanks for help.
>> >
>> >
>> > Jason
>> >

Monday, March 26, 2012

Named Pipe Provider/Linked Server Connection Error

Hello, everyone!

I'm currently having an issue with a linked server. Here's the surrounding information:

A) I have a clustered SQL Server 2005 Instance (A) and a SQL Server 2000 instance (B).

B) There is a linked server on A to B. When I set it up, I did run the fix to ensure A could talk to B (There was an issue with communication between 2005 and 2000 servers). It has been there since I installed A, and has worked fine.. Until last week.

C) This linked server uses static credentials to connect to B.

D) Named Pipes are enabled on both servers to listen to both connections on both A and B in cliconfg. So A has a named pipe listening for B, and B has a named pipe listening for A.

E) A has a view that looks at a table on B - It's a table view, very simple, just pulls in all the data from the table on B.

So, I go to do a select statement from the view, connected as a user other then 'sa'. I then get the error:

Named Pipes Provider: Could not open a connection to SQL Server Linked Server

Error Source: ncli Client (Paraphrasing, didn't copy that down, but it was the ODBC connector)

Well, that's odd. It's been working fine for months now..

I then go and connect as sa on A to query B. It works! Mind you, absolutely NO QUERY from A to B will run again until I run SOME kind of query has been run as sa on A.

Mind you, this is not a credential issue. Every user who connects to the linked server to B uses a stored credential that is DBO to the database on B. The same User Name and Password exists on both A and B.

Also of note, I check the activity monitor. There's a process that is "dormant" every time I run a query against the view. The details of this connection are:

sp_reset_connection;1

My question is, why is it resetting the connection on B when being queried from A? Why is it "all of a sudden" a problem? Are there any changes that coudl ahve been made that would cause this?

Any help with this confusing issue would be appreciated.

Thanks!

No one has any idea?

|||we found this to help us out: data source = servername,1433 (the port used), we noticed that when using an alias as the Linked Servername (not the actual servername) it failed, yet if the servername was the LS name it worked, so we added ',1433' to the data source and it cleared up our problem.

Named Pipe Provider/Linked Server Connection Error

Hello, everyone!

I'm currently having an issue with a linked server. Here's the surrounding information:

A) I have a clustered SQL Server 2005 Instance (A) and a SQL Server 2000 instance (B).

B) There is a linked server on A to B. When I set it up, I did run the fix to ensure A could talk to B (There was an issue with communication between 2005 and 2000 servers). It has been there since I installed A, and has worked fine.. Until last week.

C) This linked server uses static credentials to connect to B.

D) Named Pipes are enabled on both servers to listen to both connections on both A and B in cliconfg. So A has a named pipe listening for B, and B has a named pipe listening for A.

E) A has a view that looks at a table on B - It's a table view, very simple, just pulls in all the data from the table on B.

So, I go to do a select statement from the view, connected as a user other then 'sa'. I then get the error:

Named Pipes Provider: Could not open a connection to SQL Server Linked Server

Error Source: ncli Client (Paraphrasing, didn't copy that down, but it was the ODBC connector)

Well, that's odd. It's been working fine for months now..

I then go and connect as sa on A to query B. It works! Mind you, absolutely NO QUERY from A to B will run again until I run SOME kind of query has been run as sa on A.

Mind you, this is not a credential issue. Every user who connects to the linked server to B uses a stored credential that is DBO to the database on B. The same User Name and Password exists on both A and B.

Also of note, I check the activity monitor. There's a process that is "dormant" every time I run a query against the view. The details of this connection are:

sp_reset_connection;1

My question is, why is it resetting the connection on B when being queried from A? Why is it "all of a sudden" a problem? Are there any changes that coudl ahve been made that would cause this?

Any help with this confusing issue would be appreciated.

Thanks!

No one has any idea?

Named pipe error 53

I get the following error when I try to connect from an XP SP2 client to SQL
MSDE:
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) (Microsoft SQL Server, Error: 53)
Before last week, al worked fine, but suddenly I get this message.
What goes wrong?Is the service on another machine ? Can you reach the computer via ping ?
Did you try disabling the firewall on the Windows XP machine to see if it is
dedicted to the settings of the firewall ?
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--
"Johan" <Johan@.discussions.microsoft.com> wrote in message
news:68D2C2C3-B0B1-4756-BBBD-B6A6D2577EDA@.microsoft.com...
>I get the following error when I try to connect from an XP SP2 client to
>SQL
> MSDE:
> 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) (Microsoft SQL Server, Error: 53)
> Before last week, al worked fine, but suddenly I get this message.
> What goes wrong?sql

Named Pipe Connection through ASP - HELP!

We have a problem with interfacing a dll which is called through an Active Server Page. Our network infrastructure uses Named Pipes on Windows 2000 with SQL Server 2000 IIS version 5.0 and MDAC 2.5.

When the ASP calls the dll which (should) insert a new record into a SQL table via a stored procedure call (wrapped as a COM object), we receive the following error:

80004005 SQL Server does not exist or access denied error.

We have tried running this from the Server Admin account, but makes no difference. If we use TCP/IP the mechanism works fine, unfortunately this is not a route we can utilse without significant overall network security implications.

Any advice much appreciated!As you probably know, that's a generic error code. It could be network problems (firewall etc), file permissions or location, or any number of other things. This link shows some of the possible causes (http://support.microsoft.com/support/kb/articles/Q169/3/77.ASP?LN=EN-US&SD=gn&FR=0&qry=80004005&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=SQL).

Named instance, no default instance -> connection problems?

Hey,
I have the following problem with deployment of MSDE. Here's what I want
to do:
- I want to install MSDE in a named instance, even if it wasn't installed
before.
- I want to connect to the local server only, if possible with a
"generic" name, so I don't have to look up the system name
and stuff.
I can't really get this to work at all. I have connection strings that
work fine on development machines (where the default instance name is
used), using . for the server name. On the test machine, using
..\MYINSTANCE doesn't work at all. I read suggestions to use
(local)\MYINSTANCE instead of .\MYINSTANCE, but to no avail.
The funny thing is, even SYSTEMNAME\MYINSTANCE doesn't work unless there's
a default instance running on the same machine. Plus, it seems cumbersome
to have to find out the system's name for such a purpose.
Maybe I'm just seriously wrong about something... I didn't think it would
be that hard to set up a local (!, no networking enabled) database server
using the standard (!, they do say I'm to use a vendor-specific instance,
don't they?) setup procedure and connect to that.
Any ideas, please?
Oliver Sturm
omnibus ex nihilo ducendis sufficit unum
MSN oliver@.sturmnet.org Jabber sturm@.amessage.de ICQ 27142619
hi Oliver,
"Oliver Sturm" <oliver@.sturmnet.org> ha scritto nel messaggio
news:pan.2004.06.18.10.39.55.285051@.sturmnet.org.. .
> Hey,
> I have the following problem with deployment of MSDE. Here's what I want
> to do:
> - I want to install MSDE in a named instance, even if it wasn't installed
> before.
> - I want to connect to the local server only, if possible with a
> "generic" name, so I don't have to look up the system name
> and stuff.
> I can't really get this to work at all. I have connection strings that
> work fine on development machines (where the default instance name is
> used), using . for the server name. On the test machine, using
> .\MYINSTANCE doesn't work at all. I read suggestions to use
> (local)\MYINSTANCE instead of .\MYINSTANCE, but to no avail.
> The funny thing is, even SYSTEMNAME\MYINSTANCE doesn't work unless there's
> a default instance running on the same machine. Plus, it seems cumbersome
> to have to find out the system's name for such a purpose.
> Maybe I'm just seriously wrong about something... I didn't think it would
> be that hard to set up a local (!, no networking enabled) database server
> using the standard (!, they do say I'm to use a vendor-specific instance,
> don't they?) setup procedure and connect to that.
> Any ideas, please?
that's weird, becouse (local)\InstanceName shoul'd be fine..... ok, I'm
running a pc with a default instance and a named instance...
as regard the ComputerName part, remember you are trying to connect to a
service specified on the target pc...
you can always set an Alias via Client Network Utility, but this is not the
case... but building the connection string using something similar to Public
Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA"
(ByVal lpBuffer As String, nSize As Long) As Long, appending the
"\YourInstanceName", in your preferred language, coul'd solve the problem
too...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
sql

Named Instance of SQL Server in Java

I have a java compiled jar file, which accept the connection string as follows: -Uusername -Ppassword -Sservername:port

This string works fine with the default instance of SQL Server, I mean as long as you supply the name of the SQL Server as 'SQLServer', but if I want to run it against the named instance of SQL Server like 'SQLSERVER\NamedInstance' then the connection is failing, giving me the unknown host error. Any idea why?I've got this connection string

driver={SQL Server};server=MachineName\Mercure;uid=sa;pwd=pwd

I've created the instance name during the installation of MSDE
and it seems that SQL Server was installed with the computer name

ONLINE HELP

Computer Name
The Computer Name dialog box in Setup allows you to install Microsoft SQL Server 2000 on your local computer, on a remote computer, or on a virtual server.

All options for installing and upgrading are available on the local computer. Advanced options, including registry rebuild, unattended installation, and upgrading to a cluster are not available on a remote installation. If you are running Setup on a clustered computer, the Virtual Server option is available.

Options
Local Computer

By default, the name in the edit box is the local machine name, that is, the computer on which Setup is running. For a local installation, accept the default and click Next.

Note If you are installing tools only, Local Computer will be the only option available on this dialog box.

Remote Computer

Enter a computer name for a remote installation, or click Browse to locate the remote computer.

Virtual Server

Enter the name of a new or existing Virtual SQL Server to manage.

This option is available only when Microsoft Cluster Service (MSCS) is detected on an Windows NT or Windows 2000 Enterprise operating system.

Browse

Click the Browse button to locate a remote computer.

This button is available only when the Remote Computer option is selected.|||What JDBC driver are you using? If it's Microsoft's then it does support named instances. I think this was introduced in SP2 of the JDBC driver. Let me know and I'll post and example. If it's another jdbc driver usually you can supply the port number the instance is running in the connection string.|||-S//MachineName/DBNAME:1599

where 1599 is the Named Instance Port numbersql

Friday, March 23, 2012

Named instance connection problem

Have an MSDE named instance which works just fine. Just installed
another instance of the same and can only connect to it using OSQL
locally, nothing across the network. I made sure to use all the
gotcha flags during install to enable network access, etc:
setup.exe DISABLENETWORKPROTOCOLS=0 SAPWD="sapassword"
INSTANCENAME="instancename" SECURITYMODE=SQL /L*v
c:\temp\msdeinstlog.txt
After the install and reboot, also verified that network access is
allowed using SVRNETCN, where both named pipes and TCP connections are
enabled.
Tried connecting using "sa" and trusted NT auth and both work locally,
but across the network it's always:
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).
No firewalls in the way from client to server. As a matter of fact,
when I telnet to the TCP port shown in SVRNETCN, the connection is
established, so the port is obviously open.
I'm racking my brain on this one... What gives?
Thanks guys,
-Peter.
Peter Lecki wrote:
> Have an MSDE named instance which works just fine. Just installed
> another instance of the same and can only connect to it using OSQL
> locally, nothing across the network. I made sure to use all the
> gotcha flags during install to enable network access, etc:
> setup.exe DISABLENETWORKPROTOCOLS=0 SAPWD="sapassword"
> INSTANCENAME="instancename" SECURITYMODE=SQL /L*v
> c:\temp\msdeinstlog.txt
> After the install and reboot, also verified that network access is
> allowed using SVRNETCN, where both named pipes and TCP connections are
> enabled.
> Tried connecting using "sa" and trusted NT auth and both work locally,
> but across the network it's always:
> [DBNETLIB]SQL Server does not exist or access denied.
> [DBNETLIB]ConnectionOpen (Connect()).
> No firewalls in the way from client to server. As a matter of fact,
> when I telnet to the TCP port shown in SVRNETCN, the connection is
> established, so the port is obviously open.
> I'm racking my brain on this one... What gives?
> Thanks guys,
> -Peter.
Starting with SQL Server Desktop Engine (also known as MSDE 2000)
Service Pack 3 (SP3) or SP3a , only local connectivity is permitted, by
default. If you want to permit remote connections to SQL Server Desktop
Engine, follow the steps in the following article:
814130 (http://support.microsoft.com/kb/814130/) How to help secure
network connectivity for SQL Server 2000 local databases
http://support.microsoft.com/kb/814130/
David Gugick
Quest Software
www.quest.com

Named instance connection problem

Have an MSDE named instance which works just fine. Just installed
another instance of the same and can only connect to it using OSQL
locally, nothing across the network. I made sure to use all the
gotcha flags during install to enable network access, etc:
setup.exe DISABLENETWORKPROTOCOLS=0 SAPWD="sapassword"
INSTANCENAME="instancename" SECURITYMODE=SQL /L*v
c:\temp\msdeinstlog.txt
After the install and reboot, also verified that network access is
allowed using SVRNETCN, where both named pipes and TCP connections are
enabled.
Tried connecting using "sa" and trusted NT auth and both work locally,
but across the network it's always:
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).
No firewalls in the way from client to server. As a matter of fact,
when I telnet to the TCP port shown in SVRNETCN, the connection is
established, so the port is obviously open.
I'm racking my brain on this one... What gives?
Thanks guys,
-Peter.
Peter Lecki wrote:
> Have an MSDE named instance which works just fine. Just installed
> another instance of the same and can only connect to it using OSQL
> locally, nothing across the network. I made sure to use all the
> gotcha flags during install to enable network access, etc:
> setup.exe DISABLENETWORKPROTOCOLS=0 SAPWD="sapassword"
> INSTANCENAME="instancename" SECURITYMODE=SQL /L*v
> c:\temp\msdeinstlog.txt
> After the install and reboot, also verified that network access is
> allowed using SVRNETCN, where both named pipes and TCP connections are
> enabled.
> Tried connecting using "sa" and trusted NT auth and both work locally,
> but across the network it's always:
> [DBNETLIB]SQL Server does not exist or access denied.
> [DBNETLIB]ConnectionOpen (Connect()).
> No firewalls in the way from client to server. As a matter of fact,
> when I telnet to the TCP port shown in SVRNETCN, the connection is
> established, so the port is obviously open.
> I'm racking my brain on this one... What gives?
> Thanks guys,
> -Peter.
Starting with SQL Server Desktop Engine (also known as MSDE 2000)
Service Pack 3 (SP3) or SP3a , only local connectivity is permitted, by
default. If you want to permit remote connections to SQL Server Desktop
Engine, follow the steps in the following article:
814130 (http://support.microsoft.com/kb/814130/) How to help secure
network connectivity for SQL Server 2000 local databases
http://support.microsoft.com/kb/814130/
David Gugick
Quest Software
www.quest.com