Contents

1 覦覯1: 2005 覯
2 覦覯2: 2000, 2005 覯
3 覦覯3: 2000, 2005 覯


1 覦覯1: 2005 覯 #

--語SQL覓碁慨蠍
--覦覯1: 2005 
SELECT st.text 
FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(sql_handle) st 
WHERE r.session_id = 52 
GO 

2 覦覯2: 2000, 2005 覯 #

--覦覯2: 2000, 2005 
DBCC INPUTBUFFER (52) 
GO 

3 覦覯3: 2000, 2005 覯 #

--覦覯3: 2000, 2005 
--::fn_get_sql 2000 sp3伎襷 ろ螳
DECLARE @handle binary(20) 
SELECT @handle = sql_handle 
FROM master..sysprocesses 
WHERE spid = 52 
SELECT [text] FROM ::fn_get_sql(@handle) 
GO