gisMelissa

Automating Versions

Blog Post created by gisMelissa on Sep 11, 2015

Calling all Editors – Delete your current versions and create new ones. Yes, this was supposed to happen weekly without hounding. And it did, weakly. Compressions would run as scheduled, but problems would come up and get us digging around in the database only to find out that STATEID hadn’t equaled zero in a very long time.

 

Then, introducing, Parcel Fabric. For those that didn’t stop and groan right there; Parcel Fabric is a data editing model by ESRI and is even more database intensive. It is a completely different way of storing, accessing and editing your parcel records. With implementing the Fabric, we need better compressions now more than ever.

 

So, let’s just automate this. Well if it was that easy, there would be no need for this article. Needless to say, we ran into a few speedbumps along the way. Our editors use Operating System Authentication to connect to SDE – the first issue to iron out. Connecting this way will not allow a script computer to create those connections. So, do we run a script on each editors’ computer? This will require them to leave their computers running overnight or we need to try to get a task to run at shutdown (a task that will require some time). What was also baffling was that the test version would not delete as part of the reconcile script. Running the tool manually resulted in the same problem. The optional delete versions after post was non-responsive. After quite a bit of testing and a support call we call this “NIM#101899”. While waiting on its official diagnosis, a work-around was invented, we call it “timeout”.

 

So, in the end we went away from using O/S authentication accounts in favor of database authentication. These connections were all added to the script box. At night, a batch file calls one python file to reconcile and post; a timeout of 2 minutes; then another python file to delete the versions. In the morning another python file runs to create the versions. The versions are all named the same each time, cutting down on the time the mappers have to re-map their data in their MXDs. You see, when they handled their versions, they would name them with the date in it so they could see how old it was which required them to redo their MXDs as frequently as they changed versions, which wasn’t that often anyway.

So, there you have it. A few weeks wrapped up in a few paragraphs. Hopefully this will enlighten, encourage, or scare away someone else wanting to do the same.

Outcomes