For the past few months I've been having an issue getting my SDE Compression End State Count down to "1". It acts like there are connections but I've checked everything I can think of but it won't go any lower than 5. Any suggestions?
I've attached a screenshot for reference.
Do you have a replica based on this database (check the sde.SDE_versions table)? What does your sde.SDE_state_locks and sde.SDE_table_locks look like? See who is the owner of state 5 in your sde.SDE_states table and then check that machine for a hung ArcMap.exe or ArcCatalog.exe
Interesting, I have never paid much attention to that value in the compress_log. We have SQL, and I run a few selects in Management Studio where I track things. In case this gives you any clues:
select name, owner, version_id, state_id, parent_name, parent_owner from [mysde_database].[dbo].[SDE_versions]
select * from [mysde_database].[dbo].[SDE_versions]
select * from [mysde_database].[dbo].[SDE_states] order by state_id
select * from [mysde_database].[dbo].[sde_state_lineages] order by lineage_name, lineage_id
/* now I've added */
select TOP(5) * from [mysde_database].[dbo].[SDE_compress_log] order by compress_end DESC
I also use the "hack" install the old GDBT toolset to view the version-Lineage within Catalog.
edit: use SQL syntax highlighter and added TOP(5) to last line, to limit number of records returned from the compress_log query.
Please check the following:
1)From sde_version table check if there are any existing version?
If any version represents, reconcile and post all the edits and delete the version.
If sync_send version is present then from ArcCatalog, unregister the replica.
2)From sde_process_information table check if any user is connected to the geodatabase?
3)Shut down the map services, if any.
4)Check below tables if any lock exist: