Enable Last Edit Time (Data Management)

Summary

Enables the last edit time property on an enterprise geodatabase dataset.

Enabling the last edit time property on a dataset will enable the recording of timestamps of when the data was last edited. This supports a feature service and other clients to request from the geodatabase the timestamp of when the dataset was last edited. Knowing the last edit time is valuable for a feature service as it allows for response caching and other query enhancement.

Usage

  • The input dataset must be stored in an enterprise geodatabase and be nonversioned.

  • This tool must be run as the data owner.

  • If new feature classes are added to a feature dataset that has the last edit time enabled, run this tool on the feature dataset to enable the last edit time on the new feature classes. Feature classes that have the last edit time already enabled are skipped.

  • You must obtain an exclusive lock on the data for the process to be run. For example, if a service is running that references the dataset, the service must be stopped before running this tool.

  • Use the Disable Last Edit Time tool to disable this property.

Parameters

LabelExplanationData Type
Input Dataset

The enterprise geodatabase table, feature class, feature dataset, attributed relationship class, or many-to-many relationship class that will have the last edit time property enabled.

Table View; Feature Dataset

Derived Output

LabelExplanationData Type
Updated Dataset

The updated input dataset with the last edit time enabled.

Table View; Feature Dataset

arcpy.management.EnableLastEditTime(in_dataset)
NameExplanationData Type
in_dataset

The enterprise geodatabase table, feature class, feature dataset, attributed relationship class, or many-to-many relationship class that will have the last edit time property enabled.

Table View; Feature Dataset

Derived Output

NameExplanationData Type
out_dataset

The updated input dataset with the last edit time enabled.

Table View; Feature Dataset

Code sample

EnableLastEditTime example (Python window)

Use the EnableLastEditTime function to enable the last edit time property on a feature class stored in an enterprise geodatabase.

import arcpy
arcpy.management.EnableLastEditTime("C:\\MyProject\\myConn.sde\\myFC")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics