If it helps anyone. Its a SQL 2019 specific issue. Was able to resolve this by the following. Also, listed in the article : https://support.kaspersky.com/ksc/12/en-US/92403.htm Run the following commands (if you chose a different name for the database, use that name instead of KAV): USE KAV GO ALTER DATABASE SCOPED CONFIGURATION SET TSQL_SCALAR_UDF_INLINING = OFF GO