Enabling archiving
Enabling archiving
|
Release 9.3 |
|
Note: This topic was updated for 9.3.1.
Enabling archiving is similar to registering a dataset as versioned. For each dataset for which archiving is enabled, a new archive class is created. When enabling archiving, all attributes and all rows in the DEFAULT version of the dataset or object class are copied to the archive class. The time it takes to complete the creation of the archive class depends on the size of the dataset being enabled. The archive class has the same schema as the original dataset with additional date attributes, gdb_from_date and gdb_to_date, to record the time stamp for the effective lifespan of the archived row and a gdb_archive_oid attribute to uniquely identify each row.
Representing the archive class as an independent feature class, as opposed to managing the historical rows in the delta table for the versioned table, means that the existence and size of the archive does not impact the efficiency of the database. Datasets can be unregistered as versioned without affecting or deleting the archive class. If a dataset is unregistered as versioned, the archive class becomes an object or feature class.
Once the dataset has had archiving enabled, all changes saved or posted to the DEFAULT version are additionally preserved in the archive class. You do not have the ability to append historical data to the archive class. Manually changing the archive class can lead to a corruption of your geodatabase archiving process.
To enable archiving, the data must be registered as versioned. Select and right-click the object and choose the Enable Archiving command from the Archiving pull-right menu:
Schema changes
The archive class is used to preserve the edit transactions that occur on the enabled dataset or object class. Therefore, the schema of the archive class must be consistent with the dataset or object class.
Schema changes made to the dataset or object class are automatically pushed to the archive class. For example, if you add an attribute column to the feature class, that column is automatically added to the archive class. If you delete an attribute column, that column will also be removed from the archive class, removing all the archived information for this column.
Geodatabase archiving does not create metadata regarding schema changes. The objective of geodatabase archiving is to preserve the edit transactions of enabled classes.
Changes to geodatabase behavior will be available to the archive class, but the actual change to the ArcSDE repository is not archived. Documenting geodatabase behavior change is the resposibility of your workflow procedures.
Do not alter the schema of the archive class directly. Should you directly alter the archive class, you will potentially corrupt this class and lose your archived transactions. ArcGIS limits access to the archive class to read-only, preventing direct editing of and schema changes to the archive class.
Tips on enabling archiving
- If a dataset is registered with moving edits to base, archiving cannot be enabled. It must be unregistered and registered as versioned without the option to move edits to base.
- You can only enable archiving on datasets or classes for which you are the owner.
- Enabling archiving does not traverse relationship classes. If a relationship class resides outside a feature dataset container, then you must explicitly enable archiving on the class.
- Indexes on the origin class will also be created on the archive class during the enable archive phase.
- You can view the time and date when archiving was enabled by opening the properties dialog box of a feature class or table. Right-click the object and choose properties. In the general tab under Versioning is a description of when the object was enabled for archiving.
- The default naming convention for the archive class is the name of the object class followed by an underscore and an H. For example, for a object class named Roads, the related archive class will be Roads_H.
- Archive classes are filtered by the geodatabase and are not visible in ArcCatalog and, therefore, not visible in the catalog tree. They may be added to ArcMap for viewing and analysis by using the Add Historical Archive command on the Geodatabase History toolbar.
- For optimal performance when working with the archive class, database statistics should be updated periodically based on the volume of change occuring to the archive class. Learn more about updating statistics.
- It is possible to specify the name of the archive table as well as the from and to date attributes. For developers interested in supplying their own naming conventions for the archive table, please refer to the IArchiveregistrationinfo interface within the Software Developer Kit.
- When enabling archiving, the origin source's keyword with the prefix _ARCHIVE is searched; if it's not present, the data source's keyword and parameter values are applied. Learn more about configuration keywords for archiving.