sde compression

3858
8
Jump to solution
09-08-2014 03:17 AM
Highlighted
New Contributor II

Hi everyone, I'm planning to do automated compression of our sde geodatabase using arcobject, I just wanna ask if it is necessary compress all the versions of the sde or compressing only the "sde.default" version will do? Any help or link regarding this matter is highly appreciated. Thank you in advanced.

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
New Contributor III

I wasn't clear enoough. We do not delete the child version so we do not need to recreate it. We run a python script nightly through task scheduler. The help file below explains the process in depth: The bottom of the help page has a link to an explaination of how to use task scheduler.

The sde geodatabase contains a table called SDE_compress_log. If the end_state_count is 1 then the database is at state 0 and is fully compressed.

http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000v7000000

View solution in original post

Reply
0 Kudos
8 Replies
Highlighted
Esri Esteemed Contributor

Hi Francis,

When you compress a geodatabase, you will not have an option to compress a single version.  Take a look at the following link for a great explanation of what occurs during a compress:

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

For best performance, take a look at the section 'Fully compressing a geodatabase'.

Highlighted
New Contributor II

Hi Jake,


Thanks for the reply, I want to do it programatically, I can't find exact documentation on how the manual full compress process is doing. Want to find out if it just compressing the Default or all the versions of the sde.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

A compress is for the entire geodatabase.  The compress operation removes the states that are no longer referenced by a version and can move rows in the delta tables to the business table.  You do not have an option to compress an individual version.

Programatically you should perform the following:

1.  Reconcile and post all versions to Default

2.  Delete all versions

3.  Compress the geodatabase

4.  Analyze Datasets tool to update statistics on geodatabase tables

5.  Recreate all versions

Reply
0 Kudos
Highlighted
New Contributor III

I suspect you will probably want to reconcile and post the various versions before compressing the default. You'll have to figure out the correct order of the reconcile/posts to get the versions pointing to the same state as the default. If the other versions are pointing to the same state as the default, you should get a good compress.

Highlighted
New Contributor II

Hi John,

Our batch job already reconcile and post various versions to default. After posting I want to do compression, is it correct to compress only the default version? or still need to compress all versions?Thanks in advaced.

Reply
0 Kudos
Highlighted
New Contributor III

We follow the same process as Jake Skinner but we have not been deleting the version (we only have one other version besides default) and recreating it. So far, the nightly compress has been bringing the database back down to state 0.

We are using a version 10.2.1 sde geodatabase and the SDE_compress_log can be viewed in ArcMap and ArcCatalog. The end_state_count should be 1 if you are getting a full compress.

Reply
0 Kudos
Highlighted
New Contributor II

Hi John,

Thanks for the reply. Currently programatically we do our reconcile and post all version to Default. We have the "default" version, "Master" version (child of default) and many user versions (child of master). We can't affor to delete the versions, im trying to do compression programatically with out deleting those versions.

"We only have one other version besides default) and recreating it" - How do you recreate? manually everyday?

how do you do ur nightly compression? through arccatalog? manually?

Thanks in advanced.

Reply
0 Kudos
Highlighted
New Contributor III

I wasn't clear enoough. We do not delete the child version so we do not need to recreate it. We run a python script nightly through task scheduler. The help file below explains the process in depth: The bottom of the help page has a link to an explaination of how to use task scheduler.

The sde geodatabase contains a table called SDE_compress_log. If the end_state_count is 1 then the database is at state 0 and is fully compressed.

http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000v7000000

View solution in original post

Reply
0 Kudos