<?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: Setting Env. in Python when you are working with 2 databases on separate servers in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553930#M43278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some discussion on creating paths...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/filenames-and-file-paths-in-python"&gt;/blogs/dan_patterson/2016/08/14/filenames-and-file-paths-in-python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Dec 2016 19:15:23 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2016-12-27T19:15:23Z</dc:date>
    <item>
      <title>Setting Env. in Python when you are working with 2 databases on separate servers</title>
      <link>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553926#M43274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached the script I am working on. It is a basic script set-up to sync changes between two replicated sde geodatabases. They are replicated fine, and manual sync works fine but I've been wanting to automate it. The thing I'm unsure of, is... what do I set the environment to if both of these databases exists on different SQL Servers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only python scripts I have created have to do with reconciling version or compressing an sde, but for all of that, the environment is just a single SDE database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do I do if the script needs to interact with two databases not in the same location?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553926#M43274</guid>
      <dc:creator>deleted-user-t3dSviijg-m9</dc:creator>
      <dc:date>2016-12-22T16:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Env. in Python when you are working with 2 databases on separate servers</title>
      <link>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553927#M43275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at the attached script, the basic question boils down to calling &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;arcpy.SynchronizeChanges_management&lt;/SPAN&gt;.&amp;nbsp; Instead of setting a workspace (&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;arcpy.env.workspace&lt;/SPAN&gt;) and passing only the SDE connection file name, pass the full path to the SDE connection files.&amp;nbsp; I don't know if it is a best practice or not, but I always pass full paths to geodatabases&amp;nbsp;and SDE connection files&amp;nbsp;because then I am not dependent on what the workspace is set to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 18:13:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553927#M43275</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-12-22T18:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Env. in Python when you are working with 2 databases on separate servers</title>
      <link>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553928#M43276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This makes sense. It didn't dawn on me but, I keep all my SDE connection files in the same folder. I could essentially set the full file path to that folder as the workspace right? Alternatively, in this case... I'm not sure if I need to set a workspace. If I specify each gdb in the parameters of arcpy.SynchronizeChanges_management, I don't think a workspace is necessary since the gdb's are "hardcoded" into the script essentially. I think so?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 18:33:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553928#M43276</guid>
      <dc:creator>deleted-user-t3dSviijg-m9</dc:creator>
      <dc:date>2016-12-22T18:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Env. in Python when you are working with 2 databases on separate servers</title>
      <link>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553929#M43277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My suggestion, don't bother setting the workspace unless the tool absolutely requires it.&amp;nbsp; Use full paths to workspaces, geodatabases, etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 20:04:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553929#M43277</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-12-22T20:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Env. in Python when you are working with 2 databases on separate servers</title>
      <link>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553930#M43278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some discussion on creating paths...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/filenames-and-file-paths-in-python"&gt;/blogs/dan_patterson/2016/08/14/filenames-and-file-paths-in-python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2016 19:15:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-env-in-python-when-you-are-working-with-2/m-p/553930#M43278</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2016-12-27T19:15:23Z</dc:date>
    </item>
  </channel>
</rss>

