Nate Cook
Nate Cook

Reputation: 8585

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?

Upvotes: 7

Views: 5167

Answers (4)

Mahmoud-Abdelslam
Mahmoud-Abdelslam

Reputation: 643

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://learn.microsoft.com/en-us/sql/relational-databases/sql-trace/filter-a-trace?view=sql-server-ver15

Upvotes: 2

Nate Cook
Nate Cook

Reputation: 8585

I successfully ran the Database Tuning Advisor on a bunch of Profiler trace data that excluded the "exec sp_reset_connection" and everything worked fine. So, as far as I can tell, there don't seem to be any negative side effects of excluding that data.

Upvotes: 0

Arnie
Arnie

Reputation: 181

In Column Filters set TextData Not Like exec sp_reset_connection

Upvotes: 18

Tohid
Tohid

Reputation: 6679

If you want to use ADO.NET Connection Pooling , the answer is: Absolutely not!

Upvotes: 0

Related Questions