General SQL error after changing Outlook appointment sync filter

Topics: Bug
Jan 30, 2015 at 12:50 PM
Hi,

I have altered the default appointment sync filter, but now every time I start a sync to/from CRM, a "General SQL error" occurs. Resetting the filter from Outlook doesnt help, something seems to be corrupt in the db containing the filters? Reinstalling the outlook client did not help. Do you maybe have an idea how to restore this?

Regards,
Matthijs
Coordinator
Jan 30, 2015 at 12:54 PM
I'm not sure if this is really related to changing the sync filter.

To be sure, you should take a crm trace on the CRM server to get a more precise error message

When you have this trace, search for the error and post it here
Feb 2, 2015 at 8:02 AM
Hi, sorry for the delay but I gathered some logs, see below. Some extra info: errors only occur on appointment change, other syncs seem to work OK.



error 1:
at DualSyncStrategy.PrepareSync(String id, Int32 callPriority) ilOffset = 0x8
at ThreadsSupport.ExecuteThreadProc(ThreadProc threadProc, IntPtr parameter) ilOffset = 0x2
TraceException: Unhandled Exception: System.Runtime.InteropServices.COMException: Generic SQL error.
bij Microsoft.Crm.Application.SMWrappers.CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)
bij Microsoft.Crm.Application.SMWrappers.OutlookSubscription.PrepareOnlineSync(String clientId, Int32 callPriority)
bij Microsoft.Crm.Application.SMWrappers.OnlineSyncStrategy.PrepareSync(String id, Int32 callPriority)
error 2:
at CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException) ilOffset = 0x10
at OutlookSubscription.PrepareOnlineSync(String clientId, Int32 callPriority) ilOffset = 0x1C
at OnlineSyncStrategy.PrepareSync(String id, Int32 callPriority) ilOffset = 0x0
at DualSyncStrategy.PrepareSync(String id, Int32 callPriority) ilOffset = 0x8
at ThreadsSupport.ExecuteThreadProc(ThreadProc threadProc, IntPtr parameter) ilOffset = 0x2
FaultExceptionDetails: Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147204784</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Generic SQL error.</Message>
<Timestamp>2015-01-29T13:27:12.9077174Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204784</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Generic SQL error.</Message>
<Timestamp>2015-01-29T13:27:12.9077174Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #25A4A6B0</Message>
<Timestamp>2015-01-29T13:27:12.9077174Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace:
bij System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
bij System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bij System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bij System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bij System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bij System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bij Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)
bij Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
bij Microsoft.Crm.Application.SMWrappers.ClientOrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
bij Microsoft.Crm.Application.SMWrappers.CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)
error 3:
at ExplorerWrapper.SetFolderIcons(MAPIFolder folder, IClientOrganizationContext orgContext) ilOffset = 0x43
at ExplorerWrapper.SetFolderIcons(MAPIFolder folder, IClientOrganizationContext orgContext) ilOffset = 0x8F
at ExplorerWrapper.SetFolderIcons(MAPIFolder folder, IClientOrganizationContext orgContext) ilOffset = 0x8F
at ExplorerWrapper.SetFolderIcons(MAPIFolder folder, IClientOrganizationContext orgContext) ilOffset = 0x8F
at ExplorerWrapper.<PopulateSolutionsModule>b__3c() ilOffset = 0x85
at ExceptionFilter.TryFilterAllCatch(Action body, Action1 filter) ilOffset = 0xF
at ExplorerWrapper.PopulateSolutionsModule() ilOffset = 0x3D
at DeferredCallInfo.RunAction() ilOffset = 0x2F
at DeferredCallManager.IdleHandler() ilOffset = 0x7C
at ExceptionFilter.TryFilterAllCatch(Action body, Action
1 filter) ilOffset = 0xF
at DeferredCallManager.OnIdle(Object sender, EventArgs e) ilOffset = 0x2E
at EventHandler.Invoke(Object sender, EventArgs e) ilOffset = 0xFFFFFFFF
at ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef) ilOffset = 0x0
De externe server heeft een fout geretourneerd: (404) Niet gevonden. <<-- error says "server has returned an error: (404) not found"
The error below was also in the logs, but although shoudl not be there I don't think it's the cause for this problem:

at ThreadHelper.ThreadStart_Context(Object state) ilOffset = 0x3B
at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x70
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x9
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) ilOffset = 0x34
at ThreadHelper.ThreadStart() ilOffset = 0x2A
Exception occurred during background offline sync method.: Unhandled Exception: System.UnauthorizedAccessException: Toegang tot het pad Global\MSCRMForceOfflineSync is geweigerd. <<- error says:: Access to the path Global\MSCRMFOrceOfflineSync is denied.
bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bij System.Threading.EventWaitHandle..ctor(Boolean initialState, EventResetMode mode, String name)
bij Microsoft.Crm.Application.SMWrappers.OfflineSyncManager.BackgroundSyncMethod()
Coordinator
Feb 4, 2015 at 8:03 PM
Do you use the latest version? I think I already fixed something similar
Marked as answer by Matthijsh on 2/5/2015 at 4:43 AM
Feb 5, 2015 at 11:43 AM
Hi,

I thought I had the latest but after doing another test with a freshly downloaded version the error seems to have dissapeared!
I'm sorry for taking your time for this, but I thank you very much for handing me the solution.

Regards,
Matthijs