Upgrade Database from Kentico 9 to 12 SP1 with SQL Scripts

Jon Bowen asked on September 29, 2020 16:49

I copied a Kentico 9 website and database to my development machine to upgrade it to version 12 (latest hotfix). It was a long process due to all of the custom code that had to be fixed. Now I am ready to deploy to production, but the database copy I have is out of date compared to production and is missing new records like form submissions, eCommerce orders, media library files, etc. My question is if it is possible to take the live database and update it by only running the SQL Scripts provided by each individual Kentico upgrader. Or do additional SQL changes occur when the upgraded site runs for the first time?

Thank you in advance for your help.

Correct Answer

Brenden Kehren answered on September 29, 2020 17:26

It's possible but if you haven't done anything like this before, you're better off running the scripts again. Keep in mind your code is already upgraded to v12sp1 so that's not an issue. All you need is a few "fresh" installs of v10, v11 and v12 to get the db upgrade to properly finish after each major db scrip upgrade.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Jon Bowen answered on September 29, 2020 20:32

Thank you for your help! I tried this out on a test server and it went well. I did see these errors in the event log during the upgrades, but I do not believe they caused any issues.

Error during temporary files creation. Original exception: Could not find file 'C:\WebSites\Kentico10\CMS\CMSSiteUtils\Import\Upgrade_90_100.zip'.

Error during temporary files creation. Original exception: Could not find file 'C:\WebSites\Kentico11\CMS\CMSSiteUtils\Import\Upgrade_100_110.zip'.

Error during temporary files creation. Original exception: Could not find file 'C:\WebSites\Kentico12\CMS\CMSSiteUtils\Import\Upgrade_110_120.zip'.

Thank you

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 29, 2020 20:50

If you see those errors, you'll have a problem. There is a NEED to run the site after each major upgrade. It takes the Upgrade__.zip file and actually performs imports into the system and database. So the easiest thing to do is download the Upgrade files from this page: https://devnet.kentico.com/download/upgrades Install them and simply dig into the file system and extract those .zip files out of the upgrade package and place them in the base code that you have for each version. This will make sure your site is properly upgraded.

Image Text

1 votesVote for this answer Mark as a Correct answer

Jon Bowen answered on September 29, 2020 21:52

That worked! Thank you for your help with this issue

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 30, 2020 10:40

Although it is not officially supported, in some cases this alternate approach could work too.

1 votesVote for this answer Mark as a Correct answer

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