<?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: Data Management Tools/Geodatabase Administration/ Compress tool in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721491#M55868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is something I am a little confused on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't you actually need to also reconcile/post outstanding edits and then delete user versions -&amp;gt; compress -&amp;gt; recreate user versions -&amp;gt; update statistics &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been looking for a python script that will actually do this full compress workflow but so far have only found pieces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insight to this would be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 13:46:00 GMT</pubDate>
    <dc:creator>collindegueurce</dc:creator>
    <dc:date>2014-08-28T13:46:00Z</dc:date>
    <item>
      <title>Data Management Tools/Geodatabase Administration/ Compress tool in Python</title>
      <link>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721488#M55865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Under Systems toolboxes/Data Management Tools/Geodatabase Administration/Compress tool. Is there a way to recreate this tool in python so it can compress the geodatabase enterprise every week. Any help in finding this in arcpy. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;would the following script be the python for this tool&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
 
arcpy.Compress_management("Database Connections\Connection to brockville.sde")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 17:09:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721488#M55865</guid>
      <dc:creator>HectorChapa</dc:creator>
      <dc:date>2013-12-12T17:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Data Management Tools/Geodatabase Administration/ Compress tool in Python</title>
      <link>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721489#M55866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, that is correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000000p000000"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000000p000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 17:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721489#M55866</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2013-12-12T17:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Data Management Tools/Geodatabase Administration/ Compress tool in Python</title>
      <link>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721490#M55867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could do this in Python, but you really don't &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;have &lt;/SPAN&gt;&lt;SPAN&gt;to.&amp;nbsp; Another route to go would be to set up a Windows batch file with SDE command line and run it as a scheduled task; then have it email you the results.&amp;nbsp; For example, try something like this (assumes Oracle but you could modify for SQL Server):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sqlplus sde/sde@database @c:\scripts\lineages_report.sql &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sdeversion -o compress -i esri_production -u sde -p sde -N&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sqlplus sde/sde@database @c:\scripts\lineages_report.sql &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;c:\scripts\rnetmail -t &lt;/SPAN&gt;&lt;A href="mailto:user@email.domain.com"&gt;user@email.domain.com&lt;/A&gt;&lt;SPAN&gt; -f SDE@servername -s Nightly Compress Report -m c:\scripts\lineages_report.txt -x smtp.domain.int&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lines 1 and 3 run a separate SQL script against the database to grab the current state ID for BEFORE and AFTER the compress and then spit those numbers out to a text file.&amp;nbsp; Line 2 performs the compress.&amp;nbsp; Line 4 would be where you'd send the email containing the info from the text file; in this example I'm showing the use of a utility called RNETMAIL but there are plenty of options for this.&amp;nbsp; We follow a procedure like this and, each night after the compress finishes, we get an email showing us how much the lineage got crunched.&amp;nbsp; One thing to remember, however, is that the SDE command line tools will eventually be deprecated after the next release of ArcGIS.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 18:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721490#M55867</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2013-12-12T18:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Data Management Tools/Geodatabase Administration/ Compress tool in Python</title>
      <link>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721491#M55868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is something I am a little confused on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't you actually need to also reconcile/post outstanding edits and then delete user versions -&amp;gt; compress -&amp;gt; recreate user versions -&amp;gt; update statistics &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been looking for a python script that will actually do this full compress workflow but so far have only found pieces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insight to this would be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 13:46:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721491#M55868</guid>
      <dc:creator>collindegueurce</dc:creator>
      <dc:date>2014-08-28T13:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Data Management Tools/Geodatabase Administration/ Compress tool in Python</title>
      <link>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721492#M55869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually &lt;A href="https://community.esri.com/migrated-users/18382"&gt;William Craft&lt;/A&gt; you already answered the question at the link below.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/86698#86698" title="https://community.esri.com/message/86698#86698"&gt;https://community.esri.com/message/86698#86698&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just found that. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 13:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/data-management-tools-geodatabase-administration/m-p/721492#M55869</guid>
      <dc:creator>collindegueurce</dc:creator>
      <dc:date>2014-08-28T13:49:03Z</dc:date>
    </item>
  </channel>
</rss>

