How to Fix a New SDE_State

2662
6
08-23-2018 12:00 PM
Stephen_Usmar
New Contributor II

We are running ArcGIS Server 10.5 and two days ago found we were unable to make map edits using ArcGIS Collector and kept receiving "Update Failed". On checking the SDE_States table there is a new state that has been generated which relates back to the error we are receiving:

Target state not found in the STATES table [dbo.DEFAULT][STATE_ID = 409403].

How do I delete this STATE without causing reference issues. I can see everything in SQL Server but would like to know if there is a tool that I can run to remove it? I have run the other lineage tools to check for corruption/issues and they are coming back as error free. 

Tags (2)
0 Kudos
6 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Stephen,

I would recommend running the Diagnose Version Metadata and Repair Version Metadata tools.

Stephen_Usmar
New Contributor II

Hi Jake

Thanks for the quick reply (always appreciated when trying to resolve major issues). I have run the Diagnose Version Metadata tool and it come back with no issues:

All versions reference valid states.
All states have valid parent ids.
All lineage entries have valid state ids.
All states have valid parent ids.

It seems the new STATE is valid, it's just that it is causing the problem with the updates that are associated with the original state. This is why I believe the solution is to delete the new State but not at the database level to avoid causing corruption.

JonathanFarmer_oldaccount
Occasional Contributor III

Hi Stephen,

You are correct, you don't want to delete that State_ID from the database level as that could cause corruption in the geodatabase. 

Really, you need to do a reconcile, post and compress which should remove that State_ID from the States table as long as it is unreferenced at the time of running the compress. That is the only acceptable way to do this from our standpoint.

I'm assuming that you have child versions off of Default with edits in them? Do you still need those versions once they are reconciled and posted with Default? If not, you could rec and post all of them, delete them, and then compress which should remove this State_ID (make sure to stop all services hitting this geodatabase as well).

Geodatabase compression—Help | ArcGIS Desktop 

Jonathan

Stephen_Usmar
New Contributor II

Thanks for the guidance Jonathan. The State issues were having such a widespread impact we ended up restoring the AWS server images. If we end up experiencing the same problem again I'll follow your suggestions. Any advise on where I can access some documentation/links around how versioning, States, lineage, etc all fits together and works so that I can get a deeper understanding of this for future reference?

Regards

Stephen

0 Kudos
JonathanFarmer_oldaccount
Occasional Contributor III

Hi Stephen,

OK, that works as well as a way around this!

We have lots of documentation on versioning. It can be complex for the first time user but it isn't too bad once you work with it for a bit.

An overview of traditional versioning—ArcGIS Help | ArcGIS Desktop 

Start with this link above and then use the navigation on the left side of the page to click through all the other pages on versioning after this one. We also offer an instructor led course on this if you want to go all out:

https://www.esri.com/training/catalog/57630435851d31e02a43ef9c/implementing-versioned-workflows-in-a...  

Hope that helps!

Jonathan

0 Kudos
Stephen_Usmar
New Contributor II

Thanks again Jonathan, this is really helpful.

0 Kudos