SQL Server Profiler deprecation - Replacement?
Asked Answered
C

1

26

I am developing ASP.NET and SQL Server applications, sometimes i am having trouble with a SQL Query, and i would like to see the SQL Servers "response" and not just the ASP.NET error message (Which is not always very helpfull)

The Profiler.exe tool in SQL Server is capable of this, but im reading on MSDN that Microsoft is planning to deprecate the tool.

We are announcing the deprecation of SQL Server Profiler for Database Engine Trace Capture and Trace Replay. These features will be supported in the next version of SQL Server, but will be removed in a later version. The specific version of SQL Server has not been determined. The Microsoft.SqlServer.Management.Trace namespace that contains the Microsoft SQL Server Trace and Replay objects will also be deprecated. Note that SQL Server Profiler for the Analysis Services workloads is not being deprecated, and will continue to be supported.

http://msdn.microsoft.com/en-us/library/ms181091.aspx

They don't mention what tool will replace profiler.exe

Does anyone know anything about that?

And are there any alternatives to profiler if i want to see (recent?) unsuccessful queries?

Carleencarlen answered 19/4, 2013 at 15:51 Comment(1)
It will be replaced by Extended EventsDustpan
D
34

While it is safe to continue using trace for the next few versions, Profiler is never the answer (some evidence here and also here). If you're going to use trace, use a server-side trace. Just don't write new code that will utilize trace and expect to live beyond a few versions.

The long-term answer is to use extended events. A blog you'll want to watch is SQL Server MVP Jonathan Kehayias of SQLskills.com. He has done a great job explaining extended events in laymen's terms and providing many, many ready-to-use examples. He also has great courses on PluralSight (which you can currently get for free through Visual Studio Dev Essentials):

Another person to learn a lot from is Erin Stellato. She has since moved on to Microsoft but her blog posts at SQLskills remain, and they are rich with info.

Doubleganger answered 19/4, 2013 at 15:55 Comment(6)
Just watched Jonathan Kehayias' Pluralsight course on Extended Events; it's fantastic.Nunciata
What's the name of Microsoft's GUI tool that allows starting, stopping, viewing, and saving of Extended EventsWelton
@IanBoyd The latest versions of Management Studio now include a Profiler-like UI called XE Profiler, which you can launch from Object Explorer.Doubleganger
@AaronBertrand, when you say "Profiler is never the answer", can that be taken as a general remark, or should it be regarded as being applicable to the context of the question? If it's meant as a general comment, then I'd have to disagree - SQL Profiler is often a quick way to find the cause of a problem. Perhaps you mean "don't use Profiler in production"? Some applications can tolerate SQL performance degradation, such as debugging on a developer's machine.Agnomen
@Agnomen You are free to disagree. Since Profiler is deprecated, and has the potential to take down a machine, I see no reason to continue avoiding Extended Events. Debugging on a developer's machine is not exactly a critical use case; if that's all you know how to do, how are you going to debug a production machine when you need to? Why not embrace the new way instead of grasping at excuses to hold onto the old way? Sounds like it's ok to not wear a seatbelt if you're only going to the grocery store.Doubleganger
Sorry, I misread your comment to begin with. I take your point.Agnomen

© 2022 - 2024 — McMap. All rights reserved.