atitit.故障排除--- 當前命令發生了嚴重錯誤。應放棄任何可能產生的結果sql server 2008
2. 原因:::sql server的bug 或者限制,查詢的時候兒使用資源太多超過操作系統/防火牆/安全軟件的限制... 2
2.1. 防火牆/安全軟件的原因:自動關閉了長時連接and 資源多的連接.. 2
2.2. 並發連接數超過了其承載量,服務器會將其中一些連接Down掉; 2
3.2. 使用top n /where 減少查詢數量(attialx驗證ok) 2
3.5. 減少select 大的字段查詢..只select 小的字段 2
3.8. 在調用存儲過程中未指明詳細的數據類型.(據google結果說打了sp4才出現的,這就不知道了) 3
1. 現象
執行一個sql 語句的時候兒這個錯誤..代碼韓式管理器黑頭都是中個..
解決“當前命令發生了嚴重錯誤。應放棄任何可能產生的結果。”的問題
在從服務器接收結果時發生傳輸級錯誤。 (provider: 命名管道提供程序, error: 0 - 管道的另一端上無任何進程。)
當前命令發生了嚴重錯誤。應放棄任何可能產生的結果
常常還有conn 自動關閉的事情....socket close..
org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback failed
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.service.jdbc.connections.spi.ConnectionProvider]
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: socket write error
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 該連接已關閉。
org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is org.hibernate.TransactionException: commit failed
作者:: 老哇的爪子 Attilax 艾龍, EMAIL:1466519819@qq.com
轉載請注明來源: http://blog.csdn.net/attilax
2. 原因:::sql server的bug 或者限制,查詢的時候兒使用資源太多超過操作系統/防火牆/安全軟件的限制...
數據只有75w,查詢的時候兒也這個錯誤.....
大概查詢的時候兒內存使用太多...
但是mysql 相同的電腦上 相同的數據數量就沒問題..
2.1. 防火牆/安全軟件的原因:自動關閉了長時連接and 資源多的連接..
2.2. 並發連接數超過了其承載量,服務器會將其中一些連接Down掉;
3. 解決之道::
3.1. 打補丁sp
3.2. 使用top n /where 減少查詢數量(attialx驗證ok)
3.3. 提升電腦配置(推薦,,驗證ok)
3.4. 查詢字段添加索引
3.5. 減少select 大的字段查詢..只select 小的字段
3.6. 修改某一字段的長度,或許是這個造成的..
估計是文章的長度太長導致的,於是查找到代碼 db.AddInParameter(dbCommand, "Content", DbType.AnsiString, model.Content);
將其改為
db.AddInParameter(dbCommand, "Content", DbType.String, model.Content);
3.7. strSql和Param太多了,導致錯誤。
param for循環51 次即 2092 個就報錯。
3.8. 在調用存儲過程中未指明詳細的數據類型.(據google結果說打了sp4才出現的,這就不知道了)
4. 參考
2014/11/25 11:23 22,212 異常請教:當前命令發生了嚴重錯誤。應放棄任何可能產生的結果.htm
2014/11/25 11:20 113,357 當前命令發生了嚴重錯誤。應放棄任何可能產生的結果.htm
2014/11/25 11:23 12,669 解決“當前命令發生了嚴重錯誤。應放棄任何可能產生的結果。”的問題 - Sam Lin - 博客園.htm
2014/11/25 11:20 42,875 解決問題 當前命令發生了嚴重錯誤。應放棄任何可能產生的結果 - wthorse的專欄 - 博客頻道 - CSDN.NET.htm