操作方法
已标识可能导致分支版本系统表不一致的工作流。 当遇到此类问题时,缺失分支版本化元数据的要素可能会在协调、提交和/或删除版本时导致数据不一致。
问题源于在保存编辑内容、协调和提交过程中维护分支版本化元数据的方式。 在这些操作过程中,可能会从地理数据库中移除分支版本化元数据。 当错误移除分支版本化元数据后,要素可能无法正确参与未来的操作,例如协调、提交和删除版本,从而导致数据不一致。 该问题发生在竞争条件下,相互冲突的请求导致错误地移除有效要素的分支版本化元数据。
针对错误分支版本化元数据执行的操作可能导致:
以下版本中可避免并修复这些系统表不一致:
升级企业级地理数据库还将检查是否存在与分支版本化数据相关的任何数据不一致。 在升级过程中,将通过创建具有已修复数据的新版本或者更新现有版本来解决不一致。 应审查这些版本,以确定是否应将这些版本中的任何数据提交到默认版本。
本文介绍了在地理数据库升级后,审核已解决的不一致问题的工作流。 如上所述,升级可以通过两种方式来修复数据:创建新的恢复版本或者更新现有版本。 考虑到本文的目的,这些版本分别称为新的恢复版本和具有已恢复行的现有版本。 本文所审核的地理数据库具有两个版本,将对其进行访问和审核。 这些版本的名称如下:
提供的工作流展示了可以采集有关这些版本的信息的位置,连接到这些版本的方式,以及可能需要在 ArcGIS Pro 中针对这些版本执行的操作。
以下为该工作流的概述:
WARNING 003929: During the upgrade recovery versions (<value>) were created that require further review. Review <value> for more detail.
如果在升级过程中检测到不一致,则“升级地理数据库”工具将返回一条警告,其中说明了已恢复的版本数量以及 sde_setup.log 文件的位置,如下图所示。 有关地理数据库升级的消息会写入 sde_setup.log 文件,将在运行此工具的相应计算机上为 %TEMP% 变量所指定的目录中创建该文件。 版本数量既包括新的恢复版本,也包括具有已恢复行的现有版本。 sde_setup.log 文件包含有关已修复版本的附加信息。

Note: If using Python to upgrade the geodatabase, use the following example to ensure that warnings are properly returned to report recovery versions. If no warning is returned, no data inconsistencies were found in the geodatabase and no further action is required.
import arcpy
arcpy.UpgradeGDB_management(
input_workspace=r"C:\temp\sysadmin_connection.sde",
input_prerequisite_check="PREREQUISITE_CHECK",
input_upgradegdb_check="UPGRADE"
)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
if "WARNING 003929" in warnings:
print(warnings)
elif "Recovery versions" in warnings:
recovery_versions = warnings[warnings.find("Recovery versions"):warnings.find(")") + 1]
for item in warnings.split("\n"):
if "sde_setup.log" in item:
logfile_loc = item.strip()
print("--------------------------------------------------------------------------------------------------")
print(f"WARNING 003929: During the upgrade {recovery_versions} were created that require further review.")
print(f"Review {logfile_loc} for more detail.")
print("--------------------------------------------------------------------------------------------------")
if errors:
print(errors)
如有必要,请下载示例 sde_setup_howto.log 文件并使用文本编辑器将其打开;将在以下步骤中引用此文件的部分内容。
[08:51:34.091] ================================================================== [08:51:34.091] Begin recovery of branch versioned data associated with a missing branch... [08:51:37.302] Created recovery version(s): [08:51:37.302] sde.RECOVERY_VERSION_BR_1 with edits to: [08:51:37.302] - CREATOR1.POINT [08:51:37.302] - CREATOR1.LINE [08:51:37.302] - CREATOR1.POLYGON [08:51:37.302] Completed recovery of branch versioned data associated with a missing branch. [08:51:37.302] An administrator must update the service_name for the above versions in the sde.SDE_branches table in order for users to connect and review. [08:51:37.303] ==================================================================
[08:51:37.304] Begin recovery of branch versioned data associated with an invalid common ancestor moment...
[08:51:37.622] Recovered rows in version(s):
[08:51:37.622] ADMIN.EXISTING_VERSION (service: Post_DataLoss) with edits to:
[08:51:37.622] - CREATOR1.POINT
Object ID(s) : {46,436}
[08:51:37.622] - CREATOR1.POLYGON
Object ID(s) : {462}
[08:51:37.622] Completed recovery of branch versioned data associated with an invalid common ancestor moment.
[08:51:37.622] A portal user must connect and review the above version(s).
在审核恢复版本之前,需要完成多个步骤。 以下部分介绍了准备新的恢复版本和具有已恢复行的现有版本以供进行访问和审核的过程。
要使用 RECOVERY_VERSION_BR_<branch_id> 命名规范准备每个新的恢复版本:
Note: If a service does not exist in your portal with these datasets referenced, a new service must be published. Add these distinct datasets to a new map as the dataset owner, and publish a web feature layer with the version management capability enabled (Share branch versioned data).
UPDATE sde.sde_branches SET service_name = 'my_service_name' WHERE name = 'RECOVERY_VERSION_BR_1';
Note: If a service does not exist in your portal with these datasets referenced, a new service must be published. Add these distinct datasets to a new map as the dataset owner, and publish a web feature layer with the version management capability enabled (Share branch versioned data), using the same service name.
这些版本现已准备就绪,可供查看已修复的数据。

Note: If a new recovery version only has edits to dataset system tables, for example: only Utility Network system tables, the Differences view may not display changes; therefore, the version can be deleted.
文章 ID: 000032501
获取来自 ArcGIS 专家的帮助
立即开始聊天