ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Repair Version Metadata

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

Summary

Repairs inconsistencies within the versioning system tables of a versioned geodatabase.

Usage

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

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

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

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

Syntax

arcpy.management.RepairVersionMetadata(input_database, out_log)
ParameterExplanationData Type
input_database

Provide a database connection (.sde file) to the enterprise, workgroup, or desktop geodatabase for which you want to repair inconsistencies in the versioning system tables. The connection must be made as the geodatabase administrator.

Workspace
out_log

The output log file. The log file is an ASCII file containing the results of the repair operation.

File

Derived Output

NameExplanationData Type
out_workspace

The repaired geodatabase.

Workspace

Code sample

RepairVersionMetadata example 1 (Python window)

You can alter and run the following from a Python window to repair inconsistencies in the version system tables.This example connects through the database connection file productiongdb.sde.

import arcpy

input_database = "c:\\myconnections\\productiongdb.sde"
out_log = "c:\\temp\\gdb_repair.log"
arcpy.RepairVersionMetadata_management(input_database, out_log)
RepairVersionMetadata example 2 (stand-alone script)

The following is a stand-alone script you can alter and run to repair inconsistencies in the version system tables.

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

# Local variables:
input_database = "c:\\myconnections\\productiongdb.sde"
out_log = "c:\\temp\\gdb_repair.log"

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

Environments

  • Current Workspace

Licensing information

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

Related topics

  • An overview of the Geodatabase Administration toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal