Home

Track lack of SQL Server session configuration

Rule description

  • Track lack of SQL Server session configuration

 

Non-compliant Code Example

Create Procedure GetPersonCount
As
BEGIN  --Non compliant code 
    SET NOCOUNT ON;  

    SELECT TOP(5) LastName  
    FROM Person.Person  
    WHERE LastName LIKE 'PR%';  
END;
GO
CREATE PROCEDURE GetTotalNumberOfCustomer
AS
BEGIN   --Non compliant code 
    SET ARITHABORT OFF; 

    SELECT COUNT(*) FROM [Data].Customer;
END;
GO
Visual Expert 2020
 VETSQLRULE68