I am maintaining an ArcSDE database and would like to avoid killing connections to ArcSDE in order to run the compress operation. Our versioning workflow is very simple. Everyone edits the DEFAULT version directly. I know that it is not possible to compress to state 0 without reconciling and removing connections but we do not need to compress to state 0. All our applications are accessing SDE via ESRI software or an API which can access the DEFAULT version so our users/scripts should have access to all the data all the time.
Having said that I am constantly monitoring the states that remain uncompressed and sometimes I cannot explain why a specific state would not be merged with state 0. I know that if there is branching in the state tree due to current edit sessions, some of those states cannot be removed. Same is the case if you have named versions that have not been reconciled. Also if users have locks on particular states, those states will not be blown away. For this reason I kill processes that are older than 1 day.
But what if I have a linear state tree and a couple of states that do not have state locks on them do not get removed? Why might this be? What other factors influence which states get removed during a compress.
The ultimate goal here is to have no down time at all except for when performing schema changes.