Share via


How to: Enable and Disable Static Analysis for Database Code

To help developers catch design and performance issues, you can configure your database project so that static code analysis is automatically run after any team member successfully builds the project. In addition, you can also run the analysis manually. For more information, see Improving Database Code with Static Analysis.

To enable or disable code analysis for a database project

  1. Open the solution that contains your database project.

  2. In Solution Explorer, click the database project for which you want to enable or disable static code analysis.

  3. On the Data menu, point to Static Code Analysis, and click Configure.

    The project properties window opens, displaying the Code Analysis tab.

  4. In the Configuration list, click the configuration for which you want to enable or disable static code analysis when the project is built.

  5. If you want static code analysis to run after every successful build of the database project, select the Enable Code Analysis check box. Otherwise, clear the check box.

  6. On the File menu, click Save Selected Items or Save All.

See Also

Tasks

How to: Enable and Disable Specific Rules for Static Analysis of Database Code

How to: Analyze Transact-SQL Code to Find Defects

Walkthrough: Analyze Transact-SQL Code for an Existing Database

Concepts

Improving Database Code with Static Analysis

Terminology Overview of Database Edition

Other Resources

Detecting and Correcting Managed Code Defects