SQL Response - Long Running query

Monitor, diagnose and receive alerts to problems across your SQL Servers.

Moderators: eddie davis, david connell, dlkj, Colin Millerchip, priyasinha, Emma A

SQL Response - Long Running query

Postby fatherjack » Fri Dec 05, 2008 9:35 am

Hi,

When I view the details of a long running query I am regularly seeing the SQL query fragment contain a CREATE statement - mainly CREATE PROCEDURE or CREATE FUNCTION - is this a quirk of the software (I have SQL Prompt installed too so it could get object create scripts from there??) or is the TSQL being executed actually creating these objects?

thanks
fatherjack
 
Posts: 224
Joined: Tue Mar 13, 2007 12:33 pm
Location: Cornwall

Postby Brian Donahue » Thu Apr 08, 2010 3:20 pm

Hi Jonathan,

The SQL fragments shown by SQL Response are the same kind of thing that you would see if you ran SQL Profiler on the server. I'd say that, yes, the create statements are being executed. To track down the cause, you can check the list of processes that were connected at the time. Most applications will identify themselves to SQL Server by name in the connection string.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby fatherjack » Mon Apr 12, 2010 9:46 am

Hi Bryan,

I am pretty certain these CREATE statements are not actually being executed, Grant Fritchey gave me some advice on a similar situation here http://ask.sqlservercentral.com/questions/3577/cross-database-functions where he says that the DMVs refer to the object being execute with the CREATE syntax as it cannot/has not resolved it to just the object name. In short the long running query is the execution of the object that the CREATE script would create, not the creation of the object itself.

Hope this makes sense, if not feel free to get in touch or maybe get hold of Grant!

Can you forward this to the Response v2 team or shall I get in touch direct?
-----------------------------------------
Senior DBA
Careers South West Ltd
fatherjack
 
Posts: 224
Joined: Tue Mar 13, 2007 12:33 pm
Location: Cornwall

Postby Brian Donahue » Mon Apr 12, 2010 10:48 am

Hi Jonathan,

I've let the Response guys know about this forum topic.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby fatherjack » Mon Apr 12, 2010 11:53 am

Great, thanks for passing the message along. Also my apologies for mis-spelling your name previously. We have a Bryan here and its auto-pilot typing I'm afraid!
-----------------------------------------
Senior DBA
Careers South West Ltd
fatherjack
 
Posts: 224
Joined: Tue Mar 13, 2007 12:33 pm
Location: Cornwall


Return to SQL Response 1

Who is online

Users browsing this forum: No registered users and 0 guests