Error about string or binary data being truncated when logging in to Sitecore XP

  • The following error appears when several admin users are logged in to Sitecore XP:

     [SqlException (0x80131904): String or binary data would be truncated.
    The statement has been terminated.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +277
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +764
       System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4243
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +513
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3382
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +710
       System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +540
       System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +391
       Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteNonQuery() +75

    [DataException: Error executing SQL command:  INSERT INTO [Properties] (   [Key], [Value] ) VALUES (   @name, @value )]

    [Exception: String or binary data would be truncated.
    The statement has been terminated.]
       Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteNonQuery() +286
       Sitecore.Data.DataProviders.Sql.<>c__DisplayClass33_0.<Execute>b__0() +73
       Sitecore.Data.DataProviders.NullRetryer.Execute(Func`1 action, Action recover) +287
       Sitecore.Data.Properties.SqlPropertyStore.SetStringValueCore(String prefixedName, String value) +589
       Sitecore.Data.Properties.PropertyStore.SetStringValue(String name, String value) +76
       Sitecore.Web.Authentication.DefaultTicketManager.CreateTicket(String userName, String startUrl, Boolean persist) +558
       Sitecore.Pipelines.LoggedIn.Ticket.Process(LoggedInArgs args) +104

    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
       System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +142
       Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89
       Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +294
       Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) +167
       Sitecore.sitecore.login.Default.LoggedIn() +292
       Sitecore.sitecore.login.Default.LoginClicked(Object sender, EventArgs e) +76
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +141
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5445
  • To resolve the issue, download and install the patch or hotfix compatible with the affected product version:
    • For versions from Sitecore XP 8.2 Update-6 to Sitecore XP 9.0 Update-2:
    • For Sitecore XP 9.2 Initial Release: SC Hotfix

      Be aware that the hotfixes were built for specific Sitecore XP versions, and must not be installed on other Sitecore XP versions or in combination with other hotfixes. If you have already installed other hotfixes on a certain Sitecore XP instance, send a request for a compatibility check to Sitecore Support.

      Note that you must extract the ZIP file contents to locate the installation instructions and related files inside it. You must install the hotfixes on a CM instance and then sync with other instances using the regular development practices.

    To get a solution for other releases, contact Sitecore Support.

Applies to:

CMS 8.2 Update-6 - 9.3 Initial Release

CMS 10.0 Initial Release

May 01, 2020
August 04, 2020

Reference number: