1
votes

We have Kentico 11.0.26 with MVC.

Was trying to set up a development instance of Kentico database by copying the production tables. Created new database using SSMS, and then using import data wizard to copy tables. No errors occurred, probably because of new database.

Had to change connection string because development SQL Server does not accept SQL authentication. New connection string:

   <add name="CMSConnectionString" connectionString="Server=sql-server;Database=Kentico_DB;Trusted_Connection=True;MultipleActiveResultSets=False;Encrypt=True; TrustServerCertificate=True; Connection Timeout=30;" />

Seems like I can log in with admin account but get this error right after:

[Exception: [SimpleDataClass.AddIDWhere]: The object is missing the ID column '' value, the operation cannot be performed.]
CMS.DataEngine.SimpleDataClass.AddIDWhere(DataQuery q, String columnName) +153 CMS.DataEngine.SimpleDataClass.Update() +377
CMS.DataEngine.AbstractInfoBase1.UpdateData() +341
CMS.DataEngine.AbstractInfoProvider
3.SetInfo(TInfo info) +761
CMS.Membership.UserInfoProvider.SetUserInfoInternal(UserInfo user) +601 CMS.Membership.AuthenticationHelper.FinalizeAuthenticationProcess(UserInfo user, Int32 siteId) +273
CMS.Membership.AuthenticationHelper.AuthenticateUser(String userName, String password, String siteName, Boolean login, AuthenticationSourceEnum source) +1478
CMS.MembershipProvider.CMSMembershipProvider.ValidateUser(String username, String password) +48
CMSPages_logon.Login1_Authenticate(Object sender, AuthenticateEventArgs e) in C:\path-to-kentico-cms\CMS\CMSPages\logon.aspx.cs:500
System.Web.UI.WebControls.Login.AttemptLogin() +155
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +111 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5445

1
Why not create a Full and Complete Backup of the PROD database and then restore it in your DEV Environment instead? This way all keys, indexes, etc are preserved in the DEV Database. - Mark Kram
I was able to use your instructions and some online articles to create an Azure backpac file from production Kentico, download it locally (SSMS v18 allows you to connect to Azure storage directly) and use SSMS to import data-tier application. You have to right click Databases node in SSMS for the "Import Data-tier Application" option to appear. - joym8

1 Answers

0
votes

We can export the DB from azure to BLOB as azure will give you .bacpac file.
Then you can restore the file using SSMS by Import Data-Tier application.