<?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: Python Script - Updating Feature Class in SDE daily in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813234#M3316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How often do you truncate and append your non-versioned feature classes from other state agencies?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2015 15:34:58 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2015-10-06T15:34:58Z</dc:date>
    <item>
      <title>Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813222#M3304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am going to implement a nightly script which will remove all records in a Feature Class in our spatial DB, and append new records.&lt;/P&gt;&lt;P&gt;Apart from compressing the Database, is there anything else I should manage? Analyze ? Should I remove any locks that could be connected?&lt;/P&gt;&lt;P&gt;This process will run every night.&lt;/P&gt;&lt;P&gt;Will compressing the entire DB have an effect with any child/parent DBs ?&lt;/P&gt;&lt;P&gt;Also, are you able to compress a single Feature Class rather than an entire DB ?&lt;/P&gt;&lt;P&gt;we run 10.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 00:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813222#M3304</guid>
      <dc:creator>timdunlevie</dc:creator>
      <dc:date>2015-10-02T00:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813223#M3305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Compress, Rebuild Indexes, Analyze datasets are some of the maintenance tasks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Disconnecting all users before doing the compress will help. Considering that the script will run nightly, this shouldn't be a problem I guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, compressing the sde geodatabase will not affect replica GDBs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, the compress tool runs for the entire geodatabase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 04:39:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813223#M3305</guid>
      <dc:creator>AsrujitSengupta</dc:creator>
      <dc:date>2015-10-02T04:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813224#M3306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant!&lt;/P&gt;&lt;P&gt;Many thanks….just what I needed to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 04:41:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813224#M3306</guid>
      <dc:creator>timdunlevie</dc:creator>
      <dc:date>2015-10-02T04:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813225#M3307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's what i use&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import system modules
import arcpy,os


# set workspace
workspace = r"Your File here"


# set the workspace environment
arcpy.env.workspace = workspace


# No more users to connect to database
arcpy.AcceptConnections(workspace, False)


#Disconnect Users
arcpy.DisconnectUser (workspace, "ALL")


# Compress database
arcpy.Compress_management(workspace)
print 'Compression Complete'


# Get a list of stand alone feature classes
dataList = arcpy.ListFeatureClasses()


# Add Feature classes in datasets
for dataset in arcpy.ListDatasets("", "Feature"):
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = os.path.join(workspace,dataset)
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataList += arcpy.ListFeatureClasses()


# reset the workspace
arcpy.env.workspace = workspace


# Execute rebuild indexes
arcpy.RebuildIndexes_management(workspace, "NO_SYSTEM", dataList, "ALL")
print 'Rebuild Complete'


# Allow connections.
arcpy.AcceptConnections(workspace, True)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813225#M3307</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-12T09:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813226#M3308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this feature class large?&amp;nbsp; Are &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; the records being altered/modified each day?&amp;nbsp; I ask because completely deleting all records in a feature class only to replace them with many of the same records creates a lot of overhead, especially if the feature class is versioned, even more especially if there are replicas based off of the geodatabase.&amp;nbsp; If most of the records don't change, it might be more efficient to implement a record comparison workflow and only purge and replace records that are different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 20:12:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813226#M3308</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-10-02T20:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813227#M3309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Joshua as the DBA of my organization would only do an incremental update of data in an SDE feature class and not a full truncate and append as there is a cost in swap space (or something to that effect) with the truncate and append process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 20:28:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813227#M3309</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2015-10-02T20:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813228#M3310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why no &lt;A href="http://resources.arcgis.com/EN/HELP/MAIN/10.2/0017/00170000014z000000.htm"&gt;Analyze Datasets&lt;/A&gt;​ &lt;A href="https://community.esri.com/migrated-users/16710"&gt;Wes Miller&lt;/A&gt;​?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 21:25:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813228#M3310</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2015-10-02T21:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813229#M3311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah the FC is ~ 8000 records, of which maybe only a handful are added/modified.&lt;/P&gt;&lt;P&gt;So a record comparison is the way to go….thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you run a script to perform this comparison?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 00:29:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813229#M3311</guid>
      <dc:creator>timdunlevie</dc:creator>
      <dc:date>2015-10-05T00:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813230#M3312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought i had put that in, apparently, I didn't thanks&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 13:38:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813230#M3312</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-10-05T13:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813231#M3313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are all of your feature classes in the same schema?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 15:42:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813231#M3313</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2015-10-05T15:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813232#M3314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes they are all in the same schema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 14:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813232#M3314</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-10-06T14:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813233#M3315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our Corporate Library SDE database has no versioned feature classes so we do the Truncate / Append all the time.&amp;nbsp; Many of the datasets are coming from other state agencies so it's just easier to do it this way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 15:31:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813233#M3315</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2015-10-06T15:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813234#M3316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How often do you truncate and append your non-versioned feature classes from other state agencies?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 15:34:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813234#M3316</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2015-10-06T15:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813235#M3317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of getting into the specifics of what works for us, and might not work for others, I encourage you to look over &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/an-overview-of-the-data-comparison-toolset.htm"&gt;An overview of the Data Comparison toolset &lt;/A&gt;if you haven't already.&amp;nbsp; I have used both Feature Compare and Table Compare.&amp;nbsp; Although they require a bit of setup, once done, the tools can be quite efficient.&amp;nbsp; The Detect_Feature_Changes tool has always intrigued me, but I have never taken the time to try it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 16:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813235#M3317</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-10-06T16:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813236#M3318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim, would you mind posting your script?&amp;nbsp; I did this in the past, and posted to the ESRI forums, but was removed with the archives I guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Barry Guidry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 13:35:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813236#M3318</guid>
      <dc:creator>BarryGuidry</dc:creator>
      <dc:date>2019-04-11T13:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Updating Feature Class in SDE daily</title>
      <link>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813237#M3319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will have to dig out the code as I have since left the company I implemented this with…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2019 01:41:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/python-script-updating-feature-class-in-sde-daily/m-p/813237#M3319</guid>
      <dc:creator>timdunlevie</dc:creator>
      <dc:date>2019-04-12T01:41:55Z</dc:date>
    </item>
  </channel>
</rss>

