<?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 Replacing SDE connection in MXD's in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/replacing-sde-connection-in-mxd-s/m-p/494322#M1652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Like many before me (and yes, I have perused the forums looking for pointers) I am having to change servers for one of the several SDE databases.&amp;nbsp; I would like to have a script that can be run either from python or as a GP script in ArcCatalog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have several mxd's that are in the same folder (as well as several folders with individual mxds) that need to be updated.&amp;nbsp; I have grabbed code from several others that have done the same thing and attempted to get the end result as desired to no avail.&amp;nbsp; I'm getting the saved second copy of the mxd in another directory and a partial output file telling me what it is doing (or not doing).&amp;nbsp; The output file lists the mxd, the full path, and dataframe.&amp;nbsp; I'd like to get the layers listed if they are part of the changing database and then have the datasource changed for each of those layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are only changing the server location of the database, the name and structure is remaining the same.&amp;nbsp; I will be creating a sde connection file to pass to everyone (we use AD groups with windows login) to be placed in the ArcCatalog directory in the appdata directory for each user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried several things, but it appears that it isn't getting past the layer list right now - yet, this was working when I had it just reporting back to me the listings.&amp;nbsp; I'm also aware of the 'feature' where using ArcCatalog to change the data source in the mxd doesn't work as advertised.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run this script, the only info returned besides the incomplete listing of data is, "returned exit code 0".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Running ArcDesktop 10.0 SP2, SDE 9.3.1, Python 2.6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any insight that can be offered.&amp;nbsp; And I realize that it could be a simple typo or misplaced quote or something, but I just don't see it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Sep 2013 20:27:21 GMT</pubDate>
    <dc:creator>LorindaGilbert</dc:creator>
    <dc:date>2013-09-06T20:27:21Z</dc:date>
    <item>
      <title>Replacing SDE connection in MXD's</title>
      <link>https://community.esri.com/t5/transportation-questions/replacing-sde-connection-in-mxd-s/m-p/494322#M1652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Like many before me (and yes, I have perused the forums looking for pointers) I am having to change servers for one of the several SDE databases.&amp;nbsp; I would like to have a script that can be run either from python or as a GP script in ArcCatalog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have several mxd's that are in the same folder (as well as several folders with individual mxds) that need to be updated.&amp;nbsp; I have grabbed code from several others that have done the same thing and attempted to get the end result as desired to no avail.&amp;nbsp; I'm getting the saved second copy of the mxd in another directory and a partial output file telling me what it is doing (or not doing).&amp;nbsp; The output file lists the mxd, the full path, and dataframe.&amp;nbsp; I'd like to get the layers listed if they are part of the changing database and then have the datasource changed for each of those layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are only changing the server location of the database, the name and structure is remaining the same.&amp;nbsp; I will be creating a sde connection file to pass to everyone (we use AD groups with windows login) to be placed in the ArcCatalog directory in the appdata directory for each user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried several things, but it appears that it isn't getting past the layer list right now - yet, this was working when I had it just reporting back to me the listings.&amp;nbsp; I'm also aware of the 'feature' where using ArcCatalog to change the data source in the mxd doesn't work as advertised.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run this script, the only info returned besides the incomplete listing of data is, "returned exit code 0".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Running ArcDesktop 10.0 SP2, SDE 9.3.1, Python 2.6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any insight that can be offered.&amp;nbsp; And I realize that it could be a simple typo or misplaced quote or something, but I just don't see it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 20:27:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/replacing-sde-connection-in-mxd-s/m-p/494322#M1652</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-06T20:27:21Z</dc:date>
    </item>
  </channel>
</rss>

