将 Kentico 的生产数据库复制到开发中

Copy Kentico's production database to development

我们有带 MVC 的 Kentico 11.0.26。

正在尝试通过复制生产表来设置 Kentico 数据库的开发实例。使用 SSMS 创建新数据库,然后使用导入数据向导复制表。没有发生错误,可能是因为新数据库。

必须更改连接字符串,因为开发 SQL 服务器不接受 SQL 身份验证。新连接字符串:

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

似乎我可以使用管理员帐户登录,但之后立即出现此错误:

[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<br> CMS.DataEngine.AbstractInfoProvider3.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

我们可以将数据库从 azure 导出到 BLOB,因为 azure 会给你 .bacpac 文件。
然后您可以通过导入数据层应用程序使用 SSMS 恢复文件。