Modelbuilder creates several invalid Geodatabases without reason, and also an error "Cannot acquire a schema lock because of an existing lock"

4445
9
Jump to solution
06-08-2015 03:21 AM
KONPETROV
Frequent Contributor

Hi i have built a model in modelbuilder,  which with no reason creates File Geodatabases that cannot be deleted and appear an error like:

"Failed to connect to geodatabase,

This release of the Geodatabase is either invalid or

out of date [Invalid Geodatabase release]"

also in a folder when i am going to delete my shp i cannot due to an error like:

"Failed to delete selected objects.

Cannot acquire a schema lock because of an exisitng lock"

Why is that happening i cannot delete anything, i am not using geodatabases or an mxd, the process just creates shp in folders and that's all. Any help is much appreciated!

0 Kudos
1 Solution

Accepted Solutions
ScottMoyer
Deactivated User

KonPetrov

All of these things happened to me a few weeks ago. I think I have an idea of what's going on. As previously posted above, there is intermediate data created when a model is run from the model building window. Your model needs a place to put that data and the model is creating filegeodatabases to your default location, like C:\Users\username\Documents\ArcGIS\Default.gdb. If you can't delete the .gdbs from ArcCatalog you may want to try deleting in Windows Explorer. If you run a model from Toolbox, intermediate data is not left behind.

You may want to consider putting your model and Toolbox in a filegeodatabase (if it's your model) and create your data there.

Scott

View solution in original post

9 Replies
KONPETROV
Frequent Contributor

One solution for the second issue is to terminate from Task Manager all Gis applications (Cache, Online etc) and restart ArcMap, then you can delete your files. But with the Default Geodatabases,1,2,3,4,,5,6,7 it seems nothing can be done.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Hi Kon,

You could try this:

1. Go for a system reboot. Rename the "Default.gdb" to "Default_old.gdb". If successfully renamed, Start ArcMap and delete "Default_old.gdb".

2. If you can not rename it, try running CCleaner (You can also run it without going for the above step, if the "default.gdb" is located in temp directory.)



Think Location
0 Kudos
KONPETROV
Frequent Contributor

Poddar it did it but didn't seem to work, any other suggestion?

0 Kudos
SepheFox
Deactivated User

It's hard to diagnose the problem without seeing your model.

0 Kudos
KONPETROV
Frequent Contributor

Ms Fox i know, but it's too big to paste it. I just don't get it, i don't use geodatabase anywhere and i cannot delete them also.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

The big size of the geodatabases is due to the intermediate steps of the model-builder, which I can guess is pretty complex in your case. This will keep up coming as you run the model.



Think Location
ChrisDonohue__GISP
MVP Alum

If have a File Geodatabase or Personal Geodatabase, one way to resolve lock issues is to run the Compact (Data Management) tool.  While it normally is used to make geodatabases perform more effectively, it also explicitly releases locks as part of its functioning.  I've managed to solve several lock issues with this tool.

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

  • Run it from ArcCatalog
  • Make sure ArcGIS and all other GIS applications are closed.
  • Note the this is not the same as the Compact tool listed under Administrative tools.  The Administrative tools one has limited lock-clearing capability.
  • There could be a variety of issues causing the locks - this tool will solve existing locks, but not prevent new ones.  If you continue to get locks, more troubleshooting will be needed.

Chris Donohue, GISP

ScottMoyer
Deactivated User

KonPetrov

All of these things happened to me a few weeks ago. I think I have an idea of what's going on. As previously posted above, there is intermediate data created when a model is run from the model building window. Your model needs a place to put that data and the model is creating filegeodatabases to your default location, like C:\Users\username\Documents\ArcGIS\Default.gdb. If you can't delete the .gdbs from ArcCatalog you may want to try deleting in Windows Explorer. If you run a model from Toolbox, intermediate data is not left behind.

You may want to consider putting your model and Toolbox in a filegeodatabase (if it's your model) and create your data there.

Scott

KONPETROV
Frequent Contributor

Thank you for your answers they seem very logic, i will try them. I think also that intermediate data is the cause!

0 Kudos