How to remove GP History

8036
11
06-08-2018 12:07 PM
ThomasColson
MVP Frequent Contributor

As a follow up to https://community.esri.com/message/707351-re-arcgis-pro-is-unusable-with-large-sde-geodatabases?comm... , I'm not finding any tool or python in Pro that allows one to remove geoprocessing history? Is, or will, this be possible with Pro?

0 Kudos
11 Replies
ChrisDonohue__GISP
MVP Alum

I found this, but have not tried it myself:

Manage history

If you open the project at a later time to continue your work, all of your geoprocessing history will be available for review. You can easily reopen and run any of the tools in the history by double-clicking the entry. If you do not want the geoprocessing history maintained with a project, you can remove it. To remove individual tools, right-click an entry and select Remove. Single or multiple selected history entries can also be removed using the Remove Delete button.

Source:  Geoprocessing history—ArcGIS Pro | ArcGIS Desktop 

There is some Python that works for ArcGIS Desktop that possibly may work for ArcGIS Pro.  They don't explicitly mention ArcGIS Pro as one of the software packages when they list them at the bottom of this article, so it would take some experimenting.

How To: Delete geoprocessing history from a geodatabase 

Chris Donohue, GISP

ThomasColson
MVP Frequent Contributor

How To: Delete geoprocessing history from a geodatabase  doesn't work in Pro: Lots of syntax errors. Manage history only applies to history written to the SDE or the  Feature lass metadata while manipulating data in Pro. The problem I have is bloated SDE databases from GP history getting squirreled away everywhere. 

0 Kudos
ThomasColson
MVP Frequent Contributor

And to add that, assuming this is a fresh machine image, the production environment won't have Arc Map installed so any tool that references stylesheets in the Arc Map installation directory doesn't help much either. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

Short of cleansing your SDE stuff by copying/consolidating/whatever..

You can turn on/off the geoprocessing history

SetLogHistory—ArcPy Functions | ArcGIS Desktop 

But that is about it.

What tools in here, if any, are you using to cleanup?

An overview of the Geodatabase Administration toolset—Data Management toolbox | ArcGIS Desktop 

JonathanFarmer_oldaccount
Occasional Contributor III

Hi Thomas,

How To: Delete geoprocessing history from a geodatabase  is still the go to for removing geoprocessing history from an enterprise geodatabase. This is the method we recommend to our users in Support Services. Moving forward, of course, we'll have to evaluate things like this.

In Support, we've found that a lot of our users will have ArcGIS Desktop and ArcGIS Pro installed so it usually isn't an issue. In your case, it sounds like ArcGIS Pro is the only software in the production environment. 

I'm wondering if the quick and easy way to get the GP history cleaned up is to run this script from a Dev environment or other environment that has ArcGIS Desktop installed?

I should also note that deleting the geoprocessing history from the Catalog pane in ArcGIS Pro will only remove that history from the Project itself, not the geodatabase.

Jonathan

ThomasColson
MVP Frequent Contributor

I wouldn't say "Pro is the only production environment" yet. I'm getting ready for the day, far in the future, when there is no more Arc Map, and developing plans to accomplish the same things I need to in Pro. My next "Mountain" to climb is GP History and Metadata Management in Pro. I'm also working on a SQL solution to this answer with some success, but that doesn't help my FGDB users. So, what's it going to take to get https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsupport.esri.com%2Fen%2Ftechnical-ar... working in Pro? There are still going to be folks that change no setting related to storing GP history despite 25 emails and laminated posters asking them to turn it off, then wonder why the GP history takes up 90% of the GDB size. In response to Dan, I need to account for a more robust environment where I have less control of how folks are provisioning and editing data in Pro. They are not going to be running any Python, trust me. Long story, but the onus is on me to keep things running smooth and not say "no", hence the quest for what I hope will be an automated solution to removing the GP history using Pro. I'm starting with Python, 'cuz I can attach it to task scheduler. Dates are not clear yet, but I'm working on my base OS images that have Pro on them now and testing them thourougly. What 2.2.1-? contains will govern if that image get rolled out this year. 

So the take home message is despite what is my [opinion of] Pro, I'm getting ready for it, and working out all of these problems for the day when I do call TS, and am told "We're not supporting Arc". The other message I'm hearing is there is no way to delete GP history from a GDB using Pro, which is very concerning. 

Sounds like another "Idea".......

0 Kudos
JonathanFarmer_oldaccount
Occasional Contributor III

Hi Thomas,

Thanks for the detailed information on your plans and concerns. I'm going to get with some folks here internally and have a chat regarding this. I personally haven't gone down this road of geoprocessing history in the geodatabase with ArcGIS Pro as the sole client so I'm sure we'll need to do some testing and work to see what works and what doesn't.

I should note though that we'll be supporting ArcGIS Desktop for a good long while. We have 5 year support cycles for the software, the latest release of 10.6 being supported until December 2023. There are still more versions of ArcGIS Desktop yet to be released as well so it isn't going away any time soon. More information on product life cycle below.

Esri Support 10.6  

Jonathan

ThomasColson
MVP Frequent Contributor

Glad to hear Arc will be around for a while. Couple of thoughts, if you will, on when and where to use Arc vs Pro. Some shops don't care, and will keep Arc until they come to work one morning and it's gone. I suspect they've never heard of Pro. Some will run both side by side for as long as they can get away with it, because they have the support resources to maintain two completely different versions of desktop GIS software. Note the underlined phrase. I'd say this is 30-40% of Esri enterprise customers. So back to my dilemma, I'm not one of those shops with unlimited support resources. The decision has been handed down from above "I don't care when you switch, but when you do, there will only be Pro". So this circles back to the issue at hand, I'd love to be in a position 18-24 months from now where Pro can meet all of our GIS needs. You can't possibly imagine how much work that involves while still maintaining a 40 hour per week production schedule. I can imagine someone saying "Well if they check the right box in Pro, there will be no GP history to delete, right?", but you and I both know that no amount of box checking is going to keep all GP history out of the SDE, especially those legacy ones that were created back in the 9.x days. 

My SQL solution is hokey at best, and dangerous at times. Understanding that adding new tools to Pro might not be in the cards, perhaps some SQL stored procs might be the solution?

Mark_Johnson
New Contributor III

I'm on 10.7 Desktop, Arc Pro 2.5, and a 10.7 enterprise geodatabase. I tried the script and manual methods outlined in How To: Delete geoprocessing history from a geodatabase and the script runs with no errors, but the geoprocessing history isn't deleted. Can anyone else confirm this behavior?

I found this add-in https://www.arcgis.com/home/item.html?id=3646c7d507f44dbbba7a950b15315a0d#! that works great, but I have to do one layer at a time. I'd really prefer a scripted solution that I can run on a schedule.

I'm a little confused on the SetLogHistory option, I like to be able to refer back to my history in Desktop/Pro, I just don't want it attached to my data.

0 Kudos