sql_profiler
sql_profiler · Bounded query tracing and plan capture for performance diagnosis.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101957 | sql_profiler | sql_profiler | 4.2.0 | STAT | Proprietary | Unknown |
Usage
Sources:
sql_profiler captures bounded query traces for selected users and databases, including timing and explain data that can be loaded into a temporary table for analysis.
Enablement
Install SQL Profiler 4.2.0, preload the hyphenated library name, restart, and create the underscore-named extension:
The sql_profiler_admin role lets a non-superuser call profiler functions; the surrounding PEM integration has additional account requirements.
Capture and Read a Trace
sp_activate returns a trace ID. Use limits so a forgotten trace cannot grow without bound.
Loaded rows appear in _sp_tmp_tbl_sql_profiler; sp_traces_list lists completed traces and sp_cleanup removes trace data.
Operational Boundaries
Trace files can contain query text, parameters, plans, usernames, and database identifiers. Limit duration, minimum statement time, and maximum size; restrict the profiler role and filesystem; and clean up after analysis. Preloading adds hooks cluster-wide even when no trace is active, so validate overhead on representative workloads.