Does anyone have knowledge with unregistering replica's using arcpy or some other solution I can incorporate into my script. We'd like to unregister replica's and the only workaround we've found was using the python function SynchronizeChanges_management. It kinda works but sometimes it doesn't remove the replica in the manager and we're forced to do it manually.
<SPAN class="comment token"># Local variables:</SPAN>
jnmiller_GIS_v1_gdb <SPAN class="operator token">=</SPAN> <SPAN class="string token">"C:\\EIS\\%s_%s_v%s.gdb"</SPAN> <SPAN class="operator token">%</SPAN> <SPAN class="punctuation token">(</SPAN>versionName<SPAN class="punctuation token">,</SPAN> version_list<SPAN class="punctuation token">,</SPAN> checkout_number<SPAN class="punctuation token">)</SPAN>
jnmiller_GIS_v1_gdb__2_ <SPAN class="operator token">=</SPAN> jnmiller_GIS_v1_gdb
NEO_sde__2_ <SPAN class="operator token">=</SPAN> jnmiller_GIS_v1_gdb
NEO_sde <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Database Connections\\NEO.sde"</SPAN>
<SPAN class="comment token"># Execute SynchronizeChanges</SPAN>
<SPAN class="keyword token">try</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Attempting to Synchronize %s"</SPAN> <SPAN class="operator token">%</SPAN> working_file<SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Process: Synchronize Changes</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>SynchronizeChanges_management<SPAN class="punctuation token">(</SPAN>jnmiller_GIS_v1_gdb<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"%s_%s_v%s"</SPAN><SPAN class="punctuation token">,</SPAN> NEO_sde<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"FROM_GEODATABASE2_TO_1"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"IN_FAVOR_OF_GDB2"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"BY_OBJECT"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"RECONCILE "</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">%</SPAN> <SPAN class="punctuation token">(</SPAN>versionName<SPAN class="punctuation token">,</SPAN> version_list<SPAN class="punctuation token">,</SPAN> checkout_number<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">except</SPAN> Exception<SPAN class="punctuation token">:</SPAN>
e <SPAN class="operator token">=</SPAN> sys<SPAN class="punctuation token">.</SPAN>exc_info<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>e<SPAN class="punctuation token">.</SPAN>args<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>