<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Where Do i get the geodatabases Connection for Python script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/where-do-i-get-the-geodatabases-connection-for/m-p/306248#M23756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Refer to the web document that also provides a code sample for the&amp;nbsp;Synchronize Changes tool,&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/synchronize-changes.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/synchronize-changes.htm&lt;/A&gt;&lt;SPAN style="color: #3d3d3d;"&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&lt;SPAN style="color: #4d4d4d;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #4d4d4d;"&gt;replica_gdb1&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #4d4d4d;"&gt;replica_gdb2&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&amp;nbsp;local variables in the python script refer to the location of the SDE (&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #3d3d3d;"&gt;.sde&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;) geodatabase connection files. These files&amp;nbsp;have the information to connect to your enterprise geodatabase and are created from the Catalog tree in&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d;"&gt;ArcGIS Desktop (&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/database-servers/save-connection-to-specific-version.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/manage-data/database-servers/save-connection-to-specific-version.htm#&lt;/A&gt;).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 15px;"&gt;The&amp;nbsp;Sync Changes wizard is&amp;nbsp;not necessarily pointing to the location of the .sde file, so this information is not enough to run the python script. You will have to make sure the geodatabase_1 and the geodatabase_2 input parameters for the tool, point to the location of the SDE connection files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jul 2019 16:02:43 GMT</pubDate>
    <dc:creator>MaliniRamalingam</dc:creator>
    <dc:date>2019-07-02T16:02:43Z</dc:date>
    <item>
      <title>Where Do i get the geodatabases Connection for Python script</title>
      <link>https://community.esri.com/t5/python-questions/where-do-i-get-the-geodatabases-connection-for/m-p/306246#M23754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am not good with python, I am new. I am trying to synchronize changes from a replica between databases and i want this to run automatically every day with a task scheduler. In esri help i found this sintaxis&lt;/P&gt;&lt;H2 style="color: #4d4d4d; background-color: #fefefe; font-weight: 500; font-size: 2rem; margin: 1.26316em 0px 0.63158em;" id="toc-hId-1673391099"&gt;Sintaxis&lt;/H2&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SynchronizeChanges_management (geodatabase_1, in_replica, geodatabase_2, in_direction, conflict_policy, conflict_definition, reconcile)

And I did this script:
 
&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;message = "Sync replicas CRIMPRDB to cdprdb01...";print message
 # Process: Synchronize Changes (80)
 arcpy.SynchronizeChanges_management(&lt;STRONG&gt;crim-oradb-01-sde:oracle$crim-oradb-01/cdprdb&lt;/STRONG&gt;, "MAPUSER.CD_PARCELAS", c&lt;STRONG&gt;dprdb01-sde:sqlserver:cdprdb01-cdprgis&lt;/STRONG&gt;, "FROM_GEODATABASE1_TO_2", "IN_FAVOR_OF_GDB1", "BY_OBJECT", "DO_NOT_RECONCILE")
 message = "---Sync de replica CRIMPRDB to cdprdb01 successful";print message
 
 arcpy.AnalyzeDatasets_management(input_database="Database Connections/gisadmin@cdprdb01.sde", include_system="NO_SYSTEM", in_datasets="cdprgis.GISADMIN.Parcelario/cdprgis.GISADMIN.Parcelario;cdprgis.GISADMIN.Parcelario_Web/cdprgis.GISADMIN.ParcelasContactos;cdprgis.GISADMIN.Parcelario_Web/cdprgis.GISADMIN.ParcelasContactos04242019_1", analyze_base="ANALYZE_BASE", analyze_delta="NO_ANALYZE_DELTA", analyze_archive="NO_ANALYZE_ARCHIVE")
 arcpy.Compress_management(in_workspace="Database Connections/sde@cdprdb01.sde")
 arcpy.RebuildIndexes_management(input_database="Database Connections/gisadmin@cdprdb01.sde", include_system="NO_SYSTEM", in_datasets="cdprgis.GISADMIN.Parcelario/cdprgis.GISADMIN.Parcelario;cdprgis.GISADMIN.Parcelario_Web/cdprgis.GISADMIN.ParcelasContactos;cdprgis.GISADMIN.Parcelario_Web/cdprgis.GISADMIN.ParcelasContactos04242019_1", delta_only="ALL")
 print"Indices Reconstruidos para Parcelario"
message = "--Replica Sync Completed Succesfully";print message&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/PRE&gt;&lt;P&gt;My doubt is with geodatabase 1 and 2 part, where do I get the connections? how do I write those?&lt;/P&gt;&lt;P&gt;I found this in my syn changes wizard and I wrote those, Is that correct?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="451692" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/451692_pastedImage_180.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Diego Llamas&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/2621" target="_blank"&gt;George Thompson&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:39:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/where-do-i-get-the-geodatabases-connection-for/m-p/306246#M23754</guid>
      <dc:creator>DiegoLlamas</dc:creator>
      <dc:date>2021-12-11T14:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Where Do i get the geodatabases Connection for Python script</title>
      <link>https://community.esri.com/t5/python-questions/where-do-i-get-the-geodatabases-connection-for/m-p/306247#M23755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you run the python script?&amp;nbsp; Did you get any error messages?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2019 18:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/where-do-i-get-the-geodatabases-connection-for/m-p/306247#M23755</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2019-06-27T18:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Where Do i get the geodatabases Connection for Python script</title>
      <link>https://community.esri.com/t5/python-questions/where-do-i-get-the-geodatabases-connection-for/m-p/306248#M23756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Refer to the web document that also provides a code sample for the&amp;nbsp;Synchronize Changes tool,&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/synchronize-changes.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/synchronize-changes.htm&lt;/A&gt;&lt;SPAN style="color: #3d3d3d;"&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&lt;SPAN style="color: #4d4d4d;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #4d4d4d;"&gt;replica_gdb1&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #4d4d4d;"&gt;replica_gdb2&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&amp;nbsp;local variables in the python script refer to the location of the SDE (&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #3d3d3d;"&gt;.sde&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;) geodatabase connection files. These files&amp;nbsp;have the information to connect to your enterprise geodatabase and are created from the Catalog tree in&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d;"&gt;ArcGIS Desktop (&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/database-servers/save-connection-to-specific-version.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/manage-data/database-servers/save-connection-to-specific-version.htm#&lt;/A&gt;).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 15px;"&gt;The&amp;nbsp;Sync Changes wizard is&amp;nbsp;not necessarily pointing to the location of the .sde file, so this information is not enough to run the python script. You will have to make sure the geodatabase_1 and the geodatabase_2 input parameters for the tool, point to the location of the SDE connection files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Tahoma; font-size: 12.0pt; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2019 16:02:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/where-do-i-get-the-geodatabases-connection-for/m-p/306248#M23756</guid>
      <dc:creator>MaliniRamalingam</dc:creator>
      <dc:date>2019-07-02T16:02:43Z</dc:date>
    </item>
  </channel>
</rss>

