Select to view content in your preferred language

Deleting File Geodatabase with locks

9738
11
06-13-2012 08:04 PM
DeanCarstens
Deactivated User
Hi,

I've come across many posts about lock files for both personal and file geodatabases, but I guess my situation is slightly different in that I need to delete a file geodatabase so I can replace it with a new one.  I run a maintenance script at 3am on Sunday mornings, so no users should be using this then (unless they're super-dedicated to their work), but you know how people always leave their computers on overnight.  As these databases are really just there to be read, not edited, I can delete them.  The problem is that the locks prevent me from doing it and the script then has to wait until the next week to update the database, if nobody has it locked then.

My question is whether there is a way to simply delete the entire database, regardless of whether it has a lock.  I'm assuming Esri functions won't do this, but is there a way I can just add some sort of Python subprocess to force the delete or maybe a way I can kick that user off the license manager?  I'm aware that we can use the lmremove function, but when we move from 9.3.1 to 10.1 at the end of the year, we won't be able to that anymore and also, I can't access the user's processes remotely to kill the active license.

I'm really not trying to edit or save the database in any way.  I just want to strong-arm the delete.

Cheers

Dean
11 Replies
HeatherSavage
Regular Contributor

I have a geodatabase that becomes locked when users forget to close ArcMap at night.  When the automated nightly data update from our server occurs, the locks cause the geodatabase to become corrupted and inaccessible by other users. Remotely closing the geodatabase seems like a possible solution.  Have you noticed any users having problems running Arc after you use psfile.exe to close the geodatabase?

0 Kudos
DougGreen
Frequent Contributor

We have not seen any trouble with this. No corruption. And this GDB is used to publish layers to ArcGIS Server. It has worked flawlessly since implemented.

Just noticed you asked if there were any users who had issues. There are no MXD's pointed to this data other than those used for creating the map services. Therefore, the locks are created by ArcGIS Server. In our case, the server refreshes bad connections every 30 min so we don't have a problem. I don't know what it would look like to a user if they had a map open and you ran this.

0 Kudos