sql server-sqlserver2008R2间接性出现无法连接的情况

问题描述

sqlserver2008R2间接性出现无法连接的情况

总是间接性出现,没有固定规律,有没有人碰到过这种情况,求大神指点,帮忙分析下。

错误提示如下

Exception information:
Exception type: SqlException
Exception message: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)

Thread information:
Thread ID: 101
Is impersonating: False
Stack trace: 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
在 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
在 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
在 System.Data.SqlClient.SqlInternalConnectionTds.LoginWithFailover(Boolean useFailoverHost, String primaryHost, String failoverHost, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
在 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
在 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
在 System.Data.SqlClient.SqlConnection.Open()

解决方案

这个很明显是你数据库的服务没有打开,先要打开服务才行的。

解决方案二:

间接性,有没有什么规律呢?间隔多久,每次的现象等等,多抓取几次出错时的 LOG 来分析一下。
出现问题时,网络是否正确呢?

时间: 2024-08-04 04:18:33

sql server-sqlserver2008R2间接性出现无法连接的情况的相关文章

怎样才能限制SQL Server只能让指定的机器连接(转)

server Q. How can I restrict access to my SQL Server so that it only allows certain machines to connect?(v1.0 19.10.1998) 怎样才能限制我的SQL Server只能让指定的机器连接 A. SQL Server has no built-in tools/facilities to do this. It also does not have the facility to ru

怎样才能限制SQL Server只能让指定的机器连接

server Q. How can I restrict access to my SQL Server so that it only allows certain machines to connect?(v1.0 19.10.1998) 怎样才能限制我的SQL Server只能让指定的机器连接 A. SQL Server has no built-in tools/facilities to do this. It also does not have the facility to ru

限制SQL Server只能让指定的机器连接

server Q. How can I restrict access to my SQL Server so that it only allows certain machines to connect?(v1.0 19.10.1998) 怎样才能限制我的SQL Server只能让指定的机器连接 A. SQL Server has no built-in tools/facilities to do this. It also does not have the facility to ru

使用SQL Server Driver for PHP解决PHP连接MSSQL乱码的问题

原文 使用SQL Server Driver for PHP解决PHP连接MSSQL乱码的问题 最近帮客户写了一个.net商城网站的发布接口,大家都知道.net一般都使用MSSQL数据库,但鱼丸不会.net呀,没办法,只能使用PHP连接SQL Server,然后来发布商品数据.因为客户采集的英文网站,但是要求发布时翻译成德语,发布完了,结果发现标题内容这些地方有乱码,在网上找了大半天,也试了很多种方法,结果使用SQLSRV解决了问题! 官方网址:http://msdn.microsoft.com

sql2005-高人救我,sql server 2005 数据库不时无法远程连接

问题描述 高人救我,sql server 2005 数据库不时无法远程连接 说明:关于我这个问题,我穷究了好几天,网上几乎所有相关问题的方法我都试过了,仍然没有解决.特来C论坛请教高手,万望各位不吝赐教.新来的,无C币,悬赏C币只有一个,仅代表我的一点感激之情,请勿见笑. 情况:asp + sql 2005,用的动易siteweaver 6.8 asp cms系统,一台web服务器,一台数据服务器,两台机器直连组的局域网. 问题:直接在数据服务器上连接数据库,一直都正常,在web服务器上通过内网

怎么才能限制SQL Server只能让指定的机器连接_oracle

正在看的ORACLE教程是:怎么才能限制SQL Server只能让指定的机器连接. Q. How can I restrict access to my SQL Server so that it only allows certain machines to connect?(v1.0 19.10.1998) 怎样才能限制我的SQL Server只能让指定的机器连接 A. SQL Server has no built-in tools/facilities to do this. It al

SQL Server 2005建立与服务器的连接时出错的解决方案

  打开新安装好的网站后却显示了如下错误: 在建立与服务器的连接时出错.在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败. (provider: SQL 网络接口, error: 26 - 定位指定的服务器/实例时出错) 解决办法: 1.在"外围配置"工具把"仅TCP/IP"选上. 2.然后从"配置管理器"中找到"...2005网络配置"->"

SQL Server用NOT EXISTS或(外连接+判断为空)方案实例

用IN写出来的SQL的优点是比较容易写及清晰易懂,这比较适合现代软件开发的风格. 但是用IN的SQL性能总是比较低的,从SQL执行的步骤来分析用IN的SQL与不用IN的SQL有以下区别: SQL试图将其转换成多个表的连接,如果转换不成功则先执行IN里面的子查询,再查询外层的表记录,如果转换成功则直接采用多个表的连接方式查询.由此可见用IN的SQL至少多了一个转换的过程.一般的SQL都可以转换成功,但对于含有分组统计等方面的SQL就不能转换了. 推荐在业务密集的SQL当中尽量不采用IN操作符 NO

Sql Server 强制断开数据库已有连接的方法

用管理员账户sa登陆,然后在master下新建查询: 在查询窗口输入: declare @i int declare cur cursor for select spid from sysprocesses where db_name(dbid)= '要断开连接的数据库名称' open cur fetch next from cur into @i while @@fetch_status=0 begin exec('kill '+@i) fetch next from cur into @i