The SQL trigger generates invalid T-SQL intermittently while renewing leases, causing false alerts in the monitoring system. The issue does not affect the functionality of the SQL Trigger.
SQL trigger raising Microsoft.Data.SqlClient.SqlException. Exception message: Incorrect syntax near \';\'
Below are the logs from the system:
Exception executing query. Message=Incorrect syntax near ';'.
Query=
DECLARE @result int;
EXEC @result = sp_getapplock @Resource = '_az_func_Trigger',
@LockMode = 'Exclusive',
@LockTimeout = 30000
IF @result < 0
BEGIN
RAISERROR('Unable to acquire exclusive lock on _az_func_Trigger. Result = %d', 16, 1, @result)
END;
UPDATE [az_func].[Leases_cacf2bceb5090ff5_1845581613]
SET _az_func_LeaseExpirationTime = DATEADD(second, 60, SYSDATETIME())
WHERE ;
The SQL trigger generates invalid T-SQL intermittently while renewing leases, causing false alerts in the monitoring system. The issue does not affect the functionality of the SQL Trigger. SQL trigger raising Microsoft.Data.SqlClient.SqlException. Exception message: Incorrect syntax near \';\'
Below are the logs from the system:
Exception executing query. Message=Incorrect syntax near ';'. Query= DECLARE @result int; EXEC @result = sp_getapplock @Resource = '_az_func_Trigger', @LockMode = 'Exclusive', @LockTimeout = 30000 IF @result < 0 BEGIN RAISERROR('Unable to acquire exclusive lock on _az_func_Trigger. Result = %d', 16, 1, @result) END;
UPDATE [az_func].[Leases_cacf2bceb5090ff5_1845581613] SET _az_func_LeaseExpirationTime = DATEADD(second, 60, SYSDATETIME()) WHERE ;
Refer Icm for more information.