Select to view content in your preferred language

lock request conflicts with an established lock [STATE_ID = 417401

2174
3
05-13-2023 12:29 PM
Labels (3)
JoseSanchez
Frequent Contributor

Hello everyone,

When an editor was working in ArcMap, the connection was lost to the geodatabase in an editing version session, The version shows now as locked in Sde Sql server 2019 .

We disconnected all processes from geodatabase and tried to delete the version in ArcCatalog with the admin account, but it does not work. 

Message:

Lock request conflicts with an established lock [...][STATE_ID = 417401]. What else ca we do?

Thanks

3 Replies
MarceloMarques
Esri Regular Contributor

Hello,  what you mean by "Admin Account" ??? you mean that you disconnected all users / services connections from the geodatabase and connected in ArcCatalog with the "sde" user and tried to delete the version and you still could not delete the version. In that case then open the "locks" tab and delete all the locks, close ArcCatalog then open ArcCatalog connect as "sde" user and try to delete the version, open the "connections" tab and always make sure only the "sde" user is connected to the geodatabase.
Manage geodatabase locks—ArcMap | Documentation (arcgis.com)

TIP - how to truncate the sde.gdb_locks table manually

1. ask all users to close ArcMap/ArcCatalog

2. this disconnects all users connections

3. stop all ArcGIS Server Services

4. ArcCatalog connect as the "sde" user and check if all connections are closed, the SQL Server Administrator can also check this in SQL Server Management Studio (SSMS).

5. close ArcCatalog

6. In SQL Server Management Studio (SSMS) truncate the sde.gdb_locks table.

use <database_name>

go

truncate table sde.gdb_locks

go

7. this cleans all the locks 

I hope this helps.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
RudraniChakraborty
Occasional Contributor

Hello @JoseSanchez 

In addition to the above suggestion we can run queries to check orphaned locks and delete them if necessary:

select * from sde.SDE_table_locks                         
where sde_id not in (select sde_id from sde.SDE_process_information)
order by sde_id                                         
                                                       
select * from sde.SDE_layer_locks                       
where sde_id not in (select sde_id from sde.SDE_process_information)
order by sde_id                                         
                                                        
select * from sde.SDE_object_locks                      
where sde_id not in (select sde_id from sde.SDE_process_information)
order by sde_id                                         

select * from sde.SDE_state_locks                       
where sde_id not in (select sde_id from sde.SDE_process_information)
order by sde_id

JoseSanchez
Frequent Contributor
Thank you @MarceloMarques and  @RudraniChakraborty,
 
We opened also a ticket with Esri to get their assistance.
 
Regards
 
 
0 Kudos