Import Users from kentico9 to kentico12

Mihir Patel asked on February 20, 2020 07:54

I want to import all users with all referenced table data from kentico9 to kentico12. Please suggest the best approach to accomplish this.

As i know kentico import utility will only import user data...

Recent Answers


Roman Hutnyk answered on February 20, 2020 08:53

Kentico import tool should import any data from excel, csv or MS SQL database to whatever table in Kentico database. It will allow you to configure columns mapping.

The only thing I'm not really sure about are references - you might lose them.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 20, 2020 10:26

What type of reference? And what is the reference referring too?

e.g. A Custom Table referencing the itemGUID? As for instance anything referencing by ID (which is auto increment) will make things a lot more difficult as those ID's wont be the same.

How many users are we talking about? As anything under 50 might be easier to just do manually.

If it's something custom perhaps just migrate the users first and create the custom references later just in SQL. Since this will be a one time thing it's only the result that counts at this point.

0 votesVote for this answer Mark as a Correct answer

Anil Bandela answered on February 21, 2020 15:12

Better Approach is take a backup of your Database.

From the back the backup create another database then perform below steps:-

Apply kentico 10 SQL server manual script for upgrade the data changes. Follow the same way do with kentico 11 and kentico 12 now your database table reference gonna match as per kentico 12. In below URL you cab see the 3rd step how to run manual script to the database.

Here you can copy the Users table data and place in kentico 12.

https://docs.kentico.com/k10/installation/upgrading-to-kentico-10/upgrading-kentico-manually

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 21, 2020 15:30

The downside with Anils approach might be that the official upgrade procedure requires you to have a full site start after each upgrade! As there are some migration steps that run after, there could be some migration processes to fields or data that you miss if you don't.

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 21, 2020 16:03

First of all Mihir, you need to determine what the referenced data is from the user table. Kentico has over 70 foriegn key references to a CMS_User object. This is assuming you have no other references set up which may go above and beyond those out of the box references, like a custom page type, custom table or module class that is referencing the user table records (UserID or other fields).

Assuming you're not using all 70+ different features/references, you'd need to figure out where the 70+ different references are and figure out which ones you're using. Once you've figured out those references, then I'd suggest you start writing some code. The code would be Kentico API code which would iterate through the users in your v10 instance and start creating the user and all their child reference records.

I'd highly recommend against using SQL for this as it's sure to cause a lot of issues. I'd also recommend against exporting users and importing them, first because they are different versions, secondly because you won't get all the "referenced data" for those user records.

Another approach would be to use the Kentico Import Toolkit (KIT) and do several imports. Users first, then user settings, then the other referenced tables. The problem with most all of these approaches is your referenced data is most likely referencing the users UserID. The original UserID on the user record will change when you import the data (unless you use the API) and will cause broken/invalid references to child records.

There is no easy around this or out of the box solution for this. You're going to have to do some coding (C# or SQL) in order to make things happen.

0 votesVote for this answer Mark as a Correct answer

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