错误:在Kentico中导入“系统表”对象(电子商务 - SKU)时出错

时间:2013-05-07 21:45:03

标签: sql-server kentico

我遇到从使用sa loggin在本地运行的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安装创建,因为它将使用我的登录登录)

我想一个解决方法是停止使用导出功能 - 只恢复数据库,但导出功能很方便。如果我们能

,我们希望它能够运作

3 个答案:

答案 0 :(得分:2)

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

答案 1 :(得分:2)

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

答案 2 :(得分:0)

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