该[Pre-Login] initialisation=A; handshake=B; [Login] initialization=C; authentication=D; [Post-Login] complete=E;
部分在SQL超时异常中的含义是什么?
例如,在以下SQL Timeout异常消息中,它们是秒,毫秒,单位还是苹果?
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=28; handshake=24; [Login] initialization=0; authentication=0; [Post-Login] complete=1;
---> System.ComponentModel.Win32Exception: The wait operation timed out
我试图了解SQL Azure上SQL超时的根本原因
谢谢.
---> NHibernate.Exceptions.GenericADOException: could not execute batch command.[SQL: SQL not available]
---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original
server was - [Pre-Login] initialization=28; handshake=24; [Login] initialization=0; authentication=0; [Post-Login] complete=1;
---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.SqlClient.SqlCommandSet.ExecuteNonQuery()
at NHibernate.SqlAzure.ReliableSqlClientBatchingBatcher.ExecuteBatch(IDbCommand ps)
--- End of inner exception stack trace ---
at NHibernate.SqlAzure.ReliableSqlClientBatchingBatcher.ExecuteBatch(IDbCommand ps)
at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.
我解决了这个问题并得到了SQL支持的响应:A,B,C,D和E代表连接尝试的步骤:
[登录前]初始化= A; 握手= B; [登录]初始化= C; 认证= d; [登录后]完成= E;
A.连接客户端和服务器自我介绍.客户端和服务器让对方知道它打算如何通信.
B.建立安全套接字层连接.
C.连接客户端将自身引入Master数据库/数据库.
D.引用主数据库/数据库以完成身份验证.
E.已成功建立连接.