In a V9.3.1 enterprise geodatabase with archiving enabled, I deleted all the feature datasets by mistake. When I requested the gdb be restored, I learned that it was not backed up. (And, yes, immediately following this discovery, we ensured a backup procedure was in place and performed.) Fortunately, although the feature datasets were gone, archiving was enabled so the gdb still contained the history versions of all the feature classes, identifiable by the �??_H�?� appended to the end of the feature class name. Instead of recreating the enterprise gdb (difficult for various reasons), we decided to rebuild the feature datasets/classes using the historical versions. This is the process I followed:
1. In the default gdb version, I recreated the feature datasets in the enterprise gdb. We had documented the gdb structure so these were known.
2. Using the Import �?� Feature Class (single) menu option, I imported each history feature class back into the appropriate feature dataset. I could also have used the Import �?� Feature Class (multiple) menu option.
3. At this point, each gdb feature class contained records for every edit that took place with a GDB_FROM_DATE and GDB_TO_DATE in each record. For edits that occurred prior to deleting the feature datasets, there was a history record with a �??real�?� prior date/time stamp in the GDB_TO_DATE field. However, when the feature dataset was deleted a history record was created for all current records with GDB_TO_DATE of 12/31/9999.
4. In ArcMap, for each feature class I performed a Select by Attributes with GDB_TO_DATE <> 12/31/9999, started an edit session, and deleted the selected records so the feature classes contained only the records current as of the time the feature datasets were deleted. This restored the gdb to the point just prior to the deletions, although edit history was no longer available in the gdb feature classes.
5. Once the gdb feature classes were restored, I copied the original history feature classes into a file gdb to retain the historical record in a searchable form, and deleted them from the enterprise gdb.
6. I enabled versioning and archiving again in the enterprise gdb, and reassociated domains.
While not an ideal solution, there were several factors that made this approach possible. It was not a complex gdb �?? no subtypes, topology, or networks �?? and it was acceptable to lose the history in the gdb as long as it was available in some form �?? in this case a file gdb. In addition to losing the ability to look at history in the gdb prior to the rebuild date/time, domains needed to be reassociated with fields.
The most important lesson, of course, is to make sure your geodatabase is regularly backed up so this process doesn�??t have to be used.