umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.45k stars 2.68k forks source link

Error while migrating from v-7.15.3 to v-8.5.4 - String or binary data truncated #7799

Closed guruprasad83 closed 2 years ago

guruprasad83 commented 4 years ago

My Current Umbraco version is 7.15.3. I am trying to migrate it to 8.5.4 I followed this blog -https://our.umbraco.com/documentation/getting-started/setup/upgrading/migrating-to-v8 By creating new site and then started migration to the old database. But am getting error -

The database configuration failed with the following message: String or binary data would be truncated.The statement has been terminated. Please check log file for additional information

Any help would be greatly appreciated

Snippet from my log file below

{"@t":"2020-03-12T12:46:44.2655007Z","@mt":"Exception ({InstanceId}).","@l":"Error","@x":"System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.\r\nThe statement has been terminated.\r\n   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)\r\n   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n   at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)\r\n   at NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd)\r\n   at NPoco.Database.Execute(String sql, CommandType commandType, Object[] args)\r\nClientConnectionId:fd6ca84a-b44f-42db-ac44-baba3bdcde2e\r\nError Number:8152,State:10,Class:16","InstanceId":"0de0fc46","SourceContext":"Umbraco.Core.Persistence.UmbracoDatabase","ProcessId":23008,"ProcessName":"w3wp","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC5ROOT","MachineName":"DESKTOP-S6JM93S","Log4NetLevel":"ERROR","HttpRequestNumber":13,"HttpRequestId":"2e31b76c-aeaa-4a74-8e40-aedfa3e48c1b"}
{"@t":"2020-03-12T12:46:58.3222203Z","@mt":"Database configuration failed","@l":"Error","@x":"System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.\r\nThe statement has been terminated.\r\n   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)\r\n   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n   at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)\r\n   at NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd)\r\n   at NPoco.Database.Execute(String sql, CommandType commandType, Object[] args)\r\n   at Umbraco.Core.Migrations.MigrationExpressionBase.ExecuteStatement(StringBuilder stmtBuilder)\r\n   at Umbraco.Core.Migrations.MigrationExpressionBase.Execute()\r\n   at Umbraco.Core.Migrations.MigrationBase.ReplaceColumn[T](String tableName, String currentName, String newName)\r\n   at Umbraco.Core.Migrations.Upgrade.V_8_0_0.VariantsMigration.MigratePropertyData()\r\n   at Umbraco.Core.Migrations.Upgrade.V_8_0_0.VariantsMigration.Migrate()\r\n   at Umbraco.Core.Migrations.MigrationBase.Umbraco.Core.Migrations.IMigration.Migrate()\r\n   at Umbraco.Core.Migrations.MigrationPlan.Execute(IScope scope, String fromState, IMigrationBuilder migrationBuilder, ILogger logger)\r\n   at Umbraco.Core.Migrations.Upgrade.Upgrader.Execute(IScopeProvider scopeProvider, IMigrationBuilder migrationBuilder, IKeyValueService keyValueService, ILogger logger)\r\n   at Umbraco.Core.Migrations.Install.DatabaseBuilder.UpgradeSchemaAndData(MigrationPlan plan)\r\nClientConnectionId:fd6ca84a-b44f-42db-ac44-baba3bdcde2e\r\nError Number:8152,State:10,Class:16","SourceContext":"Umbraco.Core.Migrations.Install.DatabaseBuilder","ProcessId":23008,"ProcessName":"w3wp","ThreadId":14,"AppDomainId":2,"AppDomainAppId":"LMW3SVC5ROOT","MachineName":"DESKTOP-S6JM93S","Log4NetLevel":"ERROR","HttpRequestNumber":13,"HttpRequestId":"2e31b76c-aeaa-4a74-8e40-aedfa3e48c1b"}
nul800sebastiaan commented 4 years ago

It looks like your database configuration might have been changed for some reason on v7 and it is now invalid for migrating to v8. Maybe these tips from @stevemegson here can help you along? https://our.umbraco.com/forum/umbraco-8/99133-how-to-upgrade-to-umbraco-8#comment-312539

umbrabot commented 2 years ago

Hi there @guruprasad83,

Just wanted to let you know that we noticed that this issue got a bit stale and we haven't been able to get to this idea. We will close this idea for now, as we haven't been able to prioritize it yet.

Once we get time to work on ideas that are in this category we'll review and update existing issues like this one to let you know we're working on it.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face: