I am using the summary statistics tool in an iteration in model builder. When I run the model some times it works just fine and other times I get an error. The error says that it can't delete the table that is created by the summary statistics tool and that it may be locked by another application. I don't have anything else open that I know of that would cause a lock on this table. Any ideas as to why I'm getting this error?
did you ever open the table? (lock sometimes)
did you save between runs of the model? (sometimes clears out locks)
change the output filename and/or location
No guarantees, locks are challenging
Where are you writing the summary table? If IN_MEMORY that may cause an issue too.
I tried writing the summary table to in_memory and to a database. Neither one worked. I was never able to get it to work in ArcMap. I opened the same model in ArcPro and it worked without having to change anything.
Some things are better in Pro and one issue you may have been running into is ArcMap background processing which is the default setup. ArcMap foreground and background often have problems with various things, including file locks and properly passing layers between the foreground and background. In Pro -- all tools are run in the "background" in the GP processing thread.