English

FAQ: What schema changes can be made to versioned data?

Question

What schema changes can be made to versioned data?

Answer

Geodatabase versioning tracks changes for records, not schema such as fields, domains, subtypes, relationship classes, topologies, geometric networks, etc.

What is a schema?

While schema locks are automatically handled in the ArcGIS application, developers need to manage schema locks when performing the same actions through the Geodatabase API. The How to use Schema Locks in the geodatabase article discusses the use of schema locks for making schema changes.

Some schema changes can be made while a dataset is versioned. Since the schema is not versioned, these schema changes are visible in all versions. For example, fields can be added to a table after it is versioned. The new field is visible and empty in all versions after it is created. Edits to that field are then made in each version.

Schema changes and locking
There are two types of locks in the geodatabase: shared and exclusive. During schema updates in a geodatabase, exclusive schema locks are automatically applied to lock a dataset from use by others to make necessary changes to it; for example, to add a field to a feature class. The lock is released once the changes have been made, making the dataset available for use by all users. All of the schema changes discussed in this document require an exclusive schema lock.

If a user wants to make changes to a geodatabase schema, the specific datasets or objects modified must not be in use by others. In other words, to make changes to a dataset, a shared lock must not exist on that dataset or object. For example, when updating the subtype information for a feature class; the feature class cannot be open by other applications. For more information on how schema locking works, see Schema Locking.

The How to use Schema Locks in the geodatabase article also discusses the use of schema locks for making schema changes through the ArcObjects API.

Tables and Feature Classes
The following schema changes can be made to a table or feature class when it is versioned:
- Versioned feature classes or tables can be deleted or renamed with the same restrictions as when the feature class or table is not versioned.
- Add or remove a field.
- Add, remove, or modify default values at the field or subtype level.
- Add or remove attribute domains at the field or subtype level.
- Add or remove subtypes along with modifying the properties of the subtypes.
- Add, remove, or modify attribute and spatial indexes.

Feature Datasets
The following schema changes can be made to feature datasets when versioned:
- Delete versioned feature classes contained in the feature dataset.
- Create feature classes in the feature dataset; however, the feature class will not be registered as versioned.

Relationship Classes
The following schema changes can be made to relationship classes with versioned data:
- Create a relationship class between versioned feature classes.
- Delete a relationship class.
- Add, remove, or modify relationship class rules.

Annotation Feature Classes
The following schema changes can be made to versioned annotation feature classes:
- All changes that can be made to versioned feature classes.
- Add, remove, modify, or rename Annotation Classes.
- Add, remove, import, or rename Symbol Collections.

Dimension Feature Classes
The following schema changes can be made to versioned dimension feature classes:
- All changes that can be made to versioned feature classes.
- Add, remove, import, or rename Dimension styles.

Geometric Networks
The following schema changes can be made to versioned geometric networks:
- Delete the geometric network.
- Add a new, empty feature class to the geometric network, which is automatically registered as versioned.
- Add a weight to the geometric network (starting with ArcGIS 9.2).
- Add, remove, or modify geometric network connectivity rules.

Topologies
The following schema changes can be made to versioned topologies:
- Delete the topology.
- Rename the topology.  

Note:
All other schema changes require the topology to not be versioned, such as:
- Add or remove feature classes.
- Modify the feature class ranks.
- Add or remove topology rules.
- Modify the topology cluster tolerance.

Network Datasets
The following schema changes can be made to network datasets in a versioned environment:
- Delete the network dataset.  
Note:
With ArcGIS 10 and later releases, both the network dataset and the source feature classes can be versioned.  With pre-10 ArcGIS the source feature classes can be versioned while the network dataset itself is not versioned. Therefore, all network dataset properties can be modified when the feature dataset and all its source feature classes are registered as versioned. To rebuild a network dataset after the feature dataset that contains it is versioned, see the following articles:
- Are network datasets in an ArcSDE geodatabase versioned?
- Cannot build a network dataset when its feature dataset is registered as versioned.

Schematic Datasets
The following schema changes can be made to schematic datasets in a versioned environment:
- Delete the schematic dataset.  
Note:
While the source feature classes can be versioned, the schematic dataset itself is not versioned. Therefore, all schematic dataset properties can be modified when the source feature classes are registered as versioned. See the following link for more information on Schematics and Versioning:
- About generating and updating diagrams while an edit session is open

Terrains
The following schema changes can be made to versioned terrains:
- Delete the terrain.
- Rename the terrain.
Note:
All other schema changes require the terrain to not be versioned, such as:
- Add or remove feature classes.
- Add or remove pyramid level.
- Change resolution bounds of a participating feature class.
- Change reference scale of a pyramid level.
For more information on terrains and versioning, see Modifying terrains in a geodatabase.

Representations
The following schema changes can be made to representations in a versioned environment:
- Add or remove representations.
- Add, remove, or modify a representation rule.
- Applying a representation rule to a feature.
- Applying a shape override to a feature.
- Overriding a property of a representation rule.
- Converting a feature representation to a free representation is an attribute change.
Note:
For a more detailed discussion, see Working with representations in a versioned environment.

Cadastral Fabrics
The following schema changes can be made to versioned cadastral fabrics:
- All changes that can be made to versioned feature classes, can be made to cadastral fabrics classes.
- Add, remove, and modify cadastral fabric classes that do not participate in a topology.
- Add, remove, and modify relationship classes with source being a cadastral fabric class.
Note:
Cadastral fabrics allow the user to associate feature classes from other feature datasets, so that they may be spatially updated after spatial changes to the fabric have occurred. Feature classes can be associated whether they are versioned or unversioned. However, if the cadastral fabric is versioned, the associated feature class must also be versioned to be adjusted.

Unregistering data as versioned
If a table or feature class is versioned, it must be unversioned to make any of the schema changes, which cannot be made to versioned data. Unversioning tables or feature classes when versions exist in the geodatabase can result in edits being lost. To unversion data and retain all existing edits, see Registering and unregistering data as versioned. The Unregister As Versioned tool is available in ArcCatalog in the Customize dialog box. Navigate to Tools > Customize > Commands tab > Geodatabase tool category > Unregister As Versioned command.

Related Information