<?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 How to Analyze and Compress Geodatabase automatically? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616358#M13680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My situation:&amp;nbsp; SDE SQL Express Geodatabase, ArcGIS 10.1.&amp;nbsp; When user submitted incidents online. My other script is connecting to the backend SQL database to forward, add comments, etc. The problem is, when I open SQL Management Studio, the data is not updated. I have to use ArcCatalog&amp;nbsp; Data Server command "Compress" to synchronize.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a script to do so? Robert, or Anyone can help with some ideas?&amp;nbsp; Thank you very much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to use this instead of online editing. Because online editing has to bring up the map, many of our citizen requests, once entered into system, we need heavily editing, it doesnot need map involved. We only update the attributes, add comments, etc.&amp;nbsp; I can easily use a ASP.net Script to connect to SQL Express and update.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Dec 2012 22:48:11 GMT</pubDate>
    <dc:creator>cristiBJ</dc:creator>
    <dc:date>2012-12-11T22:48:11Z</dc:date>
    <item>
      <title>How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616358#M13680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My situation:&amp;nbsp; SDE SQL Express Geodatabase, ArcGIS 10.1.&amp;nbsp; When user submitted incidents online. My other script is connecting to the backend SQL database to forward, add comments, etc. The problem is, when I open SQL Management Studio, the data is not updated. I have to use ArcCatalog&amp;nbsp; Data Server command "Compress" to synchronize.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a script to do so? Robert, or Anyone can help with some ideas?&amp;nbsp; Thank you very much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to use this instead of online editing. Because online editing has to bring up the map, many of our citizen requests, once entered into system, we need heavily editing, it doesnot need map involved. We only update the attributes, add comments, etc.&amp;nbsp; I can easily use a ASP.net Script to connect to SQL Express and update.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 22:48:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616358#M13680</guid>
      <dc:creator>cristiBJ</dc:creator>
      <dc:date>2012-12-11T22:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616359#M13681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this not a normal way to go?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 15:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616359#M13681</guid>
      <dc:creator>cristiBJ</dc:creator>
      <dc:date>2012-12-12T15:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616360#M13682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cristi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I would imagine that you would have to setup a GeoProcessing service to do this. You can script about anything in python and then publish it as a geoprocessing service in ArcGIS Server and then call that service from flex. I don't have any examples of code for this though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 12:07:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616360#M13682</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-12-13T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616361#M13683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you trying to hit the attribute table directly?&amp;nbsp; You can make life a lot easier on yourself if you use a Versioned View.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can create a view that pulls the data for the system tables that ArcSDE uses to keep track of changes to a view that you can then use.&amp;nbsp; If you do this, you won't have to compress your data after every edit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Creating_versioned_views_from_ArcGIS_Desktop/006z000000vr000000/"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/Creating_versioned_views_from_ArcGIS_Desktop/006z000000vr000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 13:15:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616361#M13683</guid>
      <dc:creator>JacobBoyle</dc:creator>
      <dc:date>2012-12-13T13:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616362#M13684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again, for available to reply. I got the below Python code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But It has this error message when executing "Error 000837: The workspace is not the correct workspace type. Failed to execute&amp;lt;Compress&amp;gt;".&amp;nbsp; The SDE connection file is from the folder that ArcCatalog uses to connect. See attached screen copy of connection in arcCatalog. I am stuck here &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import system, Geoprocessing, time and email modules&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys, string, os, arcgisscripting, time&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the date.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Date = time.strftime("%m-%d-%Y", time.localtime())&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Time = time.strftime("%I:%M:%S %p", time.localtime())&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create the Geoprocessor object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;##gp.CheckProduct("ArcEditor") # Checks the license level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;##gp.SetProduct("ArcEditor") # Sets the license level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Process: Check out the highest license available&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if gp.CheckProduct("ArcView") == "Available":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.SetProduct("ArcView")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif gp.CheckProduct("ArcEditor") == "Available":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.SetProduct("ArcEditor")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif gp.CheckProduct("ArcInfo") == "Available":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.SetProduct("ArcInfo")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message = "ERROR: Could not select an ArcGIS license level! Exiting script..."; showPyError(); sys.exit()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message =&amp;nbsp; "Selected an " + gp.ProductInfo() + " license"; showPyMessage()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print "Process started at " + str(Date) + " " + str(Time) + "." + "\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set up the log file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LogFile = file('C:\\temp\\Analyze\\GIS-' + Date + '.txt', 'w') #Creates a log file with todays date.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output = open('C:\\temp\\Analyze\\GIS-' + Date + '.txt', 'w') #Path to log file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output.write(str("Process started at " + str(Date) + " " + str(Time) + "." + "\n")) # Write the start time to the log file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Load required toolboxes&amp;nbsp; (This shouldn't need to be changed unless ArcGIS was&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; installed to a different location)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddToolbox("C:/Program Files (x86)/ArcGIS/Desktop10.1/ArcToolbox/Toolboxes/Data Management Tools.tbx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Compress the database&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Begining Compress..." + "\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.toolbox = "management"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # For this script to work it will need the full path to the .sde connection file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.compress("C:\Documents and Settings\Administrator\Application Data\ESRI\Desktop10.1\ArcCatalog\Connection to chester_sqlexpress.sde")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print gp.GetMessages() + "\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output.write(gp.GetMessages()+ "\n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text = gp.GetMessages()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Display message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print Text&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Sets the Date &amp;amp; Time since the script started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Date = time.strftime("%m-%d-%Y", time.localtime())# Set the date.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Time = time.strftime("%I:%M:%S %p", time.localtime()) # Set the time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output.write(str("Process completed at " + str(Date) + " " + str(Time) + "." + "\n")) # Write the start time to the log file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;output.close() # Closes the log file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print "Process completed at " + str(Date) + " " + str(Time) + "."&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 19:51:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616362#M13684</guid>
      <dc:creator>cristiBJ</dc:creator>
      <dc:date>2012-12-13T19:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616363#M13685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jacob&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I read the help. Then I did create the versioned view. (please see attached screen).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I query from SQL Script, I still do not get the latest update.(unless I manually compress database).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did I miss something? How do I know if I am querying against the versioned view? When I follow the link and create the versioned view, does it make the system use this versioned view?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'My ASP Script to query the database&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim connection &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set connection = CreateObject("ADODB.Connection") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;connection.ConnectionString ="Provider=sqloledb;Server=CHESTER\SQLEXPRESS;Initial Catalog=ServiceRequest;User ID=sql_servicerequest;Password=citygov" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;connection.Open() &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'do a query&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sSQL = "SELECT * FROM SERVICEREQUESTPRIMARY"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rst = Server.CreateObject("ADODB.Recordset")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rst.ActiveConnection = connection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rst.open sSQL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if not rst.eof then&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; .............&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you trying to hit the attribute table directly?&amp;nbsp; You can make life a lot easier on yourself if you use a Versioned View.&lt;BR /&gt;&lt;BR /&gt;You can create a view that pulls the data for the system tables that ArcSDE uses to keep track of changes to a view that you can then use.&amp;nbsp; If you do this, you won't have to compress your data after every edit.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Creating_versioned_views_from_ArcGIS_Desktop/006z000000vr000000/"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/Creating_versioned_views_from_ArcGIS_Desktop/006z000000vr000000/&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 20:21:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616363#M13685</guid>
      <dc:creator>cristiBJ</dc:creator>
      <dc:date>2012-12-13T20:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616364#M13686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;An Update to above, my Python script complained "The Workspace is not the correct workspace...". Then I added the below code to clear cache before compressing. It worked successfully. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ClearWorkspaceCache_management("C:\Documents and Settings\Administrator\Application Data\ESRI\Desktop10.1\ArcCatalog\Connection to chester_sqlexpress.sde")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()+"\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This link helped me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000000m000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000000m000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you Robert. Now I am going to see how to make this a geoprocessing service that I can call from my script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 21:05:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616364#M13686</guid>
      <dc:creator>cristiBJ</dc:creator>
      <dc:date>2012-12-13T21:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616365#M13687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Robert,&amp;nbsp; &lt;BR /&gt;Thank you again, for available to reply. I got the below Python code.&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;But It has this error message when executing "Error 000837: The workspace is not the correct workspace type. Failed to execute&amp;lt;Compress&amp;gt;". The SDE connection file is from the folder that ArcCatalog uses to connect. See attached screen copy of connection in arcCatalog. I am stuck here &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;try:&amp;nbsp; &lt;BR /&gt; # Compress the database&amp;nbsp; &lt;BR /&gt; print "Begining Compress..." + "\n"&amp;nbsp; &lt;BR /&gt; gp.toolbox = "management"&amp;nbsp; &lt;BR /&gt; # For this script to work it will need the full path to the .sde connection file.&amp;nbsp; &lt;BR /&gt; gp.compress("&amp;nbsp; &lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;C:\Documents and Settings\Administrator\Application Data\ESRI\Desktop10.1\ArcCatalog\Connection to chester_sqlexpress.sde&lt;/SPAN&gt;")&amp;nbsp; &lt;BR /&gt; print gp.GetMessages() + "\n"&amp;nbsp; &lt;BR /&gt; output.write(gp.GetMessages()+ "\n")&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Without being able to dive in and test, I believe at least one of the issues is here. I think that should be something like &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;"Database Connections\\Connection to chester_sqlexpress"&lt;/PRE&gt;&lt;SPAN&gt; .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I often start a model in ArcMap and add the compress tool, then browse to the dataset, export to python script and that will give you the proper synatax for the path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a thought, not sure if it helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, not sure about compress, but arcpy.Compact_management runs orders of magnitude faster than the gp.Compact_management. Might get better perfomance if you convert it all to arcpy.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 21:08:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616365#M13687</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2012-12-13T21:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616366#M13688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you rzufelt. I found out it is the cache that caused the error, not the path to the sde file.&amp;nbsp; I am still not sure if we need to clear cache each time before compressing. Do you know?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do find out both arcpy, and gy compress the database. Since you point out arcpy is much faster, I will use it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Without being able to dive in and test, I believe at least one of the issues is here.&amp;nbsp; I think that should be something like &lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;"Database Connections\\Connection to chester_sqlexpress"&lt;/PRE&gt; .&lt;BR /&gt;I often start a model in ArcMap and add the compress tool, then browse to the dataset, export to python script and that will give you the proper synatax for the path.&lt;BR /&gt;&lt;BR /&gt;Just a thought, not sure if it helps,&lt;BR /&gt;&lt;BR /&gt;R_&lt;BR /&gt;&lt;BR /&gt;Also, not sure about compress, but arcpy.Compact_management runs orders of magnitude faster than the gp.Compact_management.&amp;nbsp; Might get better perfomance if you convert it all to arcpy.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 22:47:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616366#M13688</guid>
      <dc:creator>cristiBJ</dc:creator>
      <dc:date>2012-12-13T22:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Analyze and Compress Geodatabase automatically?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616367#M13689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, I don't know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as the compress being faster, one would have to test that.&amp;nbsp; I did find that several of the arcpy tools run a lot faster though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In particular, if I used the gp version it would take 10-15 minutes to compact my FGDB depending on network traffic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;using the arcpy version, it would compact it in 10-15 &lt;/SPAN&gt;&lt;STRONG&gt;seconds&lt;/STRONG&gt;&lt;SPAN&gt; depending on network traffic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope you figure it out,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 22:54:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-analyze-and-compress-geodatabase/m-p/616367#M13689</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2012-12-13T22:54:26Z</dc:date>
    </item>
  </channel>
</rss>

