sql 2000升级到sql 2005后.asp.net 存储总是间歇性出错
堆栈信息: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Qiying.WebModules.Data.DbObject.RunProcedure(String storedProcName, IDataParameter[] parameters, Int32& rowsAffected) at Qiying.WebModules.Accounts.Data.Meng.SetSql(String strSQL) at Qiying.WebModules.Accounts.Business.ping.SetSql(String strSQL) at Qiying.Job.Web.job.AjaxGetInfo.SetquickApply(String jobIDstr, String qiuzhixin, Boolean kuaisu, Int32 jianliid, Boolean okok, Int32 oki) at Qiying.Job.Web.job.AjaxGetInfo.GetquickApply2() at Qiying.Job.Web.job.AjaxGetInfo.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
sql 2000升级到sql 2005后.asp.net程序存储总是间歇性出错。
服务器一直有人访问,也一直有人存储数据,前天11月2日升级后,基本保存数据就会有50%的出错几率。
连接代码如下所示。
server=SVCTAG-J7X;database=data;user id=sa;password=12345;
如果加大了connect timeout = 60; 能好一些,但是还是会经常出现。
服务器不是因为访问人太多造成了,今天早上cup都没有高过30%.
------解决方案--------------------超时分2种: 连接超时,执行超时.
可能是执行超时,查看一下系统是否有进程阻塞,索引丢失(特别是大表上的索引).
------解决方案--------------------升级后需要做两件事:
1、更新全部统计信息。
2、做一次完整备份和日志备份
------解决方案--------------------