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.
Author |
Topic |
rohitmathur11
Yak Posting Veteran
77 Posts |
Posted - 2009-11-14 : 04:13:32
|
Hi,How can i find current running sql statements in the database. i am using follwoing ,but it is show this select statement only..Please advise...SELECT sqltext.TEXT,req.session_id,req.status,req.command,req.cpu_time,req.total_elapsed_timeFROM sys.dm_exec_requests reqCROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext oracle |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-23 : 09:36:09
|
Try thisSELECT top 10 sqltext.TEXT,req.*FROM sys.dm_exec_query_stats reqCROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext order by last_execution_time descMadhivananFailing to plan is Planning to fail |
 |
|
rohitmathur11
Yak Posting Veteran
77 Posts |
Posted - 2009-11-24 : 05:05:00
|
Thanks a lot ..now it is showing other sql staements ..oracle |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-25 : 00:58:58
|
quote: Originally posted by rohitmathur11 Thanks a lot ..now it is showing other sql staements ..oracle
You are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|