FIREDAC ODBC SQL Server driver connection is busy causing another hstmt
This error is likely to occur because the database has a deadlock.
Workaround: Clean up the deadlock.
Attach the stored procedure that MSSQL cleans up the deadlock and execute the stored procedure when the deadlock occurs:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS on
GO
-- =============================================
--Author:<author,,name>
--Create Date: <create date,,>
--Description: Clear the deadlock
-- =============================================
CREATE PROCEDURE [dbo]. [Sp_clear_dead_lock]
As
BEGIN
Exec Dbo.sp_lock begin DECLARE @i int--define the thread ID to purge
declare @SQL nvarchar (3000);
Set @i = 0; while (@i<10000) Begin-Clears all occupied threads
Set @SQL =n ' kill ' +convert (varchar), @i
exec sp_executesql @SQL;
Set @[email protected]+1; End End
End
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS on
GO
FIREDAC ODBC SQL Server driver connection is busy causing another hstmt