Skip to content

How to use SQL Nexus

JosephPilov-MSFT edited this page May 25, 2023 · 6 revisions

Steps 1-2-3

  1. Install SQL Nexus and RML Utilities
  2. Collect perf data from your SQL Server 2005/2008/2008R2/2012/2014/2016/2017/2019/2022 instance using SQL LogScout or PSSDIAG.
  3. Import and analyze the data using SQL Nexus

Installation

Collecting data

In order to use SQL Nexus, first you will need data collected. You need to use PSSDIAG manager or SQL LogScout to collect data for SQL Nexus to consume

Importing data and Analyzing

  1. Launch sqlnexus.exe and log on to the non-production SQL Server instance where you installed SQL Nexus.
  2. Click on Import; in the left pane of the main SQL Nexus window.
  3. Provide the file directory where you stored the data collected by SQLDiag. Note: you should provide a directory path, not a file name.
  4. Press Import button
  5. Once the import is finished, you can click on various reports from the left pane of SQL Nexus tool. Start with the "Bottleneck Analysis" report to determine where most query execution time was spent

Using SQL Nexus from Command Prompt to Analyze data

You can use SQLNexus as a command line utility. You can get the following help menu via sqlnexus.exe /? or sqlnexus --help

sqlnexus.exe [ [ /S [ /E | /Uuser /Ppwd ] [/D"database"] ] | [/C"connstr"] ] [/Iinputpath] [/Ooutputpath] [/Rreport] [/X] [/Q] [/N]

/S"server"      Specifies a SQL Server name to connect to.
/D"database"    Database to connect to
/E              Log in to SQL using Windows/integrated security
/Uuser          Specifies a SQL (non-Windows) login name
/Ppassword      Specifies the password for a SQL (non-Windows) login
/C"connstring"  Specifies the SqlClient ConnectionString to use (can be used instead of /S /E).
/I"path"        Import SQL diagnostic data from this path
/R"report"      Specifies a report file name to run.
/O"path"        Specifies an export path for reports executed via /R. Also this is where the sqlnexus.000.log would get created
/X              Exit after importing (/I) or exporting (/O) the specified report (/R)
/Vparam=value   Specify the value of a form parameter
/Q              Quiet Mode - minimize windows in console mode
/N              Create a new SQLNexus database before importing (drop existing).

Examples:

A. Import the data using local instance and Windows authentication. The default log location is %temp% folder.

sqlnexus.exe /S"." /E /D"sqlnexus" /I"C:\data_collection\output"

B. Import the data using a SQL Server named instance, drop the existing "sqlnexus" database, and generate the sqlnexus.000.log in a non-default folder c:\temp and minimized window without using interaction.

sqlnexus.exe /S"sqlmachine\sql2017" /E /D"sqlnexus" /I"C:\data_collection\output" /N /O"c:\temp\" /Q

Tutorials

Look at the training section of pssdiag.