-
Notifications
You must be signed in to change notification settings - Fork 101
How to use SQL Nexus
JosephPilov-MSFT edited this page May 25, 2023
·
6 revisions
- Install SQL Nexus and RML Utilities
- Collect perf data from your SQL Server 2005/2008/2008R2/2012/2014/2016/2017/2019/2022 instance using SQL LogScout or PSSDIAG.
- Import and analyze the data using SQL Nexus
- Get the latest version for SQL Nexus on https://github.com/microsoft/SqlNexus/releases
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
- Launch sqlnexus.exe and log on to the non-production SQL Server instance where you installed SQL Nexus.
- Click on Import; in the left pane of the main SQL Nexus window.
- Provide the file directory where you stored the data collected by SQLDiag. Note: you should provide a directory path, not a file name.
- Press Import button
- 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
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).
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
Look at the training section of pssdiag.