sql-server-profiler

SQL Server Profiler deprecation - Replacement?

冷暖自知 提交于 2019-12-02 21:29:25
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

How do you access the Context_Info() variable in SQL2005 Profiler?

我与影子孤独终老i 提交于 2019-12-02 12:48:36
问题 I am using the Context_Info() variable to keep track of the user that is executing a stored procedure and free-form sql. When troubleshooting issues on this server everyone session comes through. I would like to be able to bring in the value of the context_info() variable and filter based on it. 回答1: You can use the UserConfigurable Events along with sp_trace_generateevent (EventId's 82-91) when setting the context_info() to output the values to the trace. Your option is to either do that, or

How to trace with SQL Server profiler [closed]

不想你离开。 提交于 2019-12-02 10:08:09
i am trying my hands on SQL server profiler i would like to know how to trace using SQL server profiler. any link with apprpiate GUI will be more then helpfull. Steps: SQL Server Management Studio Go to MS SQL Server Management Studio and select the database you want to trace in the Profiler. Right click the database and select New Query. In the query window type select db_id() then execute... and remember the number generated SQL Server Profiler File - New Trace then choose server, Authentication Mode provide UserName and Password and click connect. In the trace properties go to events

OrderBy is not translated into SQL when passing a selector function

邮差的信 提交于 2019-12-02 01:36:20
问题 When I execute: var t = db.Table1.OrderBy(x => x.Name).ToList(); In SQL profiler, this is the translated SQL: SELECT [Extent1].[ID] AS [ID], [Extent1].[Name] AS [Name] FROM [dbo].[Table1] AS [Extent1] ORDER BY [Extent1].[Name] ASC Which is correct. However, if I pass a selector function to OrderBy: Func<Table1, string> f = x => x.Name; var t = db.Table1.OrderBy(f).ToList(); The translated SQL is: SELECT [Extent1].[ID] AS [ID], [Extent1].[Name] AS [Name] FROM [dbo].[Table1] AS [Extent1] The

Unit of measurement for Duration column in SQL Profiler

一个人想着一个人 提交于 2019-12-01 02:04:27
What is the unit of the Duration column in SQL Profiler? I thought it was milliseconds but in the following Profiler row I found it contradicting with start and end time: spid=163 duration=11310646 starttime=2010-04-06 17:45:24.480 endtime=2010-04-06 17:45:35.790 reads=152 writes=2 cpu=16 eventclass=12 textdata= DELETE FROM dbo.[Icon] WHERE Id = 20087 FYI, I am using SQL Server 2008. Mubashar I found the answer here . It says In SQL Server 2005 and later, the SQL Server Profiler graphical user interface displays the Duration column in milliseconds by default, but when a trace is saved to

Unit of measurement for Duration column in SQL Profiler

核能气质少年 提交于 2019-11-30 22:19:51
问题 What is the unit of the Duration column in SQL Profiler? I thought it was milliseconds but in the following Profiler row I found it contradicting with start and end time: spid=163 duration=11310646 starttime=2010-04-06 17:45:24.480 endtime=2010-04-06 17:45:35.790 reads=152 writes=2 cpu=16 eventclass=12 textdata= DELETE FROM dbo.[Icon] WHERE Id = 20087 FYI, I am using SQL Server 2008. 回答1: I found the answer here. It says In SQL Server 2005 and later, the SQL Server Profiler graphical user

What is “Audit Logout” in SQL Server Profiler?

夙愿已清 提交于 2019-11-30 11:44:14
问题 I'm running a data import (using C#/Linq), and naturally I'm trying to optimize my queries as much as possible. To this end I'm running a trace on the DB using SQL Server Profiler, with my trace filtered by my SQL login name (it's a name that can uniquely be attributed to my data import process). Strangely enough, most of my SQL statements are really quick :) - very few queries even break over the 1ms mark. But spaced in between all my queries are several rows where the EventClass is "Audit

SQL Server Profiler - How to filter trace to only display events from one database?

穿精又带淫゛_ 提交于 2019-11-30 06:07:23
问题 How do I limit a SQL Server Profiler trace to a specific database? I can't see how to filter the trace to not see events for all databases on the instance I connect to. 回答1: Under Trace properties > Events Selection tab > select show all columns. Now under column filters, you should see the database name. Enter the database name for the Like section and you should see traces only for that database. 回答2: In SQL 2005, you first need to show the Database Name column in your trace. The easiest

SQL Server Profiler - How to filter trace to only display TSQL containing a DELETE statement?

荒凉一梦 提交于 2019-11-30 05:19:11
I have a SQL Trace setup to monitor all TSQL being issued to a single database. However I only care about 'DELETE' TSQL statements being issued. Is there any way I can filter to just reporting these type of statements to the profiler? Thanks! When setting up your trace, go to event selection and select only TSQL->Batch completed . Now click the column filters button and choose TextData -> Like and write %delete% . That should do it. EDIT : Added percent signs ( % ) around delete because they are needed to make it work. 来源: https://stackoverflow.com/questions/7903208/sql-server-profiler-how-to

How to get SQL Profiler to monitor trigger execution

﹥>﹥吖頭↗ 提交于 2019-11-30 01:11:07
I have a trace setup for SQL Server Profiler to monitor SQL that is executed on a database. I recently discovered that trigger execution is not included in the trace. After looking through available events for a trace, I do not see any that look like they would include trigger execution. Does anyone know how to setup a trace to monitor the execution of triggers? Stored procedures: - SP:StmtStarting - SP:StmtCompleted In SQL Server Profiler 2008, when starting/configuring the trace, go to the "Events Selection" tab, click on the "Show all events" checkbox, and then in the list under the Stored