October 27, 2008 at 9:50 pm
Comments posted to this topic are about the item What SQL Statements Are Currently Executing?
October 27, 2008 at 9:52 pm
Heh... and I get my butt chewed for using deprecated forms of aliased column names. 😉 I don't feel so bad, now.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 28, 2008 at 1:02 am
Really helpful
October 28, 2008 at 2:45 am
I get this error when creating the SP: Msg 102, Level 15, State 1, Procedure dba_WhatSQLIsExecuting, Line 42 Incorrect syntax near '.'.
Line 42 is the 'CROSS APPLY' line.
Can anyone help?
October 28, 2008 at 3:21 am
Mark,
are you sure you are running this against a SQL2005 instance?
Kev
October 28, 2008 at 3:36 am
Kev,
Thanks - the server was 2005 but the compatibility level was still 2000. It worked find after that change.
Mark
October 28, 2008 at 5:56 am
I ran this in a new query window and it ran successfully. I did not get an output. How do I view the results????
If I run it again I get the following message.
Msg 2714, Level 16, State 3, Procedure dba_WhatSQLIsExecuting, Line 17
There is already an object named 'dba_WhatSQLIsExecuting' in the database.
October 28, 2008 at 5:59 am
dhayes,
I guess you are new to SQL 🙂
The first time you ran the script, you were creating a stored procedure, teh scond time errored, as you found out, because the proc already exists!
To run the proc use
exec dba_WhatSQLIsExecuting
ensuring you are in the right database.....
Kev
October 28, 2008 at 6:09 am
Thank You Kev.
I'm not new to SQL, I'm just not a SQL DBA. I work with Sql every day, just don't normally call Stored procedures. Primarily do backups, and Database creations.
Thanks again for the info.
Don
October 28, 2008 at 6:31 am
Msg 170, Level 15, State 1, Procedure dba_WhatSQLIsExecuting, Line 26
Line 26: Incorrect syntax near 'MAX'.
-- IRADBA Wannabe
October 28, 2008 at 6:36 am
This is very Useful..
Thanks Very Much!
October 28, 2008 at 6:40 am
I got that same message when trying this script on a SQL2000 server. This script is only for SQL2005.
October 28, 2008 at 6:41 am
That explains it! Thanks!
October 28, 2008 at 7:40 am
How to change the compatibility mode?
October 28, 2008 at 8:52 am
This is great. It will be very useful in nailing down those sneaky, long running processes that you can't get a peek at with the standard tools. Thanks!
Viewing 15 posts - 1 through 15 (of 39 total)
You must be logged in to reply to this topic. Login to reply