Browse Source

贵州项目数据迁移步骤说明

lin.chen 7 years ago
parent
commit
bd3503498c
28 changed files with 456 additions and 4 deletions
  1. 25 0
      TRS.WCM.Developer/贵州项目/MigrationSteps.md
  2. 1 4
      TRS.WCM.Developer/贵州项目/sp/call_p_city1.sql
  3. 86 0
      TRS.WCM.Developer/贵州项目/sp/call_p_city2.sql
  4. 86 0
      TRS.WCM.Developer/贵州项目/sp/call_p_city3.sql
  5. 86 0
      TRS.WCM.Developer/贵州项目/sp/call_p_city4.sql
  6. 86 0
      TRS.WCM.Developer/贵州项目/sp/call_p_city5.sql
  7. 86 0
      TRS.WCM.Developer/贵州项目/sp/call_p_city6.sql
  8. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannel.sql
  9. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelchildindexquote.sql
  10. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelsyn.sql
  11. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchnldoc.sql
  12. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmdocument.sql
  13. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmfolderpublishconfig.sql
  14. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmmetatable.sql
  15. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplate.sql
  16. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateargument.sql
  17. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateemploy.sql
  18. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatenest.sql
  19. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatequote.sql
  20. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmwebsite.sql
  21. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfo.sql
  22. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfoview.sql
  23. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmdbinfo.sql
  24. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewemployer.sql
  25. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewfieldgroup.sql
  26. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmtableinfo.sql
  27. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewfieldinfo.sql
  28. 0 0
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewinfo.sql

+ 25 - 0
TRS.WCM.Developer/贵州项目/MigrationSteps.md

@@ -0,0 +1,25 @@
+# 运行 sp 目录下的所有 p_data_migration_... 存储过程
+
+# 迁移第一个节点 
+##### 将 cmwcm_city1 数据库中的所有元数据表(结构+数据)直接复制至海云trs_hycloud_iip数据库下,并修改表名,给这些元数据表加上后缀 '_city1'
+##### 在linux环境下SQL命令行中执行 call_p_city1.sql
+
+# 迁移第二个节点 
+##### 将 cmwcm_city2 数据库中的所有元数据表(结构+数据)直接复制至海云trs_hycloud_iip数据库下,并修改表名,给这些元数据表加上后缀 '_city2'
+##### 在linux环境下SQL命令行中执行 call_p_city2.sql
+
+# 迁移第三个节点 
+##### 将 cmwcm_city3 数据库中的所有元数据表(结构+数据)直接复制至海云trs_hycloud_iip数据库下,并修改表名,给这些元数据表加上后缀 '_city3'
+##### 在linux环境下SQL命令行中执行 call_p_city3.sql
+
+# 迁移第四个节点
+##### 将 cmwcm_city4 数据库中的所有元数据表(结构+数据)直接复制至海云trs_hycloud_iip数据库下,并修改表名,给这些元数据表加上后缀 '_city4'
+##### 在linux环境下SQL命令行中执行 call_p_city4.sql
+
+# 迁移第五个节点
+##### 将 cmwcm_city5 数据库中的所有元数据表(结构+数据)直接复制至海云trs_hycloud_iip数据库下,并修改表名,给这些元数据表加上后缀 '_city5'
+##### 在linux环境下SQL命令行中执行 call_p_city5.sql
+
+# 迁移第六个节点
+##### 将 cmwcm_city6 数据库中的所有元数据表(结构+数据)直接复制至海云trs_hycloud_iip数据库下,并修改表名,给这些元数据表加上后缀 '_city6'
+##### 在linux环境下SQL命令行中执行 call_p_city6.sql

+ 1 - 4
TRS.WCM.Developer/sp/call_p.sql → TRS.WCM.Developer/贵州项目/sp/call_p_city1.sql

@@ -1,10 +1,7 @@
 
 
-# !!!执行存储过程前,需要提前将所有元数据表(结构+数据)直接复制至海云
-# 并按照city1-city6给所有元数据表加上后缀 '_city1', '_city2', '_city3', '_city4', '_city5', '_city6'
 
-
-pager cat >> /tmp/p_data_migration.log;
+pager cat >> /home/p_data_migration_city1.log;
 
 
 # 每迁移一个wcm节点,@n 必须手动 +1

+ 86 - 0
TRS.WCM.Developer/贵州项目/sp/call_p_city2.sql

@@ -0,0 +1,86 @@
+
+
+
+pager cat >> /home/p_data_migration_city2.log;
+
+
+# 每迁移一个wcm节点,@n 必须手动 +1
+SET @n = 2;
+
+# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
+SET @citySuffix = concat('_city', @n);
+
+
+
+
+# 支持断点续传,上一次迁移的最后一个 xx ID
+SET @prevSiteId = 0;
+SET @prevChannelId = 0;
+SET @prevRecId = 0;
+SET @prevDocId = 0;
+SET @prevChannelSynId = 0;
+SET @prevFolderPublishConfigId = 0;
+SET @prevTemplateId = 0;
+SET @prevTemplateArgId = 0;
+SET @prevTemplateEmployId = 0;
+SET @prevTemplateNestId = 0;
+SET @prevTemplateQuoteId = 0;
+SET @prevClassInfoId = 0;
+SET @prevClassInfoViewId = 0;
+SET @prevFieldId = 0;
+SET @prevMetaViewEmployerId = 0;
+SET @prevTableInfoId = 0;
+SET @prevViewFieldId = 0;
+SET @prevViewId = 0;
+SET @prevMetaViewFieldGroupId = 0;
+
+
+
+# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
+SET @siteIdOffset = 1000 * @n;
+SET @channelIdOffset = 100000 * @n;
+SET @channelSynIdOffset = 100000 * @n;
+SET @templateIdOffset = 100000 * @n;
+SET @recIdOffset = 10000000 * @n;
+SET @docIdOffset = 10000000 * @n;
+SET @viewIdOffset = 1000 * @n;
+SET @folderPublishConfigIdOffset = 100000 * @n;
+SET @templateArgIdOffset = 100000 * @n;
+SET @templateEmployIdOffset = 1000000 * @n;
+SET @templateNestIdOffset = 100000 * @n;
+SET @templateQuoteIdOffset = 1000000 * @n;
+SET @classInfoIdOffset = 10000 * @n;
+SET @fieldIdOffset = 100000 * @n;
+SET @tableInfoIdOffset = 1000 * @n;
+SET @metaViewEmployerIdOffset = 100000 * @n;
+SET @viewFieldIdOffset = 100000 * @n;
+SET @dbFieldIdOffset = 100000 * @n;
+SET @fieldGroupIdOffset = 1000 * @n;
+SET @metaViewFieldGroupIdOffset = 1000 * @n;
+
+
+
+call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
+call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
+call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
+call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
+call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
+call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
+call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
+call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
+call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
+call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
+
+
+nopager;

+ 86 - 0
TRS.WCM.Developer/贵州项目/sp/call_p_city3.sql

@@ -0,0 +1,86 @@
+
+
+
+pager cat >> /home/p_data_migration_city3.log;
+
+
+# 每迁移一个wcm节点,@n 必须手动 +1
+SET @n = 3;
+
+# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
+SET @citySuffix = concat('_city', @n);
+
+
+
+
+# 支持断点续传,上一次迁移的最后一个 xx ID
+SET @prevSiteId = 0;
+SET @prevChannelId = 0;
+SET @prevRecId = 0;
+SET @prevDocId = 0;
+SET @prevChannelSynId = 0;
+SET @prevFolderPublishConfigId = 0;
+SET @prevTemplateId = 0;
+SET @prevTemplateArgId = 0;
+SET @prevTemplateEmployId = 0;
+SET @prevTemplateNestId = 0;
+SET @prevTemplateQuoteId = 0;
+SET @prevClassInfoId = 0;
+SET @prevClassInfoViewId = 0;
+SET @prevFieldId = 0;
+SET @prevMetaViewEmployerId = 0;
+SET @prevTableInfoId = 0;
+SET @prevViewFieldId = 0;
+SET @prevViewId = 0;
+SET @prevMetaViewFieldGroupId = 0;
+
+
+
+# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
+SET @siteIdOffset = 1000 * @n;
+SET @channelIdOffset = 100000 * @n;
+SET @channelSynIdOffset = 100000 * @n;
+SET @templateIdOffset = 100000 * @n;
+SET @recIdOffset = 10000000 * @n;
+SET @docIdOffset = 10000000 * @n;
+SET @viewIdOffset = 1000 * @n;
+SET @folderPublishConfigIdOffset = 100000 * @n;
+SET @templateArgIdOffset = 100000 * @n;
+SET @templateEmployIdOffset = 1000000 * @n;
+SET @templateNestIdOffset = 100000 * @n;
+SET @templateQuoteIdOffset = 1000000 * @n;
+SET @classInfoIdOffset = 10000 * @n;
+SET @fieldIdOffset = 100000 * @n;
+SET @tableInfoIdOffset = 1000 * @n;
+SET @metaViewEmployerIdOffset = 100000 * @n;
+SET @viewFieldIdOffset = 100000 * @n;
+SET @dbFieldIdOffset = 100000 * @n;
+SET @fieldGroupIdOffset = 1000 * @n;
+SET @metaViewFieldGroupIdOffset = 1000 * @n;
+
+
+
+call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
+call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
+call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
+call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
+call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
+call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
+call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
+call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
+call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
+call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
+
+
+nopager;

+ 86 - 0
TRS.WCM.Developer/贵州项目/sp/call_p_city4.sql

@@ -0,0 +1,86 @@
+
+
+
+pager cat >> /home/p_data_migration_city4.log;
+
+
+# 每迁移一个wcm节点,@n 必须手动 +1
+SET @n = 4;
+
+# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
+SET @citySuffix = concat('_city', @n);
+
+
+
+
+# 支持断点续传,上一次迁移的最后一个 xx ID
+SET @prevSiteId = 0;
+SET @prevChannelId = 0;
+SET @prevRecId = 0;
+SET @prevDocId = 0;
+SET @prevChannelSynId = 0;
+SET @prevFolderPublishConfigId = 0;
+SET @prevTemplateId = 0;
+SET @prevTemplateArgId = 0;
+SET @prevTemplateEmployId = 0;
+SET @prevTemplateNestId = 0;
+SET @prevTemplateQuoteId = 0;
+SET @prevClassInfoId = 0;
+SET @prevClassInfoViewId = 0;
+SET @prevFieldId = 0;
+SET @prevMetaViewEmployerId = 0;
+SET @prevTableInfoId = 0;
+SET @prevViewFieldId = 0;
+SET @prevViewId = 0;
+SET @prevMetaViewFieldGroupId = 0;
+
+
+
+# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
+SET @siteIdOffset = 1000 * @n;
+SET @channelIdOffset = 100000 * @n;
+SET @channelSynIdOffset = 100000 * @n;
+SET @templateIdOffset = 100000 * @n;
+SET @recIdOffset = 10000000 * @n;
+SET @docIdOffset = 10000000 * @n;
+SET @viewIdOffset = 1000 * @n;
+SET @folderPublishConfigIdOffset = 100000 * @n;
+SET @templateArgIdOffset = 100000 * @n;
+SET @templateEmployIdOffset = 1000000 * @n;
+SET @templateNestIdOffset = 100000 * @n;
+SET @templateQuoteIdOffset = 1000000 * @n;
+SET @classInfoIdOffset = 10000 * @n;
+SET @fieldIdOffset = 100000 * @n;
+SET @tableInfoIdOffset = 1000 * @n;
+SET @metaViewEmployerIdOffset = 100000 * @n;
+SET @viewFieldIdOffset = 100000 * @n;
+SET @dbFieldIdOffset = 100000 * @n;
+SET @fieldGroupIdOffset = 1000 * @n;
+SET @metaViewFieldGroupIdOffset = 1000 * @n;
+
+
+
+call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
+call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
+call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
+call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
+call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
+call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
+call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
+call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
+call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
+call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
+
+
+nopager;

+ 86 - 0
TRS.WCM.Developer/贵州项目/sp/call_p_city5.sql

@@ -0,0 +1,86 @@
+
+
+
+pager cat >> /home/p_data_migration_city5.log;
+
+
+# 每迁移一个wcm节点,@n 必须手动 +1
+SET @n = 5;
+
+# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
+SET @citySuffix = concat('_city', @n);
+
+
+
+
+# 支持断点续传,上一次迁移的最后一个 xx ID
+SET @prevSiteId = 0;
+SET @prevChannelId = 0;
+SET @prevRecId = 0;
+SET @prevDocId = 0;
+SET @prevChannelSynId = 0;
+SET @prevFolderPublishConfigId = 0;
+SET @prevTemplateId = 0;
+SET @prevTemplateArgId = 0;
+SET @prevTemplateEmployId = 0;
+SET @prevTemplateNestId = 0;
+SET @prevTemplateQuoteId = 0;
+SET @prevClassInfoId = 0;
+SET @prevClassInfoViewId = 0;
+SET @prevFieldId = 0;
+SET @prevMetaViewEmployerId = 0;
+SET @prevTableInfoId = 0;
+SET @prevViewFieldId = 0;
+SET @prevViewId = 0;
+SET @prevMetaViewFieldGroupId = 0;
+
+
+
+# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
+SET @siteIdOffset = 1000 * @n;
+SET @channelIdOffset = 100000 * @n;
+SET @channelSynIdOffset = 100000 * @n;
+SET @templateIdOffset = 100000 * @n;
+SET @recIdOffset = 10000000 * @n;
+SET @docIdOffset = 10000000 * @n;
+SET @viewIdOffset = 1000 * @n;
+SET @folderPublishConfigIdOffset = 100000 * @n;
+SET @templateArgIdOffset = 100000 * @n;
+SET @templateEmployIdOffset = 1000000 * @n;
+SET @templateNestIdOffset = 100000 * @n;
+SET @templateQuoteIdOffset = 1000000 * @n;
+SET @classInfoIdOffset = 10000 * @n;
+SET @fieldIdOffset = 100000 * @n;
+SET @tableInfoIdOffset = 1000 * @n;
+SET @metaViewEmployerIdOffset = 100000 * @n;
+SET @viewFieldIdOffset = 100000 * @n;
+SET @dbFieldIdOffset = 100000 * @n;
+SET @fieldGroupIdOffset = 1000 * @n;
+SET @metaViewFieldGroupIdOffset = 1000 * @n;
+
+
+
+call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
+call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
+call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
+call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
+call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
+call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
+call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
+call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
+call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
+call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
+
+
+nopager;

+ 86 - 0
TRS.WCM.Developer/贵州项目/sp/call_p_city6.sql

@@ -0,0 +1,86 @@
+
+
+
+pager cat >> /home/p_data_migration_city6.log;
+
+
+# 每迁移一个wcm节点,@n 必须手动 +1
+SET @n = 6;
+
+# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
+SET @citySuffix = concat('_city', @n);
+
+
+
+
+# 支持断点续传,上一次迁移的最后一个 xx ID
+SET @prevSiteId = 0;
+SET @prevChannelId = 0;
+SET @prevRecId = 0;
+SET @prevDocId = 0;
+SET @prevChannelSynId = 0;
+SET @prevFolderPublishConfigId = 0;
+SET @prevTemplateId = 0;
+SET @prevTemplateArgId = 0;
+SET @prevTemplateEmployId = 0;
+SET @prevTemplateNestId = 0;
+SET @prevTemplateQuoteId = 0;
+SET @prevClassInfoId = 0;
+SET @prevClassInfoViewId = 0;
+SET @prevFieldId = 0;
+SET @prevMetaViewEmployerId = 0;
+SET @prevTableInfoId = 0;
+SET @prevViewFieldId = 0;
+SET @prevViewId = 0;
+SET @prevMetaViewFieldGroupId = 0;
+
+
+
+# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
+SET @siteIdOffset = 1000 * @n;
+SET @channelIdOffset = 100000 * @n;
+SET @channelSynIdOffset = 100000 * @n;
+SET @templateIdOffset = 100000 * @n;
+SET @recIdOffset = 10000000 * @n;
+SET @docIdOffset = 10000000 * @n;
+SET @viewIdOffset = 1000 * @n;
+SET @folderPublishConfigIdOffset = 100000 * @n;
+SET @templateArgIdOffset = 100000 * @n;
+SET @templateEmployIdOffset = 1000000 * @n;
+SET @templateNestIdOffset = 100000 * @n;
+SET @templateQuoteIdOffset = 1000000 * @n;
+SET @classInfoIdOffset = 10000 * @n;
+SET @fieldIdOffset = 100000 * @n;
+SET @tableInfoIdOffset = 1000 * @n;
+SET @metaViewEmployerIdOffset = 100000 * @n;
+SET @viewFieldIdOffset = 100000 * @n;
+SET @dbFieldIdOffset = 100000 * @n;
+SET @fieldGroupIdOffset = 1000 * @n;
+SET @metaViewFieldGroupIdOffset = 1000 * @n;
+
+
+
+call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
+call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
+call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @siteIdOffset, @channelIdOffset);
+call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
+call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
+call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
+call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
+call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
+call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
+call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
+call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
+call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
+
+
+nopager;

+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmchannel.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannel.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmchannelchildindexquote.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelchildindexquote.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmchannelsyn.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelsyn.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmchnldoc.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchnldoc.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmdocument.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmdocument.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmfolderpublishconfig.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmfolderpublishconfig.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmmetatable.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmmetatable.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmtemplate.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplate.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmtemplateargument.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateargument.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmtemplateemploy.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateemploy.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmtemplatenest.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatenest.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmtemplatequote.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatequote.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_wcmwebsite.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmwebsite.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmclassinfo.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfo.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmclassinfoview.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfoview.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmdbinfo.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmdbinfo.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmmetaviewemployer.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewemployer.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmmetaviewfieldgroup.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewfieldgroup.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmtableinfo.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmtableinfo.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmviewfieldinfo.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewfieldinfo.sql


+ 0 - 0
TRS.WCM.Developer/sp/p_data_migration_xwcmviewinfo.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewinfo.sql