Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Is there is view to see the SQL in cache

Author  Topic 

cddot
Starting Member

37 Posts

Posted - 2009-03-12 : 03:38:46
ie, the SQL recently executed?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-12 : 04:11:01
DBCC INPUTBUFFER(@@SPID)


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

cddot
Starting Member

37 Posts

Posted - 2009-03-12 : 04:47:40
Can you clarify where/how the command should be run from?

When running in a query window, I get:

Language Event 0 DBCC INPUTBUFFER(@@SPID)
(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Go to Top of Page

shaggy
Posting Yak Master

248 Posts

Posted - 2009-03-12 : 04:58:15
run sp_who2
get spid details
and give input for
DBCC INPUTBUFFER(SPID)
Go to Top of Page

cddot
Starting Member

37 Posts

Posted - 2009-03-12 : 05:43:48
Thanks.
Go to Top of Page
   

- Advertisement -