Connect SQL Server for Performance Data

Visual Expert allows you to analyze the performance of the database code.
To do this you need to connect to your SQL Server database and enable performance statistics collection.

  1. Create a new Visual Expert project with SQL server code.
  2. Select your code directly from the database.
    If you need to export Performance Data in a file, please see this article.

Connect SQL Server for performance data

Which database will you analyze?

The choice of the database analyzed will determine from where you will collect performance statistics. Ideally, you would analyze a production database.

If you do not have access rights to the production database, a test or development database may be suitable, provided it is used enough to generate relevant performance statistics.

Start collecting Performance Statistics

  • Specify and test your database connection.
  • Start the code analysis.
  • Activate the code performance features.

When the analysis is completed, open the "Performance" tab in the Ribbon menu and click on [Activate].

Connect SQL Server for performance data

This will start generating automatically some performance statistics when your code is executed.

After clicking on "Activate":

  • Visual Expert will check it has the necessary access rights for your database
  • Attempt to create a performance event session in your SQL Server database
  • Display a message if an issue is detected.

This feature is available for:

  • SQL Server 2012 and higher.
  • Visual Expert projects reading DB code from a database, not from files.

You can also activate/deactivate the feature and check the performance event by opening "Performance Settings".

Connect SQL Server for performance data

From this time on, each time a new code analysis will start, Visual Expert will collect the latest performance statistics.

Analyze DB Performance

To get a combined analysis of the code and the database performance:

  • Wait for enough code to be executed to get relevant DB Performance statistics.
  • Run a project analysis.

You can stop collecting execution statistics anytime:
Simply open the performance tab and click on [Deactivate].

More from Improve DB Code Performance