Select to view content in your preferred language

Publish & Edit Geodatabases, Part 2, Synchronize Changes

1179
4
04-17-2017 12:26 PM
JohnMellor__GISP
Regular Contributor

So in February we set up our Publish & Edit Geodatabases.  Works great.  And through the help of Jake Skinner learned how to synchronize changes. Which, again, works perfect.  Jake also provided information about using Python to schedule Scheduling a Python script to run at prescribed times- Help | ArcGIS Desktop, but we need help in automating the full process before we set up a schedule. 

Currently I manually stop the services, kill the connections, reconcile and post the versions, compress the SDE, synchronize the changes from edit to publish, then start the services.  

We are looking for best practices, how your organization handles this, what works, what doesn't work. 

I appreciate the feedback, and thanks to all in advance. 

0 Kudos
4 Replies
JakeSkinner
Esri Esteemed Contributor

Hi John,

Attached is a script that I use often when working with customers.  The script stops all ArcGIS Server services, reconcile/posts all version (does not delete the versions) to the DBO.Default version, compresses the database, then starts all the services.

The script will also send an e-mail if there was an error during the reconcile/post or the compress.  An e-mail will also be sent when the compress is successful.

The one thing you will want to add is the synchronization for your replicas before the reconcile/post.  Also, you will want to be sure to update statistics and indexes after the compress.

RebeccaStrauch__GISP
MVP Emeritus

Jake, thanks for posting your scripts.  I've always been a bit hesitant about automating the reconcile and post, but plan to try it after looking at your post and the help for ReconcileVersions_management   Reconcile Versions—Help | ArcGIS Desktop    

Have you ever had any of the automated Rec/Post corrupt an SDE?

0 Kudos
JakeSkinner
Esri Esteemed Contributor

rastrauch‌ I personally have not run into any issues with the Rec/Post automation corrupting the database.

JakeSkinner
Esri Esteemed Contributor

I decided to turn these scripts into a tool since I'm finding myself using this more and more.  It can be found here:

https://community.esri.com/docs/DOC-9914 

Hope others find this useful.