That would be my initial guess.
Assuming PostgreSQL, see Lock Monitoring - PostgreSQL wiki
(There are other pages on that wiki with various queries for showing internal information. See Monitoring - PostgreSQL wiki)
If you’re not using PostgreSQL, I’m sure your database engine-of-choice has some similar features. I know that both Oracle and DB2 do. I would be willing to assume something like that would be available for both MSSQL and MySQL/MariaDB.