Tuesday, May 12, 2026

SQL 2025 master class LAB 18 profiler


open smss

connect to smsqlserver

create new query with following data and run 

 USE [AdventureWorks2025]

EXECUTE dbo.uspGetEmployeeManagers 1

GO

SELECT
*

FROM Production.Product ;

GO

SELECT
*

FROM Production.Product

WHERE [ReorderPoint] > 500

OR [ReorderPoint] < 1000 ;

GO

SELECT
*

FROM Production.ProductInventory ;

GO

SELECT
*

FROM Sales.SalesOrderDetail ;

GO

SELECT *FROM Production.TransactionHistory ; 

GO

 

Microsoft sql server tools 22 

Sql profiler 22 

File > New Trance > connect to database engine windows instance

Name tracelab

 

start performance  

Data Collector Serts

System Performance

Performance counters

start 

start trace

run query

stop trace

save as trace file

stop data collector set

save as log 

open as trace file

open data collection log 

 %systemdrive%\perflogs\System\Performance

 http://assets.red-gate.com/community/books/mastering-profiler-ebook.pdf

--with thanks and acknowledgement to

http://assets.red-gate.com/community/books/mastering-profiler-ebook.pdf

 --housekeeping