Fully compressing an enterprise geodatabase

2288
3
11-06-2012 06:22 AM
LeoDonahue
Occasional Contributor III
http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/002q/002q00000056000000.htm

After following these steps:

reconcile/post versions to their parents
delete versions
no one is connected sdemon -o info -I users returns no users connected
perform the compress

the compress log shows an end_state_count of 2
the versions table shows a state_id of 285 for the default version

shouldn't the state_id for the default version be closer to zero?
the adds table for one of the versioned featureclasse never empties.  It has 2 records.

ArcCatalog 10.0 sp5
ArcSDE 10.0 sp5 64bit
SQL Server 2008 R2 64bit
0 Kudos
3 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Leo,

Does you geodatabase contain any replicas?  If it does, be sure to synchronize all of them before performing the compress.  You can also query the sde.sde_versions table to see if there any orphaned entries from a previous replica.
0 Kudos
LeoDonahue
Occasional Contributor III
Jake,

Yes, I have several replicas.  And yes, in the sde.sde_versions table there are many records that have "sync_send" values.  Are you saying these are orphaned records and I can delete them?

What is the correct way to perform versioned geodatabase management?  I've heard at least a couple variations on this topic over the years.

Is it this?:


  • Reconcile and post all outstanding changes in child versions to the DEFAULT version.

  • Synchronize changes in all replicas.

  • Delete the versions themselves.

  • Make sure no user is connected.

  • Perform the compress operation.


Second question, now that I'm thinking about it.

In the past I've scripted this to include update database stats (Analyze) before and after a compress, but if Auto Create Statistics are set to TRUE in SQL Server, do I still need to Analyze my feature classes?
0 Kudos
JakeSkinner
Esri Esteemed Contributor
No, you will not want to delete any records in the sde.sde_versions table.  If you did not have any replicas within your database, and there were rows in this table, they would be orphaned. 

Yes, the steps you listed will compress your database to a state of 0.  As for analyzing your database, I would still recommend performing this step even with AUTO CREATE and AUTO UPDATE Statistics enabled.
0 Kudos