同步并获取System.Data.SqlClient.SqlException:传输级错误 [英] Syncing and getting an System.Data.SqlClient.SqlException: A transport-level error

查看:265
本文介绍了同步并获取System.Data.SqlClient.SqlException:传输级错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那里的大师们的问题。 我有一个当前场景,我有客户端sql server 2008 R2机器与Windows Server 2008上的sql server 2008服务器同步。


这个场景在过去有效,但是最近当我从客户端R2机器上传同步到服务器时,我从同步协调器中抛出了这个错误:


System.Data。 SqlClient.SqlException:将请求发送到服务器时发生传输级错误。 (提供者:TCP提供者,错误:0 - 远程主机强行关闭现有连接。)


我看过其他帖子:


http:/ /social.microsoft.com/Forums/en-US/b5cb2a3d-a9aa-43c3-9717-533459f8abc5/sync-framework-and-sql-notifications


并尝试了一些它所说的其他解决方案: 特别是在这篇文章中提出一些建议。


http://blogs.msdn.com/b/spike/archive/2009/04/16/a-transport-level-error-has-occurred-when-sending-the-request-to- -server-provider-tcp-provider-error-0-an-existing-connection-was-forcibly-off-by-remote-host.aspx


这些建议都没有解决问题。


到目前为止,唯一有效的,就是在测试场景中,将服务器升级到sql server 2008 R2。 此后错误消失。 有没有人对数据库版本必须相同的原因有任何建议,因为这个
似乎在过去有效。 这两台机器是否需要使用相同版本的本机sqlClient驱动程序?


任何有见识的人都会非常感激吗? 谢谢!


编辑:


这是来自错误的调用堆栈...谢谢


  ;  at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,Boolean breakConnection)

  在System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

   at System.Data.SqlClient.TdsParserStateObject.WriteSni()

  在System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()

   at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC [] rpcArray,Int32 timeout,Boolean inSchema,SqlNotificationRequest notificationRequest,TdsParserStateObject stateObj,Boolean isCommandProc)

  在System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,Boolean async)

  在System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String method,DbAsyncResult result)

  在System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String method)

  在System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior,String method)

  在System.Data.SqlClient.SqlCommand.ExecuteReader()

  在Microsoft.Synchronization.Data.SqlServer.SqlProviderFactory.ReadConfiguration(String scopeName)

  在Microsoft.Synchronization.Data.SqlServer.SqlProviderFactory.GetConfiguration(String scopeName)

  在Microsoft.Synchronization.Data.SqlServer.SqlSyncProvider.Configure()

  在Microsoft.Synchronization.Data.SqlServer.SqlSyncProvider.BeginSession(SyncProviderPosition position,SyncSessionContext syncSessionContext)

  在Microsoft.Synchronization.KnowledgeProviderProxy.BeginSession(SYNC_PROVIDER_ROLE providerRole,ISyncSessionState pSessionState)

  在Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy,_SYNC_SESSION_STATISTICS& pSyncSessionStatistics)

  在Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats,SyncIdFormatGroup destinationIdFormats,KnowledgeSyncProviderConfiguration destinationConfiguration,SyncCallbacks DestinationCallbacks,
ISyncProvider sourceProxy,ISyncProvider destinationProxy,ChangeDataAdapter callbackChangeDataAdapter,SyncDataConverter conflictDataConverter,Int32& changesApplied,Int32& changesFailed)

  在Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter,SyncDataConverter destinationConverter,SyncProvider sourceProvider,SyncProvider destinationProvider,Int32& changesApplied,Int32&
changesFailed)

  在Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()

  在Microsoft.Synchronization.SyncOrchestrator.Synchronize()



解决方案

afaik,版本无关紧要。


在同步多行甚至小同步时会发生这种情况吗?


Question for the gurus out there.  I have a current scenario where I have client sql server 2008 R2 machines syncing with a sql server 2008 server on windows server 2008.

This scenario has worked in the past, but lately when I have been doing upload syncs from the client R2 machines to the server I have been getting this error thrown from the sync orchestrator:

System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

I have seen this other post:

http://social.microsoft.com/Forums/en-US/b5cb2a3d-a9aa-43c3-9717-533459f8abc5/sync-framework-and-sql-notifications

and tried some of the other solutions it had stated:  notably going to this post with some suggestions.

http://blogs.msdn.com/b/spike/archive/2009/04/16/a-transport-level-error-has-occurred-when-sending-the-request-to-the-server-provider-tcp-provider-error-0-an-existing-connection-was-forcibly-closed-by-the-remote-host.aspx

None of these suggestions fixed the problem.

The only thing that has worked so far, and this is in a test scenario, is to upgrade the server to sql server 2008 R2.  The error goes away after this.  Does anyone have any suggestions as to why the database versions have to be the same, as this seemed to work in the past.  Do both machines need to be using the same version of the native sqlClient driver?

Anyone with some insight would be greatly appreciated?  Thanks!

EDIT:

Here is the call stack from the error... Thanks

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.WriteSni()
   at System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()
   at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc)
   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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader()
   at Microsoft.Synchronization.Data.SqlServer.SqlProviderFactory.ReadConfiguration(String scopeName)
   at Microsoft.Synchronization.Data.SqlServer.SqlProviderFactory.GetConfiguration(String scopeName)
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncProvider.Configure()
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncProvider.BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
   at Microsoft.Synchronization.KnowledgeProviderProxy.BeginSession(SYNC_PROVIDER_ROLE providerRole, ISyncSessionState pSessionState)
   at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
   at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed)
   at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)
   at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
   at Microsoft.Synchronization.SyncOrchestrator.Synchronize()

解决方案

afaik, versions shouldn't matter.

does this happen during syncs with many rows or even on small syncs?


这篇关于同步并获取System.Data.SqlClient.SqlException:传输级错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆