Diagnose Version Tables (Data Management)

Summary

Identifies inconsistencies in the delta (A and D) tables of datasets that are registered for traditional versioning.

Usage

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

Parameters

LabelExplanationData Type
Input Database Connection
Workspace
Diagnose Version Tables 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 inconsistent records, as well as information about the connection file, geodatabase version, and tables for which the tool was run.

File
Target Version
(Optional)

The geodatabase version with the delta tables that will be checked for inconsistencies. The drop-down list is populated with the existing versions in the geodatabase specified for the Input Database Connection parameter. If no version is selected, all versions will be processed.

String
Input Tables
(Optional)

A single table or a text file containing a list of versioned tables with the associated delta tables to be checked 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

LabelExplanationData Type
Input Workspace

The updated input workspace.

Workspace

arcpy.management.DiagnoseVersionTables(input_database, out_log, {target_version}, {input_tables})
NameExplanationData Type
input_database
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 inconsistent records, as well as information about the connection file, geodatabase version, and tables for which the tool was run.

File
target_version
(Optional)

The geodatabase version with the delta tables that will be checked for inconsistencies. If no version is specified, all versions are processed.

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

A single table or a text file containing a list of versioned tables with the associated delta tables to be checked 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 productiongdb.sde database connection file 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

Related topics