Skip to content

How to use SQL Nexus

JosephPilov-MSFT edited this page Apr 27, 2026 · 10 revisions

Steps 1-2-3

  1. Install SQL Nexus and RML Utilities
  2. Collect perf data from your SQL Server instance using SQL LogScout.
  3. Import and analyze the data using SQL Nexus

Download and Installation

Collecting data

In order to use SQL Nexus, you will first need to collect diagnostic data. You can use either of the following tools:

  • SQL LogScout (recommended) – a modern, lightweight data collection tool for SQL Server on Windows and Linux

SQL Nexus supports importing data from SQL Server 2012 and later, including SQL Server on Linux.

Importing data and Analyzing

  1. Launch sqlnexus.exe and log on to a non-production SQL Server instance where you have SQL Nexus installed.
  2. Click on Import in the left pane of the main SQL Nexus window.
  3. Provide the folder path where you stored the collected data. Note: provide a directory path, not a file name. 1.SQL Nexus will automatically detect and list the files to import, including:
    • Rowset output files (.out text files from SQLDiag/SQL LogScout)
    • SQL Trace files (.trc) — processed via RML Utilities/ReadTrace
    • PSSDIAG XEL files (*pssdiag*.xel) — processed via RML Utilities/ReadTrace
    • SQL LogScout XEL files (*LogScout*.xel, e.g. xevent_LogScout_target*.xel, SQLLogScout_AlwaysOn_Data_Movement*.xel) — processed via RML Utilities/ReadTrace
    • SQLDiag XEL files (*_SQLDIAG*.xel) — auto-generated by SQL Server on Failover Cluster Instances (FCI) and Always On Availability Groups via sp_server_diagnostics
    • Always On Health XEL files (*AlwaysOn_health*.xel) — built-in SQL Server Always On health session
    • System Health XEL files (*system_health*.xel) — built-in SQL Server system health session
    • Performance Monitor logs (.blg) via Perfmon Importer
    • SQL Server ERRORLOG files (*_ERRORLOG*, e.g. SERVERNAME_ERRORLOG, SERVERNAME_ERRORLOG.1) via ERRORLOG Importer
    • Linux performance data (IO stats, CPU, memory, networking, process
  4. Press the Import button.
  5. Once the import is finished, click on the reports in the left pane. 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 data using the local instance and Windows authentication. The default log location is %temp%.

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

B. Import data using a named SQL Server instance, drop the existing sqlnexus database, write the log to a custom folder, and run quietly without interaction.

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

Tutorials

Look at SQL LogScout.

Clone this wiki locally