Refresh Database Connection in modelbuilder or python

2856
2
Jump to solution
05-26-2016 01:10 PM
SharonZastre
New Contributor III

I have created a model that will select features in an enterprise db and export to a dbf table.  This feature class is versioned and when edited, the updated data is not automatically recognized when I run the model.  I need to refresh the database (in ArcCatalog, right click db connection > refresh) before the feature class table will update.  Is there a tool that I can add to modelbuilder that will refresh the database before the Table Select tool runs so that it is running on updated data.  Ultimately this needs to run as a scheduled task so no manual process should be used.

ArcGIS 10.2.2

SQL Server db

Thanks,

Sharon

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
WesMiller
Regular Contributor III
2 Replies
WesMiller
Regular Contributor III

Not sure if this will work. Have a look at RefreshCatalog—Help | ArcGIS for Desktop

SharonZastre
New Contributor III

Thanks Wes.  Adding that code to the exported python script works.

arcpy.refreshcatalog({file path to database connection file})