当前位置: 首页 > 图文教程 > 数据库 > MSSQL > SQL Server 2000 SP4与数据链接池问题

MSSQL
SQL Server 中死锁产生的原因及解决办法
教你在SQL Server 2000数据库中使用分区
数据仓库基本报表制作过程中的SQL写法
自动定时重启sql server回收内存
轻松解决SQL Server 2005中的常见问题
用一个案例讲解SQL Server数据库恢复
安装SQL Server 2005时出现计数器错误
讲解SQL Server 2005数据库的同义词Bug
利用SQL语句对不同数据库进行高效果分页
三种数据库利用SQL语句进行高效果分页
数据库连接字符串的常见问题和解决方法
教你快速掌握一些方便易用的SQL语句
深入分析SQL Server的数据转换服务
系统默认的MySQL用户名消失的解决方法
SQL 2008邮件故障排除:发送测试电子邮件
SQL Server 2005日志文件损坏的处理方法
在SQL Server 2005数据库中进行错误捕捉
SQL Server查询速度慢原因及优化方法
加密SQL Anywhere 提升政府行业数据安全
Windows Server 2008之数据安全保护

MSSQL 中的 SQL Server 2000 SP4与数据链接池问题


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-17   浏览: 85 ::
收藏到网摘: n/a

今天远程连接一台xp sp2上的SQL,报错信息如下:

以下为引用的内容:
  Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
  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.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
  Source Error:
  Line 2503: cmd.CommandType = CommandType.StoredProcedure;
  Line 2504:
  Line 2505: connection.Open();
  Line 2506: SqlCommandBuilder.DeriveParameters(cmd);
  Line 2507: connection.Close();

但是,我的连接字符串中已经设置了,最大链接池=200,应该是不可能全部被占用的。

当把链接池设置去掉,就报:

以下为引用的内容:
  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)
  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: 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)
  Source Error:
  Line 2503: cmd.CommandType = CommandType.StoredProcedure;
  Line 2504:
  Line 2505: connection.Open();
  Line 2506: SqlCommandBuilder.DeriveParameters(cmd);
  Line 2507: connection.Close();

这下子,问题就明朗了,典型的没有打 Sql2000 sp4 的问题,打上sp4问题解决,差点被误导。