<?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 Single MXD Broken SDE Links  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265533#M20428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a mxd that has broken SDE links ( well i have a lot of them) i am fine running a script one mxd at a time to repair the broken sources. some of the features are now in feature classes, to clean up the SDE location. some are still there. how do i write&amp;nbsp; a script that will look to the mxd i want it to and repair the SDE connection to find the feature. &lt;/P&gt;&lt;P&gt;also if the feature had been renamed how do i tell the the script to look for (old) and replace with (new) &lt;/P&gt;&lt;P&gt;i have looked at the generic "repair broken sources script" and i just cannot wrap my head around how to use this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Aug 2015 18:19:10 GMT</pubDate>
    <dc:creator>lelaharrington</dc:creator>
    <dc:date>2015-08-31T18:19:10Z</dc:date>
    <item>
      <title>Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265533#M20428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a mxd that has broken SDE links ( well i have a lot of them) i am fine running a script one mxd at a time to repair the broken sources. some of the features are now in feature classes, to clean up the SDE location. some are still there. how do i write&amp;nbsp; a script that will look to the mxd i want it to and repair the SDE connection to find the feature. &lt;/P&gt;&lt;P&gt;also if the feature had been renamed how do i tell the the script to look for (old) and replace with (new) &lt;/P&gt;&lt;P&gt;i have looked at the generic "repair broken sources script" and i just cannot wrap my head around how to use this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 18:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265533#M20428</guid>
      <dc:creator>lelaharrington</dc:creator>
      <dc:date>2015-08-31T18:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265534#M20429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lela,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you taken a look at the following help doc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/updatingandfixingdatasources.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/updatingandfixingdatasources.htm"&gt;Updating and fixing data sources with arcpy.mapping—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you script examples for different scenarios.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 19:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265534#M20429</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-08-31T19:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265535#M20430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have and i honestly cant understand it. &lt;/P&gt;&lt;P&gt;i have the connection it needs to go to and the connection it came from but i an not sure how to actually write it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 19:37:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265535#M20430</guid>
      <dc:creator>lelaharrington</dc:creator>
      <dc:date>2015-08-31T19:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265536#M20431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would need to write something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="kn"&gt;import&lt;/SPAN&gt; &lt;SPAN class="nn"&gt;arcpy&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;mxd&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s"&gt;r"C:\Project\Project_default.mxd"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;findAndReplaceWorkspacePaths&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s"&gt;r"C:\Project\Old Connection.sde"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="s"&gt;r"C:\Project\New Connection.sde"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;save&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="k"&gt;del&lt;/SPAN&gt; &lt;SPAN class="n"&gt;mxd&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="n"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="n"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:59:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265536#M20431</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T12:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265537#M20432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes! that is the script i am using however the part on it that says mxd.findAndReplaceWorkspacePaths(r"C:\Project\Old Connection.sde..." &lt;/P&gt;&lt;P&gt;that is the part i cannot seem to get right. if my SDE is a database connection in arc catalog how to i write the C:\Project. part? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 20:11:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265537#M20432</guid>
      <dc:creator>lelaharrington</dc:creator>
      <dc:date>2015-08-31T20:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265538#M20433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if it helps these are sql servers i am trying to basically tell the script &lt;/P&gt;&lt;P&gt;if the old connection is something like WBlmnpoGOGIS04 server then now connect to the KCF GIS PROD on KCF-GLE-SQL1.sde. i just don't know who to write the connections in. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 20:21:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265538#M20433</guid>
      <dc:creator>lelaharrington</dc:creator>
      <dc:date>2015-08-31T20:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265539#M20434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just posted a python addin &lt;A href="https://community.esri.com/migration-blogpost/55043"&gt;Python addin for data inventory and “broken-link” repair.&lt;/A&gt;&amp;nbsp;&amp;nbsp; If nothing else, using the first three tools will help you see all the FGDBs, feature classes, and broken links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no such thing as a once size fits all when it comes to fixing broken links, but this can fix changing types, changing paths, updating .sde and .ags layers, etc.&amp;nbsp;&amp;nbsp; The repair requires a modified .csv file that is output from the broken link tool.&amp;nbsp; I do not have any good samples of the file yet, but will try to get something posted by end of business. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 22:31:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265539#M20434</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-08-31T22:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Single MXD Broken SDE Links</title>
      <link>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265540#M20435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To access your SDE connections under 'Database Connections', you can use something similar to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r"Database Connections\SQLServer.sde"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy 
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project_default.mxd") 
mxd.findAndReplaceWorkspacePaths(r"Database Connections\Old Connection.sde", r"Database Connections\New Connection.sde") 
mxd.save() 
del mxd&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:59:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-mxd-broken-sde-links/m-p/265540#M20435</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T12:59:27Z</dc:date>
    </item>
  </channel>
</rss>

