Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Expand / Collapse
Author
Message
Posted Monday, June 14, 2010 4:46 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, August 14, 2014 9:13 AM
Points: 98, Visits: 1,110
Hi all, i'm not sure if this is the right place to put this post, so if anyone has an alternative place for it to go then please, suggest away.

My problem here is a database (DB1) that resides on a 2005 server with 20 other databases. Around 6pm DB1 is innacessible. Yet all the other db's are able to be accessed. Now DB1 web client is held on another server, it is through the web interface that i receive this error message. I have checked that the settings on the server i.e. Named Pipes were enabled and they are. I checked the logs and the event viewer and nothing seems obvious to the cause of the error. I'd appreciate your help on this. Thanks in advance.



Server Error in '/' Application.


--------------------------------------------------------------------------------

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)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.



Stack Trace:



[SqlException (0x80131904): 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)]

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194

System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4860189

System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90

System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31

System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433

System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66

System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499

System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65

System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117

System.Data.SqlClient.SqlConnection.Open() +122

System.Web.SessionState.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo) +93



[HttpException (0x80004005): Unable to connect to SQL Server session database.]

System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e) +229

System.Web.SessionState.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo) +383

System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling) +205

System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContext context, String id, Boolean getExclusive, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +134

System.Web.SessionState.SqlSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +48

System.Web.SessionState.SessionStateModule.GetSessionStateItem() +117

System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +487

System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Post #936712
Posted Monday, June 14, 2010 5:04 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
Please don't crosspost. It just wastes people's time and fragments replies.

No replies to this thread please. Direct replies to http://www.sqlservercentral.com/Forums/Topic935796-1291-1.aspx



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #936725
Posted Thursday, September 9, 2010 1:52 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
Huh?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #982879
Posted Saturday, December 4, 2010 3:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, May 14, 2011 7:53 AM
Points: 3, Visits: 2
Hi
Check u have installed Correctly SQL server and configured properly, if u r still facing the same problem check data base server address inserted in configuration file or its on a same server Check its pc name is Correct

Regards
Shereena Haris
Sr. Software Architect
Visit My blog http://worldipvoice.blogspot.com/
Post #1030251
Posted Saturday, May 14, 2011 7:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, May 14, 2011 7:21 AM
Points: 2, Visits: 3
Thank You So Much Shreena. I opened SQL server and copy the Connection and paste that in my ConnectionString It Works very well. Thank Again
Post #1108812
Posted Saturday, May 14, 2011 7:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, May 14, 2011 7:53 AM
Points: 3, Visits: 2
HI Ayeesha

I am very Happy to hear that, my post help you to solve your issue.


Regards

Shereena Haris
Chief Technology Officer at Xamcenter
Post #1108814
Posted Saturday, May 14, 2011 7:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, May 14, 2011 7:53 AM
Points: 3, Visits: 2
HI Ayeesha

I am very Happy to hear that, my post help you to solve your issue.


Regards

Shereena Haris
Chief Technology Officer at Xamcenter
Post #1108815
Posted Monday, September 12, 2011 12:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 6, 2011 5:23 AM
Points: 1, Visits: 1
Hi,

1) Please double check your connection string

2) Please make sure your DB server connects and user/pass is correct in the connection string.

If the above points are fine. Then your code should work.

Thanks
S.Ragunath
Post #1173196
Posted Saturday, January 21, 2012 7:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 1, 2014 6:41 PM
Points: 1, Visits: 6
hye ayeeshagopi , can u explain it very well ?
copy the connection ? where u copy?
if u can explain step by step , glad to know that :)

thanks ,
za
Post #1239886
Posted Monday, June 4, 2012 5:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, May 6, 2013 3:38 AM
Points: 12, Visits: 12
hi

i hope it will help you

http://csharpektroncmssql.blogspot.in/2012/04/network-related-or-instance-specific.html
Post #1310404
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse