Fix for corrupt Feature Class in file GDB?

10905
22
02-01-2017 07:21 AM
Highlighted
Occasional Contributor

Using ArcGIS 10.4, I have a point feature class in a file GDB that is somehow corrupt. I've tried Recovering the File GDB, that feature class comes back empty. I've tried uncompress, it tells me nothing is compressed even though the command should be dimmed out in that case. I've tried deleting and recreating the spatial index. When I try to export the data I get an error or it exports 2632 features even though the table says it has 2951 features. copy and paste fails when I choose paste from the popup menu with the error "copy failure". You can't see the missing features (features that won't export or import or paste) in the map, just that the table says they are there and you can select all and get 2951 of 2951 features. Even if you export just the table, you get 2632 features in the output table.

I tried adding fields to the table so I could calc geometry, but after adding field to the table it then shows only 2632 records.

Any help recovering 300 points would be appreciated!

22 Replies
Highlighted
Esri Esteemed Contributor

Unfortunately, the best way to recover corrupt file geodatabases is to create a new file geodatabase, copy out what can be recovered, then pull in contents of your backups for the rest.  You can try to work with Tech Support, but if the data no longer exists on disk, there isn't really anything they can do.

- V

Highlighted
Occasional Contributor

Unfortunately, the one feature class that was edited is the one i can no longer export, well i can export 2632 of 2951 records. Hasn't been edited for almost a year so was corrupt as far back as our backup copies go. Was a wierd thing, just tried compressing then uncompressing, now I get access denied on the feature class in question.

Reply
0 Kudos
Highlighted
New Contributor II

I've run into this exact issue, have you had any more insight on what happened? This is the only thread I've been able to find covering this. Thanks!

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

In all sincerity, Vince's answer is the final answer if some of the basic stuff the OP mentioned/tried doesn't work.

Highlighted
New Contributor II

I'm not anticipating getting any data back, I'm asking to prevent this from happening again. I'm curious to know how it became corrupt in the first place. Any reading recommendations on the subject? Thanks!

Reply
0 Kudos
Highlighted
Honored Contributor

A few probable causes of data corruption (listing all causes maybe beyond our scope of discussion) could be

  • Power outages or other power-related problems while editing data.
  • Improper shutdowns, such as caused by power outages or performing a hard restart: pressing and holding the power button.
  • Hardware problems or failures, including hard drive failures, bad sectors, bad RAM, and the like.
  • Failure to eject external hard drives and related storage devices before disconnecting them or powering them off.
  • Bad programming, particularly if it results in either hard restarts or data that is saved incorrectly.

A few strategies to avoid data corruption

  • Implement a comprehensive Backup and Recovery Solution and use it regularly.
  • For Desktop users, use of UPS (Uninterrupted Power Supply) is important.
  • Eject external storage devices before either disconnecting them or turning them off.

Any data could get corrupt, esp. due to bad sectors/RAM, even the data which was working well a year back, and no change has been made to it since then, might get corrupt.

See Why, or How, do Files Become Corrupt? - Ask Leo! 

So, how do you prevent corruption?

Easy: you can’t.

You cannot prevent a hard drive from developing bad sectors or failing. It happens. The best you can do is prepare.

What you can prevent is data loss.

The real “solution” is to know that someday, when you least expect it (and probably when it’ll be most inconvenient), it will happen.

The real solution is to be prepared with a complete and recent backup if your computer’s hard disk, your data, and whatever else is stored on any media that might fail (and by that, I mean all media). That way, when – not if – failure happens, you can replace the failed component (usually the drive), restore your files, and get on with your life as if nothing major happened.

Hope it helps!!!

Highlighted
MVP Esteemed Contributor

I'll add one more cause that has happened in our organization and is recoverable (maybe not for OP's case of missing data though),  make sure you do not save and output, especially shape files, in the fgdb folder.  

I've seen users do this to try to keep all there projects data in the same "folder".  The fgdb can appear corrupt or cause strange behavior.  Once we moved all the shape files to another folder, the fgdb was again accessible.

Highlighted
Occasional Contributor

I was never able to recover the points from the FGDB. It was too long since the project was last worked on so normal backups weren't available anymore for a time prior to the corruption. I did have a copy of the FGDB, which included all but the last 300 points so didn't lose everything.

Reply
0 Kudos
Highlighted
Regular Contributor

Is it possible that you simply have some empty geometries in the feature class, vs. corrupt features? I've seen it happen before (not exactly sure how it happens, but it occasionally does) but never 300+ features. Was there some odd environment used for editing?

When nothing else works I also try exporting to XML workspace then re-importing to a brand new geodatabase. It sounds like it may be a lost cause but it's worth a shot.