Failed to connect to database. Target state not found in the STATES table

1689
0
10-28-2018 03:30 PM
AndrewTerwiel
Occasional Contributor II

I'm unable to connect to one of our enterprise databases. This problem first presented 4 days ago. I believe, but I'm not sure, that this was coincident with an edit session on this connection. The full message displayed by the ArcMap Connect popup is:

Failed to connect to database. Target state not found in the STATES table [sde.DEFAULT][STATE_ID = 623].

These are the results of queries against the SQL Server database state tables:

SELECT TOP (1000) [lineage_name]
      ,[lineage_id]
  FROM [Community].[sde].[SDE_state_lineages]‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
lineage_namelineage_id
100
2267622

SELECT TOP (1000) [state_id]
      ,[owner]
      ,[creation_time]
      ,[closing_time]
      ,[parent_state_id]
      ,[lineage_name]
  FROM [Community].[sde].[SDE_states]‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

state_idownercreation_timeclosing_timeparent_state_idlineage_name
10sde2016-08-16 10:42:47.0002016-08-16 10:42:47.00000
2622GISADMIN2018-10-23 16:40:19.8702018-10-23 16:40:26.870265267

A possible solution would be to add a record to the SDE_state_lineages table having a lineage_id of 623 and also add a record to the SDE_states table having a state_id of 623. I'm reluctant to do this though as I'm not sure that this will not cause inconsistencies between these tables and any possible related tables.

Our organisation is running ArcGIS Desktop 10.5 with a SQL Server 2014 SP2 database on Windows 2012 R2.

I've added a record to each of the SDE_state_lineages and SDE_states table as I proposed above and this has fixed our connection to this database.
   
0 Replies