Diagnose Version Tables (Data Management)

Summary

Identifies inconsistencies in the delta (A and D) tables of a versioned geodatabase.

Usage

  • This tool can be run against enterprise geodatabases.

  • This tool is not supported for geodatabases in SAP HANA.

  • Only the geodatabase administrator can run the Diagnose Version Tables tool.

Syntax

DiagnoseVersionTables(input_database, out_log, {target_version}, {input_tables})
ParameterExplanationData Type
input_database

Provide a database connection (.sde file) to the enterprise geodatabase in which you suspect delta table inconsistencies exist. The connection must be made as the geodatabase administrator.

Workspace
out_log

The path and name of the output log file. The log file is an ASCII file containing a list of the tables in the specified version that contain orphaned records, as well as information about what connection file, geodatabase version, and tables for which the tool was run.

File
target_version
(Optional)

The geodatabase version to check for inconsistencies in the delta tables. If no version is specified, all versions are processed.

String
input_tables
[input_tables,...]
(Optional)

Specify a single table or provide a text file containing a list of versioned tables whose associated delta tables you want to check for inconsistencies. Use fully-qualified table names in the text file, and place one table name per line. If no file is specified, all tables in the geodatabase are processed.

String

Derived Output

NameExplanationData Type
out_workspace

The updated input workspace.

Workspace

Code sample

DiagnoseVersionTables example 1 (Python window)

You can alter and run the following from a Python window to discover and export inconsistencies in the delta tables of the Parcels feature class.

This example connects through the database connection file productiongdb.sde and exports a file named gdb_diagnose.log to the temp directory.

import arcpy

input_database = "c:\\temp\\productiongdb.sde"
out_log = "c:\\temp\\gdb_diagnose.log"
target_version = "SDE.Default"
input_tables = "GIS.Parcels"

arcpy.DiagnoseVersionTables_management(input_database, out_log, target_version, 
                                       input_tables)
DiagnoseVersionTables example 2 (stand-alone script)

The following is a stand-alone script you can alter and run to export delta table inconsistencies to a log file.

# Description: diagnose version metadata

# Set the necessary product code
import arceditor
 
# Import arcpy module
import arcpy

# Local variables:
input_database = "c:\\temp\\productiongdb.sde"
out_log = "c:\\temp\\gdb_diagnose.log"
target_version = "SDE.Default"
input_tables = "GIS.Parcels"

# Process: Diagnose Version Tables
arcpy.DiagnoseVersionTables_management(input_database, out_log, target_version, 
                                       input_tables)

Environments

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics