Different database for user data and custom module classes

Vlad Lepadatu asked on February 23, 2017 12:29


We would like to separate the site configuration data from the all user related data, not only the contacts information. We are also creating several custom module classes and we want to have their tables created in a different database, due to security reasons. Is this possible? If not, what could we do to make it possible?

Thank you.

Correct Answer

Brenden Kehren answered on February 23, 2017 14:37

When you create module classes within Kentico you can define a connection string (from your web.config) in which the class (db table) will connect to. This should allow you to do what you need and still have the ability to use the Kentico API and UI.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Vlad Lepadatu answered on February 23, 2017 14:41


How about the CMS_User and CMS_UserSettings tables, can those be moved to a different database?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 23, 2017 14:55

I'd recommend not even trying because there are too many relationships with users and settings to other objects. If you're using version 10, go to System>Object Types and look for Users. You can see the relationship between a User and 20+ other objects. Not to mention the 60+ different FK relationships on the table as well as references in the stored procedures and views. So I'd highly recommend NOT even attempting to modify the user and settings portion. You'd be better off creating a custom module binding the user object to the custom user settings to store that data vs using the out of the box settings. This solution would have an upgrade path whereas modifying the out of the box user and user settings tables, stored procs, views, etc would not.

0 votesVote for this answer Mark as a Correct answer

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