[Upgrade to Kentico V10] Get minor errors of migrating data after running upgrading.exe finished

Ha Son Nguyen Tat asked on October 18, 2017 19:32

Hi Kentico Expert,

In current time, although the running upgrading.exe application is finished with some minor errors of migrating data and the upgrading to Kentico 10 process still was finished successfully. However, we still were worry about impact of some minor errors of migrating data to our web application. Moreover, we read these errors and it's cause in log.txt file. the error content was related to Kentico CMS's table, so we have question to you:

Does these minor errors of migrating data (detail: error of conflict field in database) affect to web application after upgrading successfully?


If yes, How are these errors impacting to web application? You could explain more detail to help us handle these errors?


If no, Could you explain the reasons why is happening these errors in process of migrating data in database?


Please you could review particular errors to be logged in our log.txt file through attached images.

Handle_Error_1 Handle_Error_2Handle_Error_3

Thank Kentico's Expert so much for yours support.!

Recent Answers


Trevor Fayas answered on October 19, 2017 13:39 (last edited on October 19, 2017 13:41)

I've ran into these exact errors. There is a point in the upgrade SQL that it tries to delete a parent settings category but it misses a child first and this fails.

I restored the database back, manually edited the upgrade SQL to deleted the child first then re ran. There are 2 spots that need the modification. When I get into the office I'll try to find my updated SQL upgrade script that corrected this.

I think this occurs only when doing a multiple upgrade (one that started on say 8 originally) as the resource is a leftover from previous versions and wasn't there in 9

1 votesVote for this answer Mark as a Correct answer

Ha Son Nguyen Tat answered on October 19, 2017 14:20

Hi Expert Kentico and Thanks for your support, Hope you help us by providing your updated SQL upgrade script to help us delete the child first or you could list what are their child name to help us delete them by method of manual delete and re-running upgrading.exe

Thank you so much for your support!

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on October 19, 2017 15:27 (last edited on October 19, 2017 15:30)

Ha Son, can you email me so i can send you the fixed SQL? I couldn't find my original so i just re-created it, basically it just adds 3 new delete statements to remove the children of the errored out resources. Kentico 8 had children, but Kentico 9 didn't, so when you go from 8 to 9, those children remain and the 9 to 10 sql doesn't account for them.

email me at tfayas@hbs.net

Or just run these lines on your database before upgrading:

-- Custom, remove settings Keys and Categories first before removing that module
Delete from [CMS_SettingsKey] where [KeyCategoryID] in (Select CategoryID from [CMS_SettingsCategory] where CategoryResourceID = (Select ResourceID from [CMS_Resource] WHERE [ResourceGUID] = 'f3233ad0-50ee-45e3-b50f-6c1d8e90dbb0'))
Delete FROM [CMS_SettingsCategory] where CategoryResourceID = (Select ResourceID from [CMS_Resource] WHERE [ResourceGUID] = 'f3233ad0-50ee-45e3-b50f-6c1d8e90dbb0')


    -- Custom Remove any children and grandchildren reports first
DELETE FROM [Reporting_ReportCategory] where CategoryParentID in (
    select CategoryID FROM [Reporting_ReportCategory] where CategoryParentID = (
        Select CategoryID FROM [Reporting_ReportCategory] WHERE [CategoryGUID] = '8d008d2b-daef-4d44-aff7-4a3b39d8c33b'
        )
    )

DELETE FROM [Reporting_ReportCategory] where CategoryParentID = (
    Select CategoryID FROM [Reporting_ReportCategory] WHERE [CategoryGUID] = '8d008d2b-daef-4d44-aff7-4a3b39d8c33b'
    )
0 votesVote for this answer Mark as a Correct answer

Ha Son Nguyen Tat answered on October 25, 2017 06:00

Hi Expert Kentico and Thanks for your support,

Sorry guys for unable to send our database structure to your email because we need to keep security for data.

We understood your explanation. We checked and applied running your SQL Script, but it failed with these queries. As your SQL script, it still was missing SQL queries to remove all relating dependencies. We also tried to study some queries to remove all relating dependencies following the order (remove child elements firstly and forward to remove parent elements), but it still failed and it made to break these queries because some Kentico CMS's tables has quite many child-parent dependencies on these respective tables.

We forwarded to queries command following the order (Firstly, using "ALTER TABLE ... DROP CONSTRAINT" to remove relationship constrains and forward to delete rows. Finally, using "ALTER TABLE ... ADD CONSTRAINT" to add relationship constrains to back again). ---> It makes our queries to run successfully, but we were feeling that it was lots of risk.

  • We are going to direct to the solution is that we will do nothing.

    Could Kentico's experts help us confirm and make sure that it will have no impact if the remove the children of the errored out resources happened in upgrading process although the process of upgrading to Kentico 10 was still successfull?

    If they were impact, How the problem of the remove the children of the errored out resources affect to new feature in Kentico 10 although the process of upgrading to Kentico 10 was still successfull?

Thank Kentico's Expert so much.!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.