| Author |
Message |
fatherjack
Joined: 13 Mar 2007 Posts: 224 Location: Cornwall
|
Posted: Fri Dec 05, 2008 9:35 am Post subject: SQL Response - Long Running query |
|
|
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 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6344 Location: Red Gate Software
|
Posted: Thu Apr 08, 2010 3:20 pm Post subject: |
|
|
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
fatherjack
Joined: 13 Mar 2007 Posts: 224 Location: Cornwall
|
Posted: Mon Apr 12, 2010 9:46 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6344 Location: Red Gate Software
|
Posted: Mon Apr 12, 2010 10:48 am Post subject: |
|
|
Hi Jonathan,
I've let the Response guys know about this forum topic. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
fatherjack
Joined: 13 Mar 2007 Posts: 224 Location: Cornwall
|
Posted: Mon Apr 12, 2010 11:53 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group