6

Follow up to this: Spatial Database Connection String

I am trying to reconcile a versioned geodatabase that has only one version, DEFAULT. I am following the steps from the ESRI documentation: A quick tour of reconciling a version. It seems like there is no reason to have to do this, but the "OLE DB" table and "spatial" table are out of sync until I do this. As per comment from @mwalker in linked question above:

If you're using versioned SDE then you may not see changes right away, since versions are handled with delta tables and views. The source tables won't get updated until the version is reconciled.

  • 4
    Jeff's answer is accurate. To help you understand versioning a bit better, you may want to take a quick look at the description I gave to a related question gis.stackexchange.com/questions/15203/… – Ragi Yaser Burhum Jan 9 '12 at 17:23
  • Wow! Thanks for the link @Ragi. That's a GREAT answer! – mwolfe02 Jan 9 '12 at 19:13
8

Edits to the DEFAULT version are stored in the delta tables unless you register the version with the option to move edits to base. You won't see edits to DEFAULT version when connecting with a non-SDE aware connection. You will only see the original table. Try registering your version with the option to move edits to base, make an edit to default and then make the OLE connection to see if the edit is there.

  • Is there some way to periodically compress(?) the DEFAULT version so that any changes in the delta tables will get posted to the original table? Because the dataset is already registered as versioned, I need to unregister it first. When I try to do that it gives me the option to "Compress all edits in the Default version into the base table." It sounds like that's what I really need to do. – mwolfe02 Jan 6 '12 at 21:33
  • I found an option to "Compress Database". I clicked on it and it appeared to complete after only a few seconds. But the data was still out of sync. – mwolfe02 Jan 6 '12 at 21:35
  • You are correct, you should check the option for "Compress all edits in the Default version into the base table". – Jeff Berry Jan 6 '12 at 22:43
  • As I understand it, a compress does not push changes in the delta tables to the base table unless the version is registerd with the option to move edits to base. It simply clears unreferenced states. If you register a version with the option to move edits to base, when you post edits to default, (or in your case make edits directly to default), then those edits are also moved from the delta tables to the base table. A compress should definitely be run periodically as part of the data management workflow, either manually or through a scheduled script. – Jeff Berry Jan 6 '12 at 23:18
4

Reconcile is probably not what you are looking for here. You'd want to compress "sdeversion -o compress". The compress moves entries in the add and delete tables into the base table if the states permit. In your case with only the default version this is not a problem. Otherwise you'd have to reconcile all versions against default before the compress to be sure. Making sure no one is editing is also a good idea. States that are used by a non-reconciled version or edit session can not be compressed.

A completely different approach in your case would be using multi versioned views. It is a SQL view that merges the add and delete tables on the fly for read only access. It does not however include the geometry. Multi versioned viwes are created with "sdetable.exe -o create_mv_view" With multi versioned views you always have access to the default version (or the version you choose to point your view against) regardless of the add and delete tables

  • +1 I think I would have actually preferred this method, but I don't seem to be able to create the view without being the owner of the underlying table. For a variety of reasons, that makes this a non-starter for us. This is an idea we may come back to. Thanks! – mwolfe02 Jan 9 '12 at 16:29
2

In case of replication it appears that those edits are stuck in the delta tables even after compress, there is always the Unorthodox Way to Compress a Replication Geodatabase to remove them..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.