sql-server-profiler

Linq-To-SQL Multiple Trips to the Database

家住魔仙堡 提交于 2019-12-06 13:32:51
I'm trying to make my Linq-to-SQL query more efficient by including child properties in one trip to the DB. I started by trying various linq queries to accomplish this. The queries were getting complex, so I tried the LoadWith() option: The constructor of my DAL class sets the LoadWith() settings: public TrackerJobData() { dataLoadOptions = new DataLoadOptions(); dataLoadOptions.LoadWith<TrackerJobRecord>(x => x.SpecBarcodeRecords); dataLoadOptions.LoadWith<TrackerJobRecord>(x => x.TrackerJobEquipmentTriggerRecords); dataLoadOptions.LoadWith<TrackerJobRecord>(x => x.EtaRecord); this.Database

ASP.NET MVC application profiling

眉间皱痕 提交于 2019-12-05 06:54:01
问题 I'm a junior developer and I was assigned to find out why web applications slow current request takes about eight seconds, but I do not know how to begin to profile how to find out what's going on SQL server, which functions takes a lot of time. The application is written in ASP.NET MVC 5 and uses Entity Framework 6. Where should I start? 回答1: If you're not a database boy like me, you'll love using Glimpse. Glimpse is the diagnostics platform of the web. Providing real time diagnostics &

Can profiler templates be migrated to newer versions of SQL Profiler?

时间秒杀一切 提交于 2019-12-05 02:27:51
Is it possible to migrate Profiler templates to newer versions of SQL Server? In my case I want to take my SQL 2008 templates to 2012. I've tried (1) a straight file copy and (2) an export/import. In both cases the older templates run, but cannot be modified. Modifications result in the following error: I've got a bunch of custom templates and I'm trying to avoid recreating them by hand. Although, I guess that is the fallback position. Thoughts? Aaron Bertrand Export the template from SQL Server 2008's version of Profiler (I assume you have already done that). Now open 2012 Profiler, go to

How to find timed out statements in SQL 2005 profiler

自古美人都是妖i 提交于 2019-12-04 05:05:32
I'm trying to find SQL statements that timed out using the SQL 2005 profiler. Is there a way to set such a filter? In Profiler, you can add the event "Attention" under "Errors and Warnings". It's definition is Collects all attention events, such as client interrupt request or when a client connection is broken. As far as other errors (deadlocks, contraints, etc), try "Execution Warning" (reports warning that occurred during the execution of SQL statement or procedure) or "User Error Message" (the error message displayed to the user in the case of an error or exception). Yes. Check "All Events"

Is there a way in SQL profiler to filter by INSERT statements?

会有一股神秘感。 提交于 2019-12-04 01:36:19
I am trying to identify SQL INSERTS that occur when a record is viewed from a Windows application. In SQL Profiler I have a long list of stored procedures that fire when the record is viewed, however it is very cumbersome to identify the stored procedure then locate the inserts, then find the stored procedure in the object explorer (even with filters). Is there a way for me to see all SQL commands on a line item instead of a stored procedure? And then filter by INSERT statements? Thanks for any assitance! Try watching the events SP:StmtStarting and SQL:StmtStarting, include column TextData,

ASP.NET MVC application profiling

谁说我不能喝 提交于 2019-12-03 20:48:45
I'm a junior developer and I was assigned to find out why web applications slow current request takes about eight seconds, but I do not know how to begin to profile how to find out what's going on SQL server, which functions takes a lot of time. The application is written in ASP.NET MVC 5 and uses Entity Framework 6. Where should I start? If you're not a database boy like me, you'll love using Glimpse. Glimpse is the diagnostics platform of the web. Providing real time diagnostics & insights to the fingertips of hundreds of thousands of developers daily. So you can start by grabbing Glimpse

How to get SQL Profiler to monitor trigger execution

只谈情不闲聊 提交于 2019-12-03 18:48:41
问题 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? 回答1: Stored procedures: - SP:StmtStarting - SP:StmtCompleted 回答2: In SQL Server Profiler 2008, when starting/configuring the trace,

NHibernate taking a long time to run query

六眼飞鱼酱① 提交于 2019-12-03 16:20:54
This is being done using Fluent NHibernate I've got a NHibernate lookup that is retrieving data from one table. If i take the generated sql and run it through query analyzer, it takes ~18ms to run. Using NHProfiler, i'm getting the duration of this query as ~1800ms - 100 times longer than sql ! Query duration - Database only:1800ms - Total: 1806ms The object that is being populated contains a child class, but this child is being loaded from the NHibernate 2nd level cache The data that is being returned is paged (50 per query) although as far as i can tell, this shouldn't make any difference I

SQL Server Profiler deprecation - Replacement?

孤人 提交于 2019-12-03 06:55:30
问题 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

SQL server profiler not showing LINQ To Sql queries

懵懂的女人 提交于 2019-12-03 02:19:36
I am trying to view SQL generated by Linq to SQL in the SQL Server Profiler (2005). I can see the sql sent to the server from anything except for linq to sql. I'm betting that I need to change event selections for the trace, but not sure what else to select. I am currently only selecting this: SQL:StmtCompleted - TextData & SPID I don't want to use data context logging nor the SQL Debug Visualizer. I need to use the profiler. Why can I not see the LINQ to SQL queries? Thanks. EDIT I added SQL:BatchCompleted and that hasn't helped. EDIT 2 I added the event RPC:Completed which is found under the