I know dbcc inputbuffer still exists in 2005, but what are the other ways to
check the underlying SQL running ?
btw, is dbcc inputbuffer a backward compatibility feature or is it still the
preferred command on 2005 ?
btw, what about sp_who2 ? Does the underlying command use the DMVs ?fn_get_sql can be used
Take a look into the usage:
http://msdn2.microsoft.com/en-us/library/ms189451.aspx
Thanks
Hari
"Hassan" <Hassan@.hotmail.com> wrote in message
news:OJoEmv0FHHA.4580@.TK2MSFTNGP05.phx.gbl...
>I know dbcc inputbuffer still exists in 2005, but what are the other ways
>to check the underlying SQL running ?
> btw, is dbcc inputbuffer a backward compatibility feature or is it still
> the preferred command on 2005 ?
> btw, what about sp_who2 ? Does the underlying command use the DMVs ?
>|||Hi Hassan
The new metadata objects in SQL 2005 are the sys.dm_exec_query_stats view,
and the sys.dm_exec_sql_text function. The follow query gets all the
sql_handles from the view, and uses them with the function to return the
text of the statement:
SELECT * FROM sys.dm_exec_query_stats qs
CROSS APPLY sys.dm_exec_sql_text(sql_handle)
If you want to see how a stored procedure is written, you can look at the
definition for yourself:
SELECT object_definition(object_id('sp_who'))
You can also look at the definition of any DMV, catalog view or
compatability view using the object_definition function.
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"Hassan" <Hassan@.hotmail.com> wrote in message
news:OJoEmv0FHHA.4580@.TK2MSFTNGP05.phx.gbl...
>I know dbcc inputbuffer still exists in 2005, but what are the other ways
>to check the underlying SQL running ?
> btw, is dbcc inputbuffer a backward compatibility feature or is it still
> the preferred command on 2005 ?
> btw, what about sp_who2 ? Does the underlying command use the DMVs ?
>
Sunday, March 11, 2012
dbcc inputbuffer equivalent in SQL 2005
Labels:
backward,
btw,
database,
dbcc,
equivalent,
exists,
inputbuffer,
microsoft,
mysql,
oracle,
running,
server,
sql,
tocheck,
underlying
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment