Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

A SQL Server Error Occurred, Login Failed for user

Posted on by 20

Hi,

I am able to load the organization dashboard and can query anything in the database from CRM. but as soon as i go to add a user or a person in the organization it fails with the below error.

Now I researched on the error and I've already added the account 'BAYVL00\BAYVL00-121$' in SQL as db owner for both MSCRM database and the organization database, rebooted a couple of times but still the same error. My Dynamics 365 CRM services are running as Network Service.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail: 
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
  <ActivityId>ed3f3fd4-8699-41fc-83ed-4632ea8121a4</ActivityId>
  <ErrorCode>-2147204784</ErrorCode>
  <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiExceptionSourceKey</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Bayonet.U_A_C_CRMPlugInCore.U_A_G_C_F_ContactPreCreate</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiOriginalExceptionKey</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: Generic SQL error. ---&gt; Microsoft.Crm.CrmException: Generic SQL error. ---&gt; System.Data.SqlClient.SqlException: Login failed for user 'BAYVL00\BAYVL00-121$'.
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp; connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Bayonet.U_A_C_CRMPlugInCore.U_A_F_C_U_BVObject.F_S_UpdateObjectBVUI(String V_V_Scalar_String_NameFromWhichToCalculateBVUI, Guid V_V_Scalar_Guid_Object, Entity V_V_Scalar_Entity_Generic)
   at Bayonet.U_A_C_CRMPlugInCore.C_A_F_C_U_Contact.F_S_UpdateContactBVUI(IPluginExecutionContext V_V_Scalar_IPluginExecutionContext_Generic, Entity V_V_Scalar_Entity_Generic)
   at Bayonet.U_A_C_CRMPlugInCore.U_A_G_C_F_ContactPreCreate.G_S_Run(IPluginExecutionContext V_V_Scalar_IPluginExecutionContext_Generic, IOrganizationService V_V_Scalar_IOrganizationService_Generic, Entity V_V_Scalar_Entity_Generic, ITracingService V_V_Scalar_ITracingService_Generic, IServiceProvider V_V_Scalar_IServiceProvider_Generic)
   at Bayonet.U_A_C_CRMPlugInCore.U_A_G_C_F_ContactPreCreate.Execute(IServiceProvider V_V_Scalar_IServiceProvider_Generic)
   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiStepKey</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">739aa522-9d2c-e611-8114-00155dc08301</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiDepthKey</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">1</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiActivityIdKey</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">ed3f3fd4-8699-41fc-83ed-4632ea8121a4</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Active</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiStepSolutionNameKey</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Active</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>Generic SQL error.</Message>
  <Timestamp>2019-06-25T09:11:32.2315826Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault i:nil="true" />
  <OriginalException i:nil="true" />
  <TraceText>

[U_A_C_CRMPlugInCore: Bayonet.U_A_C_CRMPlugInCore.U_A_G_C_F_ContactPreCreate]
[739aa522-9d2c-e611-8114-00155dc08301: Create - Person - Pre-operation]


</TraceText>
</OrganizationServiceFault>


Categories:

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans