Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can "exec sp_reset_connection" be removed from SQL Server Profiler trace data before running the tuning advisor?

Based on information I have read about the "exec sp_reset_connection" which appears in SQL Server Profiler trace data when connection pooling exists, it seems safe--or logical, rather--to remove/exclude it from trace data to be considered by the Database Tuning Advisor. Any thoughts or objections?

like image 855
Nate Cook Avatar asked Aug 26 '10 14:08

Nate Cook


People also ask

What is exec Sp_reset_connection?

What is sp_reset_connection? A. The sp_reset_connection procedure runs when the OLE DB (or ODBC) connection pool grabs a connection that's been released to the pool but is still active on SQL Server. The SQL Server connection, or server process ID (SPID), might still have connection information from a previous user.

Can I delete SQL Server Profiler trace data File?

trc files are safe to delete. . trc files generated by SQL Server in process of saving events to a physical file without using the Profiler client tool. Server-side tracing is enabled and controlled by using SQL Server system-supplied stored procedures and functions.

How do you stop a trace in SQL Profiler?

To stop a trace Select a trace that is running. On the File menu, click Stop Trace.

Does running SQL Profiler affect performance?

Yes, SQL Server Profiler does affect performance. When you trace using the GUI, all events are synchronously processed and filtered, so factors such as server load, network latency, which events you collect, and even where the collected events are stored, all contribute to overhead.


2 Answers

In Column Filters set TextData Not Like exec sp_reset_connection

like image 119
Arnie Avatar answered Oct 05 '22 21:10

Arnie


Referring to @Arnie answer you should append % after the text, so you should filter with exec sp_reset_connection%.

If tracing events from the osql utility or the sqlcmd utility, always append % to filters on the TextData data column.

https://docs.microsoft.com/en-us/sql/relational-databases/sql-trace/filter-a-trace?view=sql-server-ver15

like image 29
Mahmoud-Abdelslam Avatar answered Oct 05 '22 22:10

Mahmoud-Abdelslam