web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Connector for Dynamics does not work after upgraded from 3.1 to 3.2

(0) ShareShare
ReportReport
Posted on by 1,575

Hi  CHETZLER,

My account exists in the db_datareader and db_datawriter roles in MSDI DB.

The connector service was started without any error, but I still cannot open the connector client.  It popped up a message "A service error has occurred. Please check your server error logs for details."

I see more than 20 errors in Event Viewer.

Most of them are as below.

=================

System.Data.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'GetTasksByTimestamp', database 'MSDI', schema 'Scheduling'.

  at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

  at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

  at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

  at System.Data.SqlClient.SqlDataReader.get_MetaData()

  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)

  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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

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

  at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

  at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

  --- End of inner exception stack trace ---

  at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

  at System.Data.Objects.ObjectContext.CreateFunctionObjectResult[TElement](EntityCommand entityCommand, ReadOnlyMetadataCollection`1 entitySets, EdmType[] edmTypes, MergeOption mergeOption)

  at System.Data.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, MergeOption mergeOption, ObjectParameter[] parameters)

  at System.Data.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ObjectParameter[] parameters)

  at Microsoft.Dynamics.Common.Scheduler.Data.SchedulerEntities.GetTasksByTimestamp(Byte[] filterByVersion, Nullable`1 onlyEnabledTask, ObjectParameter latestVersion)

  at Microsoft.Dynamics.Common.Scheduler.Data.DataManager.GetTasksByConfigurationTimestamp(Nullable`1& byTimestamp, Boolean onlyEnabledTasks)

  at Microsoft.Dynamics.Common.Scheduler.GenericScheduler.Scheduler.LoadTasks()

  at Microsoft.Dynamics.Common.Scheduler.GenericScheduler.Scheduler.OnHeartbeat()

======================

others are:

=====================

Unexpected service error on call : www.microsoft.com/.../GetIntegrations

--- Exception Dump ---

Caught Exception: [System.Data.EntityCommandExecutionException] An error occurred while executing the command definition. See the inner exception for details.

Stack trace:

  at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

  at System.Data.EntityClient.EntityCommandDefinition.Execute(EntityCommand entityCommand, CommandBehavior behavior)

  at System.Data.EntityClient.EntityCommand.ExecuteReader(CommandBehavior behavior)

  at System.Data.EntityClient.EntityCommand.ExecuteScalar[T_Result](Func`2 resultSelector)

  at System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, ObjectParameter[] parameters)

  at Microsoft.Dynamics.Integration.DataAccessLayer.DataProtection.<>c__DisplayClass4.<Decrypt>b__3()

  at Microsoft.Dynamics.Integration.DataAccessLayer.DataProtection.Decrypt(Byte[] data)

  at Microsoft.Dynamics.Integration.DataAccessLayer.DataProtection.DecryptSettings(XElement settings)

  at Microsoft.Dynamics.Integration.DataAccessLayer.DbAdapter.AsAdapterProxy()

  at Microsoft.Dynamics.Integration.DataAccessLayer.MapCategoryAdapterSetting.GetAdapterWithSettings()

  at Microsoft.Dynamics.Integration.Service.Contract.AdapterWithSettings.FromMapCategoryAdapterSettings(MapCategoryAdapterSetting mapCategoryAdapterSettings)

  at Microsoft.Dynamics.Integration.Service.ConfigurationServiceImplementationBase.<GetIntegrations>b__24()

  at Microsoft.Dynamics.Common.Scheduler.SharedEntityConnectionUtility.InvokeWithSharedConnectionOnCreatedContext[T](Func`1 toInvoke, SharedEntityConnectionWrapper createdContext)

  at Microsoft.Dynamics.Integration.Service.ConfigurationServiceImplementationBase.GetIntegrations()

  at SyncInvokeGetIntegrations(Object , Object[] , Object[] )

  at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)

  at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)

  at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)

  at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)

  at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Inner Exception: [System.Data.SqlClient.SqlException] The EXECUTE permission was denied on the object 'DecryptData', database 'MSDI', schema 'Connector'.

Stack trace:

  at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

  at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

  at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

  at System.Data.SqlClient.SqlDataReader.get_MetaData()

  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)

  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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

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

  at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

  at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

=================

Any ideas?

thank you,

Feng

*This post is locked for comments

I have the same question (0)
  • Feng Zhou Profile Picture
    1,575 on at

    Strange! after granted db_owner role, got below again!!!

    The encrypted setting, Password, could not be decrypted.

    --- Exception Dump ---

    Caught Exception: [System.Security.Cryptography.CryptographicException] Encrypted data was invalid and cannot be decrypted.

    Stack trace:

      at Microsoft.Dynamics.Integration.DataAccessLayer.DataProtection.Decrypt(Byte[] data)

      at Microsoft.Dynamics.Integration.DataAccessLayer.DataProtection.DecryptSettings(XElement settings)

    What permissions are required?!!!!  I gonna crazy!

  • Mohammad Atif Profile Picture
    on at

    Did you Tried Repairing your connector and see if you are still getting the same error message. Also, how about creating a new login in SQL and do some select statements using that  login to see if everything is good in SQL

    Regards,

  • Feng Zhou Profile Picture
    1,575 on at

    Hi Mohanmmad,

    Thank you for the respones.

    The connector was just installed.  (But it was not installed by my account)

    I have db_owner role in MSDI database. no problem to query data.

    Hi  CHETZLER,

    I tried to drop, re-create Master Key. But seems dont have permission.

    what permission should I have?

    thank you,

    Feng

  • Community Member Profile Picture
    on at

    After upgrading you will need to go into the settings for each integration and re-add the password for the integration users for each adapter.  You need to launch the connector client as a user that is in the owner role for the MSDI database I believe.

  • Feng Zhou Profile Picture
    1,575 on at

    Hi Chetzler,

    I've used the admin user (who installed the connector 3.2 ) as connector service's service account.  But when I started the connector service, I could see many errors in the Event Viewer.   The client could not be started.

    The encrypted setting, Password, could not be decrypted.

    --- Exception Dump ---

    Caught Exception: [System.Security.Cryptography.CryptographicException] Encrypted data was invalid and cannot be decrypted.

    Stack trace:

     at Microsoft.Dynamics.Integration.DataAccessLayer.DataProtection.Decrypt(Byte[] data)

     at Microsoft.Dynamics.Integration.DataAccessLayer.DataProtection.DecryptSettings(XElement settings)

    Do you know why?

    thank you,

    Feng

  • Suggested answer
    Community Member Profile Picture
    on at

    You will see these errors until the passwords are updated for the integration settings via the Connector client I think.

  • Feng Zhou Profile Picture
    1,575 on at

    But the connector client could not be opened due to those errors.

  • Suggested answer
    Community Member Profile Picture
    on at

    Try launching the client as a user who is a SQL admin.

  • Feng Zhou Profile Picture
    1,575 on at

    Is there any other way I can change the password?

  • Suggested answer
    Community Member Profile Picture
    on at

    No there is not, you need to go through the client.  I suggest opening a support incident to get the permissions fixed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans