In our application we sporadically experience a locking issue caused by the execution of an
We use SQL Server 2012. In our code and queries in our stored procedures we don't make use of
How can I trace who is the responsible of this call? At least how can I log when this call happens?
I read that it's also called by third parties, in this case how can I track who is responsible?
in our application we use Hibernate as ORM and c3p0 for connection pooling.
EDIT 2: we didn't succed in understanding when and by who the sp_tables was called but today we succeded in replicate the issue.
Seems that the sp_tables is called in responde to a failed delete tried on the schema.
The delete fails because there are other rows referencing the row that we try to delete, so we get an exception
SQLServerException: The DELETE statement conflicted with the REFERENCE constraint..
Is there evidence somewhere that this kind of errors triggers an sp_tables on the db?