賽迪網 > IT技術 數據庫 > 診斷案例
  IT資訊搜索
 
IT產品搜索
[程式開發][網管世界][網路安全][數據庫技術]
[作業系統][嘉賓聊天·線上訪談][活動集錦]
[精彩專題][Symantec專區][訂閱IT技術週刊]
[開發論壇][網管論壇][安全論壇][數據庫論壇]
[作業系統論壇][Sybase專區][IBM dW技術專區]
[病毒求助][病毒與漏洞播報][文檔·源碼下載]

SQL Server 2000 sp4與數據鏈結池問題

發佈時間:2008.07.21 04:58     來源:賽迪網    作者:安娜

【賽迪網-IT技術報道】今天遠程連接一台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問題解決,差點被誤導。

(責任編輯:盧兆林)


[ 發表評論 ] 字體[  ] [ 列印 ] [ 進入博客 ] [ 進入論壇 ]  [ 推薦給朋友 ]
  相關文章
  客戶需求反饋表
* 姓  名:
更多資料  了解方案  認識廠商
* 單位名稱:
* 聯繫電話:
* 電子郵件:
  賽迪推薦  
  手機·資費 ·新品·導購·評測·手機資費·寬帶
手機搜索  諾基亞 N73 MOTO Z6
  IT產品 ·筆記本·臺式機·伺服器·列印·投影
IT產品搜索 
  IT技術 ·開發·網管·安全·數據庫·作業系統
  資訊化 ·熱點·專題·訪談·週刊·方案案例
· 資訊化市場百家爭鳴 SaaS深陷爭議“泥潭”
· 提高管理水準 "兩棲"CIO應具備的六大能力
· 國產ITIL運維先行者 四大廠商角力BI市場
· 金融行業GSN專題解決方案 企業網解決方案
  IT博客 ·曾劍秋·項立剛·Java學習·網管
  IT技術論壇 ·開發·網管·安全·數據庫·系統