ArcGIS file geodatabase - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: ArcGIS file geodatabase (/thread-320.html) |
ArcGIS file geodatabase - [email protected] - Oct-05-2016 Is there a Python command to remove locks from a ArcGIS file geodatabase? similar to the ...
When a user of ArcGIS Desktop (or runtime application) makes a connection to a file geodatabase, it creates a ***ComputerName_blabla.lock file. i have a process that runs nightly that deletes and replaces some tables, but inevitably i have 5-7 users that leave their application open thus preventing the process to run because there is a schema lock. Hope this is enough info RE: ArcGIS file geodatabase - micseydel - Oct-05-2016 I don't think we have any regulars here who use ArcGIS. What is the context in which you're asking? Are you asking about how to do something in Python in addition to other Python stuff you're doing with it? Are you using a module? Or do you want to start using Python? What are you doing now instead? (Unless you want to limit answerers to ArcGIS users, explaining how we can reproduce the problem will go a long way.) RE: ArcGIS file geodatabase - [email protected] - Oct-05-2016 the File Geodatabase is a ArcGIS term which uses a file folder structure to store geo enabled data. For one of my data maintenance nightly process i use python scripting to stop & block connections to my enterprise SQL database by using the commands... _________________________________________________________________________________ # Set the necessary product code import arcinfo # Import arcpy module import arcpy # Local variables: OwnerCurrentYr_sde = "Database Connections\\OwnerCurrentYr.sde" OwnerCurrentYr_sde__2_ = OwnerCurrentYr_sde OwnerCurrentYr_sde__3_ = "Database Connections\\OwnerCurrentYr.sde" OwnerCurrentYr_sde__7_ = OwnerCurrentYr_sde__3_ OwnerCurrentYr_sde__5_ = "Database Connections\\OwnerCurrentYr.sde" OwnerCurrentYr_sde__6_ = OwnerCurrentYr_sde__5_ # Stop new connections arcpy.AcceptConnections("Database Connections\\OwnerCurrentYr.sde", False) # Process: Disconnect all users arcpy.DisconnectUser("Database Connections\\OwnerCurrentYr.sde", "ALL") ...... i then do other tasks to compress database, rebuild indexes, Analyze datasets and then i allow connections to begin connecting to the SQL database. # Enable users to begin connections arcpy.AcceptConnections("Database Connections\\OwnerCurrentYr.sde", True) _______________________________________________________________________________ The above workflow works great for the SQL connections , but how do i do this for a file geodatabase? RE: ArcGIS file geodatabase - micseydel - Oct-05-2016 You might find a more satisfactory answer in an ArcGIS forum. RE: ArcGIS file geodatabase - [email protected] - Oct-05-2016 ok thx |