{"id":2070612,"date":"2023-09-20T05:53:22","date_gmt":"2023-09-20T12:53:22","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2070612"},"modified":"2025-09-26T07:44:49","modified_gmt":"2025-09-26T14:44:49","slug":"locked-by-another-application-using-arcpy-and-a-file-geodatabase","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase","title":{"rendered":"Locked by another application using ArcPy and a File geodatabase"},"author":313872,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23851],"tags":[27481,770312,771742],"industry":[],"product":[36561],"class_list":["post-2070612","blog","type-blog","status-publish","format-standard","hentry","category-data-management","tag-automation","tag-file-geodatabase","tag-locked","product-arcgis-pro"],"acf":{"authors":[{"ID":313872,"user_firstname":"Mike","user_lastname":"Jensen","nickname":"Mike Jensen","user_nicename":"mike-jensen","display_name":"Mike Jensen","user_email":"mjensen@esri.com","user_url":"","user_registered":"2022-06-27 18:39:54","user_description":"Mike loves to enhance the customer experience when working with Esri software, and has many opportunities to continue this passion as a product engineer on the Geodatabase Team. Outside of his GIS profession, he loves to tinker with tech gadgets, beat on the drums, bake pies and brownies, tell and snicker at dad jokes, and enjoy quiet time in the country with family and friends.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/07\/Mike_Green_Santa_Nov_2016-204x200.jpg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"short_description":"Data management tips and tricks for managing locks in a temporary file geodatabase with automated workflows.","flexible_content":[{"acf_fc_layout":"content","content":"<p>Just about everyone who has used geodatabases has encountered a locking issue in their GIS workflows. Each geodatabase has its own locking processes. We often forget when encountering a lock, such as locked by another application, that locks have an important role.<\/p>\n<p>This blog focuses on this lock with an automated workflow using ArcPy with a temporary file geodatabase. Using sample scripts directly from this blog, you will experience the error in your own integrated development environment (<a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/arcpy\/get-started\/installing-python-for-arcgis-pro.htm#:~:text=current%20conda%20environment.-,Python%20IDEs,-Most%20modern%20Python\">IDE<\/a>) application. We\u2019ll then show you how to easily resolve it. Lastly, you can explore how mobile, file, and enterprise geodatabase locks compare to one another.<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Scenario<\/h2>\n<p>In this example, the code creates a temporary geodatabase, adds schema and data, and then deletes the geodatabase. All appears well until your code attempts to delete the geodatabase, and instead returns the following error: <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/tool-errors-and-warnings\/001001-010000\/tool-errors-and-warnings-00601-00625-000601.htm\">Error 000601: Cannot delete temp.gdb. May be locked by another application<\/a>.<\/p>\n<p>In addition, we wrote the code so that a second run will only attempt to delete the temporary geodatabase. You run the code again, and this time it deletes the geodatabase without error?<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2072952,"id":2072952,"title":"FirstRunError_SecondRunNoError_PyCharm2","filename":"FirstRunError_SecondRunNoError_PyCharm2.png","filesize":83400,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\/firstrunerror_secondrunnoerror_pycharm2","alt":"Illustration of code shows the error of locked by another application on first run and no error on second execution.","author":"313872","description":"","caption":"","name":"firstrunerror_secondrunnoerror_pycharm2","status":"inherit","uploaded_to":2070612,"date":"2023-09-11 19:00:25","modified":"2023-09-20 16:14:55","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1056,"height":576,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2.png","medium-width":464,"medium-height":253,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2.png","medium_large-width":768,"medium_large-height":419,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2.png","large-width":1056,"large-height":576,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2.png","1536x1536-width":1056,"1536x1536-height":576,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2.png","2048x2048-width":1056,"2048x2048-height":576,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2-826x451.png","card_image-width":826,"card_image-height":451,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/FirstRunError_SecondRunNoError_PyCharm2.png","wide_image-width":1056,"wide_image-height":576}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Unlike similar workflows that generate this error (such as, other users accessing the data), this scenario is using a temporary geodatabase. No other users are connected to it. Why did the error happen in the first place? How do we write the code to prevent this peculiar locking error from occurring when deleting the geodatabase?<\/p>\n<p>Ironically, I recently ran into the same problem after getting deep into a sample script tool I was designing. I got so deep into writing what the code needed to do, that I failed to consider best practices. \u00a0Implementing what I have learned in the past would have alleviated this exact issue. These best practices apply to any type of programming. Fortunately, my oversight could benefit others, especially beginner ArcPy or ArcGIS API for Python users. Resources such as our <a href=\"https:\/\/community.esri.com\/t5\/forums\/searchpage\/tab\/message?q=arcpy%20Error%20000601&amp;collapse_discussion=true\">Esri Community<\/a> site and <a href=\"https:\/\/pro.arcgis.com\/de\/pro-app\/latest\/arcpy\/get-started\/data-access-using-cursors.htm#:~:text=Cursors%20support%20with%20statements%20to%20reset%20iteration%20and%20aid%20in%20removal%20of%20locks.%20However%2C%20using%20a%20del%20statement%20to%20delete%20the%20object%20or%20wrapping%20the%20cursor%20in%20a%20function%20to%20have%20the%20cursor%20object%20go%20out%20of%20scope%20should%20be%20considered%20to%20guard%20against%20all%20locking%20cases.\">online help documentation<\/a> provide brief information on how to resolve this challenge. However, I wanted to provide a working example to use in your own environment to illustrate and resolve the issue.<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Sample code<\/h2>\n<p>Copy and paste the code below into your <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/arcpy\/get-started\/installing-python-for-arcgis-pro.htm#:~:text=current%20conda%20environment.-,Python%20IDEs,-Most%20modern%20Python\">IDE<\/a> of choice (Pycharm, IDLE, Spyder and so on). The only line of code you need to alter is the out_folder_path variable. This script does the following:<\/p>\n<ol>\n<li>It creates a file geodatabase called TestDelete.gdb in the designated output directory.<\/li>\n<li>It populates the geodatabase with a feature class.<\/li>\n<li>Adds a text field and populates it with a list of characters (a, b, c, d, and e) for each row.<\/li>\n<li>If a geodatabase path exists, it attempts to delete it.<\/li>\n<\/ol>\n"},{"acf_fc_layout":"sidebar","content":"<p>Click anywhere in the code window, then use the \u2b06\ufe0f and down \u2b07\ufe0f arrows on the keyboard to scroll through the code.<\/p>\n","image_reference":false,"layout":"code_snippet","image_reference_figure":"","snippet":"# Import system modules\r\nimport arcpy\r\nimport os\r\n\r\n# Set local variables\r\nout_folder_path = r\"C:\\Testing\\Testing\"\r\nout_name = \"TestDelete.gdb\"\r\ngdbPath = os.path.join(out_folder_path,out_name)\r\nfc_name = \"TestFC\"\r\n\r\n# CreateFileGDB if it doesn't already exist.\r\n# Add a new text field\r\n# Populate the text field with each text string in a list (total of 5 rows)\r\nif not os.path.exists(gdbPath):\r\n    myGDB = arcpy.management.CreateFileGDB(out_folder_path, out_name)\r\n    fc = arcpy.management.CreateFeatureclass(gdbPath, fc_name, geometry_type='POLYGON')\r\n    arcpy.management.AddField(fc,'NAME','TEXT')\r\n    attList = ['a','b','c','d','e']\r\n    with arcpy.da.InsertCursor(fc, ['NAME']) as TestCursor:\r\n        for att in attList:\r\n            TestCursor.insertRow(att)\r\nelse:\r\n    myGDB = gdbPath\r\n\r\nif gdbPath:\r\n    arcpy.management.Delete(myGDB)\r\n","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>This code will generate the above locking error the first time it runs.<\/p>\n<p>Run it again, and it now properly deletes the geodatabase.<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Solution<\/h2>\n<p>How do you write code that properly deletes the temporary file geodatabase without the error indicating that it may be locked by another application? Using Python\u2019s del keyword, you release objects that may cause a locking error to occur. In this example, the code used an Insert Cursor to add data to a new field. Deleting the cursor object releases the lock and the code now deletes the temporary geodatabase without error. Delete the previous script and copy and paste this code to see the difference.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p>Click anywhere in the code window, then use the \u2b06\ufe0f and down \u2b07\ufe0f arrows on the keyboard to scroll through the code.<\/p>\n","image_reference":false,"layout":"code_snippet","image_reference_figure":"","snippet":"# Import system modules\r\nimport arcpy\r\nimport os\r\n\r\n# Set local variables\r\nout_folder_path = r\"C:\\Testing\\Testing\"\r\nout_name = \"TestDelete.gdb\"\r\ngdbPath = os.path.join(out_folder_path,out_name)\r\nfc_name = \"TestFC\"\r\n\r\n# CreateFileGDB if it doesn't already exist.\r\n# Add a new text field\r\n# Populate the text field with each text string in a list (total of 5 rows)\r\nif not os.path.exists(gdbPath):\r\n    myGDB = arcpy.management.CreateFileGDB(out_folder_path, out_name)\r\n    fc = arcpy.management.CreateFeatureclass(gdbPath, fc_name, geometry_type='POLYGON')\r\n    arcpy.management.AddField(fc,'NAME','TEXT')\r\n    attList = ['a','b','c','d','e']\r\n    with arcpy.da.InsertCursor(fc, ['NAME']) as TestCursor:\r\n        for att in attList:\r\n            TestCursor.insertRow(att)\r\nelse:\r\n    myGDB = gdbPath\r\n\r\n#Add this line to remove locking error\r\n#The del keyword is the \u2018key\u2019 solution.\r\ndel TestCursor \r\n\r\narcpy.management.Delete(myGDB)","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>Adding del TestCursor allows us to remove the if statement and directly delete the temporary geodatabase.<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Takeaways and considerations<\/h2>\n<p>As you can see, when working with a file geodatabase as a temporary workspace, the key is to delete unreferenced objects. Once deleted, the temporary file geodatabase is also removed without error. For example, in the sample script tool that I built earlier, I deleted objects that accessed feature classes, tables and cursors that were no longer needed in the code. These sample scripts illustrate that without using the del keyword, the code would error with the locked by another application message. With proper code cleanup, the temporary geodatabase removal works as expected.<\/p>\n<p>As mentioned earlier, each geodatabase handles locking in different ways. If this workflow was using a mobile geodatabase, we wouldn\u2019t get the error at all, with or without the del keyword. You can try it by changing these two lines of the first script to create a mobile geodatabase.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"","image_reference":false,"layout":"code_snippet","image_reference_figure":"","snippet":"out_name = \"TestDelete.geodatabase\"\r\nmyGDB = arcpy.management.CreateMobileGDB(out_folder_path, out_name)\r\n","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>Why does the mobile geodatabase delete without error, whereas the file geodatabase returns the error? It\u2019s all about how they handle locks. To learn more about how each geodatabase handles locking, see the help documentation for <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/data\/geodatabases\/manage-mobile-gdb\/mobile-geodatabase-and-locking.htm\">mobile geodatabases<\/a>, <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/data\/geodatabases\/manage-file-gdb\/file-geodatabases-and-locking.htm\">file geodatabases<\/a> and <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/data\/geodatabases\/overview\/enterprise-geodatabase-locks.htm\">enterprise geodatabases<\/a>.<\/p>\n<p>As for enterprise geodatabases, it is unlikely that these would be used as a temporary workspace. The complexity of implementing them on a supported database management system (DBMS) is quite involved for this type of workflow.<\/p>\n<p>In the end, it is recommended that you clean up your code by deleting objects that are no longer applicable.<\/p>\n<p>This information can help if you encounter the locked by another application error when automating workflows with temporary file geodatabases. Here\u2019s to one less scripting headache. ?<\/p>\n"},{"acf_fc_layout":"content","content":"<p>All Adobe Stock images are \u00a9 2023\u00a0Adobe Stock. All rights reserved.<\/p>\n"}],"related_articles":"","card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/GoldenKeyinPuzzle826x465.jpg","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/GoldenKeyinPuzzle1920x1080.jpg","show_article_image":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Locked by another application using ArcPy and a File geodatabase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Locked by another application using ArcPy and a File geodatabase\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-26T14:44:49+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\"},\"author\":{\"name\":\"Mike Jensen\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5b3542abdb02f708dfde873f92ccc7af\"},\"headline\":\"Locked by another application using ArcPy and a File geodatabase\",\"datePublished\":\"2023-09-20T12:53:22+00:00\",\"dateModified\":\"2025-09-26T14:44:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\"},\"wordCount\":10,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"Automation\",\"file geodatabase\",\"locked\"],\"articleSection\":[\"Data Management\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\",\"name\":\"Locked by another application using ArcPy and a File geodatabase\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2023-09-20T12:53:22+00:00\",\"dateModified\":\"2025-09-26T14:44:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Locked by another application using ArcPy and a File geodatabase\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5b3542abdb02f708dfde873f92ccc7af\",\"name\":\"Mike Jensen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/07\/Mike_Green_Santa_Nov_2016-204x200.jpg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/07\/Mike_Green_Santa_Nov_2016-204x200.jpg\",\"caption\":\"Mike Jensen\"},\"description\":\"Mike loves to enhance the customer experience when working with Esri software, and has many opportunities to continue this passion as a product engineer on the Geodatabase Team. Outside of his GIS profession, he loves to tinker with tech gadgets, beat on the drums, bake pies and brownies, tell and snicker at dad jokes, and enjoy quiet time in the country with family and friends.\",\"jobTitle\":\"Product Engineer - Geodatabase Team\",\"worksFor\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/mike-jensen\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Locked by another application using ArcPy and a File geodatabase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase","og_locale":"en_US","og_type":"article","og_title":"Locked by another application using ArcPy and a File geodatabase","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2025-09-26T14:44:49+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase"},"author":{"name":"Mike Jensen","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5b3542abdb02f708dfde873f92ccc7af"},"headline":"Locked by another application using ArcPy and a File geodatabase","datePublished":"2023-09-20T12:53:22+00:00","dateModified":"2025-09-26T14:44:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase"},"wordCount":10,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["Automation","file geodatabase","locked"],"articleSection":["Data Management"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase","name":"Locked by another application using ArcPy and a File geodatabase","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2023-09-20T12:53:22+00:00","dateModified":"2025-09-26T14:44:49+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/locked-by-another-application-using-arcpy-and-a-file-geodatabase#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Locked by another application using ArcPy and a File geodatabase"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5b3542abdb02f708dfde873f92ccc7af","name":"Mike Jensen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/07\/Mike_Green_Santa_Nov_2016-204x200.jpg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/07\/Mike_Green_Santa_Nov_2016-204x200.jpg","caption":"Mike Jensen"},"description":"Mike loves to enhance the customer experience when working with Esri software, and has many opportunities to continue this passion as a product engineer on the Geodatabase Team. Outside of his GIS profession, he loves to tinker with tech gadgets, beat on the drums, bake pies and brownies, tell and snicker at dad jokes, and enjoy quiet time in the country with family and friends.","jobTitle":"Product Engineer - Geodatabase Team","worksFor":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/mike-jensen"}]}},"text_date":"September 20, 2023","author_name":"Mike Jensen","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/mike-jensen","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/09\/GoldenKeyinPuzzle1920x1080.jpg","primary_product":"ArcGIS Pro","tag_data":[{"term_id":27481,"name":"Automation","slug":"automation","term_group":0,"term_taxonomy_id":27481,"taxonomy":"post_tag","description":"","parent":0,"count":38,"filter":"raw"},{"term_id":770312,"name":"file geodatabase","slug":"file-geodatabase","term_group":0,"term_taxonomy_id":770312,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":771742,"name":"locked","slug":"locked","term_group":0,"term_taxonomy_id":771742,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"category_data":[{"term_id":23851,"name":"Data Management","slug":"data-management","term_group":0,"term_taxonomy_id":23851,"taxonomy":"category","description":"","parent":0,"count":920,"filter":"raw"}],"product_data":[{"term_id":36561,"name":"ArcGIS Pro","slug":"arcgis-pro","term_group":0,"term_taxonomy_id":36561,"taxonomy":"product","description":"","parent":0,"count":2035,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-pro","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2070612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/313872"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=2070612"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2070612\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=2070612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=2070612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=2070612"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=2070612"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=2070612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}