Skip to content

Failed to renew leases due to exception: Exception message: Incorrect syntax near ';'. #1108

@MaddyDev

Description

@MaddyDev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions