SQL Performance Counters


On the Performance Counters view you can specify database servers that you want to monitor during the test run.



Click the Add button under the SQL Performance pane to add a new database server. You will see the "SQL Server settings" dialog where you can specify the settings of the new server.



DSN: Here you should specify a Data Source Name (DSN) - a name used for establishing a connection with a database server via ODBC.

Note that a specified DSN should be added to the list of ODBC User Data Sources beforehand. For this, you should enter the Windows Start menu, select Control Panel | Administrative Tools | Data Sources (ODBC) and add a desired User Data Source. Then you will be able to use that data source in the DSN field of the Performance Counters view.

User, Password: Specify a username and password for authorization (if required).

Test ODBC connection: Database performance parameters are obtained from the database itself through the ODBC interface. Click this button to test the ODBC connection. In case of successful test you will see such message:



Mode: Select MSSQL, Oracle or MySQL depending on the type of your database.

Log enable: This option allows generating a log file which contains information about the work of performance counters. It is saved on the computer running WAPT Pro in the "Users\[username]\Documents\My WAPT Pro\Logs\[scenario name]\SQL Counter Logs" folder.

Basic SQL performance counters are predefined in the program. Check the necessary counters in the list to use them during the test.

You can test the work of any performance counter: select a counter in the list and click the Test button below the list. If the code of selected counter is compiled without errors, you will see a message that everything is "OK":

Adding a new performance counter

You can add your own specific counters for any additional data available in your database through ODBC. Click the Add button below the list of performance counters to add a new counter. In the displayed dialog, enter a name, value of polling interval (an interval between probes) and the JavaScript code that will be executed:



All SQL counters are based on the JavaScript functions. Here you can see the description of functions that can be used in the JavaScript code. Using these functions you can perform any required calculations, e.g. take the previous value of a counter, calculate the average of several counter's values, add/subtract values, etc.

You can modify existing counters as well. Double-click a counter in the list, or select it and click the Edit button. This button opens a dialog with the properties of selected counter:



Here you can change counter's name, value of polling interval and JavaScript code.

To delete some performance counter, select it in the list and click the Delete button below the list.

Importing performance counters from another scenario

WAPT Pro stores performance counters in scenario file (scenario-name.wps). You can import performance counters from another scenario (created in WAPT Pro 3.5). Click the Import button and select the necessary scenario file. Imported counters will appear in the list of performance counters of current scenario.

Performance counters in reports and graphs

Values of SQL performance counters are included in generated reports and graphs, so you can see how these parameters were changing during the test. For details see the Performance Data report, HTML Report and Summary Graphs (SQL Performance tab).

Besides, if you check the Save test results option in Log and Report Settings, then values of SQL performance counters will be written to a special CSV-report stored together with all other CSV-reports. The name of this report looks as follows:

"ScenarioName-SQLCounters on ComputerName.csv"

A folder for storage of CSV-reports is specified in the General Settings (Save CSV results to option).

Troubleshooting

Usually MSSQL server statistics is updated automatically and you can monitor the performance of MSSQL server. However, if something goes wrong (e.g. you see that received values are not updated, or they are equal to 0, or you do not receive any values at all), you will need to update the server statistics. This can be done automatically if you create a job in Microsoft SQL Server Management Studio and define the necessary scheduling options. Note that this procedure is required only in case you receive wrong results using the default settings. In the majority of cases you will not face any problems and will not need to create any special jobs.

Next page