ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Repair Version Tables

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

The Repair Version Tablestool repairs inconsistencies in the delta (A and D) tables of a versioned geodatabase.

Usage

  • Run the Diagnose Version Tables tool to determine if there are inconsistencies in your geodatabase's delta tables before you run the Repair Version Tables tool.

  • This tool can only be run against enterprise, workgroup, or desktop geodatabases.

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

  • Always create a database backup before running the Repair Version Tables tool.

Syntax

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

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

Workspace
out_log

Specify the location where the log file will be written and include the name to use for the log file. The log file is an ASCII file containing the results of the repair operation.

File
target_version
[target_version,...]
(Optional)

Specify which geodatabase version to repair. If no version is specified, all versions are processed.

String
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 repair. Use fully-qualified table names in the text file, and place one table name per line. If no table or file is specified, all tables are processed.

String

Code sample

RepairVersionTables example 1 (Python window)

You can alter and run the following from a Python window to repair inconsistencies in delta tables for the Parcels feature class.This example connects through the database connection file productiongdb.sde.

import arcpy

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

arcpy.RepairVersionMetadata_management(input_database, out_log, target_version, input_tables)
RepairVersionTables example 2 (stand-alone script)

The following is a stand-alone script you can alter and run to repair inconsistencies in the delta tables of the Parcels feature class.

# Description: repair 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_repair.log"
target_version = "SDE.Default"
input_tables = "GIS.Parcels"

# Process: Repair Version Metadata
arcpy.RepairVersionMetadata_management(input_database, out_log, target_version, input_tables)

Environments

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Geodatabase Administration toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal