From: sara on
Hi All,

I was able to connect to MS SQL Server 2005 on my computer but after a
while I can not. When I want to connect to it using MS SQL Server
Management Studio I got this error:

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) (.Net SqlClient Data Provider)

Error Number: 2
Severity: 20
State: 0

Can you help me?
Thanks a lot in advance.

From: Erland Sommarskog on
sara (sarasara82(a)gmail.com) writes:
> I was able to connect to MS SQL Server 2005 on my computer but after a
> while I can not. When I want to connect to it using MS SQL Server
> Management Studio I got this error:
>
> 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) (.Net SqlClient Data Provider)
>
> Error Number: 2
> Severity: 20
> State: 0

So you have SQL Server running locally? Have you checked that it is
still running?

It's not that you have SQL Express installed and you forgot to specify
the instance name?


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: sara on
Hi,

Thanks for your response. I use the SQL Server locally. I can not run
SQL Server. I am not very familiar with SQL Express but I do not think
I changed anything realted to it after installation. Thanks.
Erland Sommarskog wrote:
> sara (sarasara82(a)gmail.com) writes:
> > I was able to connect to MS SQL Server 2005 on my computer but after a
> > while I can not. When I want to connect to it using MS SQL Server
> > Management Studio I got this error:
> >
> > 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) (.Net SqlClient Data Provider)
> >
> > Error Number: 2
> > Severity: 20
> > State: 0
>
> So you have SQL Server running locally? Have you checked that it is
> still running?
>
> It's not that you have SQL Express installed and you forgot to specify
> the instance name?
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

From: Erland Sommarskog on
sara (sarasara82(a)gmail.com) writes:
> Thanks for your response. I use the SQL Server locally. I can not run
> SQL Server. I am not very familiar with SQL Express but I do not think
> I changed anything realted to it after installation. Thanks.

So did you verify that SQL Server is running? Use the SQL Server
Configuration Manager to examine this. You find it in the SQL Server program
group, under the sub-menu Configuration Tools.

--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: sara on
Thanks a lot for your response. I went to SQL Server configuration
manager->sql server 2005 services->sql server is stopped and if I try
to start it fails and says that "the request failed or the service did
not respond in a timely fashion"
Erland Sommarskog wrote:
> sara (sarasara82(a)gmail.com) writes:
> > Thanks for your response. I use the SQL Server locally. I can not run
> > SQL Server. I am not very familiar with SQL Express but I do not think
> > I changed anything realted to it after installation. Thanks.
>
> So did you verify that SQL Server is running? Use the SQL Server
> Configuration Manager to examine this. You find it in the SQL Server program
> group, under the sub-menu Configuration Tools.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx