0

我从使用 sa 登录在本地运行的 Kentico 创建的文件导入到使用托管空间登录在托管站点上运行的 Kentico 实例时遇到问题。

尝试导入导出文件时出现以下错误。Kentico 版本在导出和导入位置是 7.31。

> ERROR:  Error importing 'System tables' objects (Ecommerce - SKU)
Message: [ TableManager.UpdateDocumentViews() ] An error occurred. Original exception: [DataConnection.HandleError]: Query:
CREATE UNIQUE CLUSTERED INDEX [IX_View_CMS_Tree_Joined_Regular_NodeSiteID_DocumentCulture_NodeID] ON [View_CMS_Tree_Joined_Regular]
(
[NodeSiteID] ASC,
[DocumentCulture] ASC,
[NodeID] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF)

CREATE NONCLUSTERED INDEX [IX_View_CMS_Tree_Joined_Regular_ClassName_NodeSiteID_DocumentForeignKeyValue_DocumentCulture] ON [View_CMS_Tree_Joined_Regular]
(
[ClassName] ASC,
[NodeSiteID] ASC,
[DocumentForeignKeyValue] ASC,
[DocumentCulture] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
: caused exception: Index cannot be created on view 'View_CMS_Tree_Joined_Regular' because the underlying object 'CMS_Class' has a different owner. Stack Trace: at CMS.DataEngine.TableManager.RefreshDocumentViews()
at CMS.DataEngine.TableManager.RefreshCustomViews(String tableName)
at CMS.CMSImportExport.ImportProvider.UpdateObject(SiteImportSettings settings, GeneralizedInfo infoObj, Boolean siteObject, DataSet ds, TranslationHelper th, Boolean updateChild, Int32 targetSiteId, ProcessObjectEnum process, Dictionary`2 importedParentIDs, List`1 postProcessList, List`1 affectedObjects, BaseInfo parentObject, Boolean postProcessing)
at CMS.CMSImportExport.ImportProvider.ImportObjects(SiteImportSettings settings, DataSet ds, String objectType, Boolean siteObjects, TranslationHelper th, Boolean importChild, ProcessObjectEnum processType, Dictionary`2 importedParentIDs)

ERROR:  Error during import process
Message: [ TableManager.UpdateDocumentViews() ] An error occurred. Original exception: [DataConnection.HandleError]: Query:
CREATE UNIQUE CLUSTERED INDEX [IX_View_CMS_Tree_Joined_Regular_NodeSiteID_DocumentCulture_NodeID] ON [View_CMS_Tree_Joined_Regular]
(
[NodeSiteID] ASC,
[DocumentCulture] ASC,
[NodeID] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF)

CREATE NONCLUSTERED INDEX [IX_View_CMS_Tree_Joined_Regular_ClassName_NodeSiteID_DocumentForeignKeyValue_DocumentCulture] ON [View_CMS_Tree_Joined_Regular]
(
[ClassName] ASC,
[NodeSiteID] ASC,
[DocumentForeignKeyValue] ASC,
[DocumentCulture] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
: caused exception: Index cannot be created on view 'View_CMS_Tree_Joined_Regular' because the underlying object 'CMS_Class' has a different owner. Stack Trace: at CMS.CMSImportExport.ImportProvider.ImportObjects(SiteImportSettings settings, DataSet ds, String objectType, Boolean siteObjects, TranslationHelper th, Boolean importChild, ProcessObjectEnum processType, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportObjectType(SiteImportSettings settings, String objectType, Boolean siteObject, TranslationHelper th, ProcessObjectEnum process, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportObjectsData(SiteImportSettings settings) 

我注意到站点上的一些表名有不同的所有者,一些 dbo 和一些在我的用户登录下。我希望这是因为它是我在 Kentico app.config 中的用户登录名。与 Management Studio 连接时,我使用相同的登录名。

我认为 dbo 对象必须是通过恢复数据库创建的(我认为它们不能由 Kentico 安装创建,因为它会使用我的登录名登录)

我想一种解决方法是停止使用导出功能 - 并且只恢复数据库,但导出功能很方便。如果可以的话,我们希望让它工作

4

3 回答 3

2

在站点管理器-> 设置-> 系统中设置为数据库对象模式的值是什么?此设置应与 DB 模式匹配,并且所有对象都应具有相同的设置。我建议将表和视图模式统一为同名。

于 2013-05-08T14:27:12.993 回答
2

我设法通过在 SQL Server Management Studio 中将用户名的默认架构更改为 dbo 来解决它

于 2013-05-08T17:04:14.800 回答
0

你在两台机器上安装相同吗?当您没有在原始计算机上安装所有模块时会出现此问题(即使您不使用它们)。配置 Import 时尝试排除 System 表的所有 Ecommerce 对象。

于 2013-05-13T06:21:03.003 回答