728x90
SELECT
te.name AS eventtype
,t.loginname
,t.spid
,t.starttime
,t.objectname
,t.databasename
,t.hostname
,t.ntusername
,t.ntdomainname
,t.clientprocessid
,t.applicationname
,t.*
FROM sys.fn_trace_gettable
(
CONVERT
(VARCHAR(150)
,(
SELECT TOP 1
value
FROM sys.fn_trace_getinfo(NULL)
WHERE property = 2
)),DEFAULT
) T
INNER JOIN sys.trace_events as te
ON t.eventclass = te.trace_event_id
--WHERE eventclass=164
where T.ObjectName='프로시저명'
te.name AS eventtype
,t.loginname
,t.spid
,t.starttime
,t.objectname
,t.databasename
,t.hostname
,t.ntusername
,t.ntdomainname
,t.clientprocessid
,t.applicationname
,t.*
FROM sys.fn_trace_gettable
(
CONVERT
(VARCHAR(150)
,(
SELECT TOP 1
value
FROM sys.fn_trace_getinfo(NULL)
WHERE property = 2
)),DEFAULT
) T
INNER JOIN sys.trace_events as te
ON t.eventclass = te.trace_event_id
--WHERE eventclass=164
where T.ObjectName='프로시저명'
728x90
'DB' 카테고리의 다른 글
(MSSQL) sp_ 리스트 (0) | 2017.04.13 |
---|---|
(MSSQL) select시 최대허용크기(8094)초과 및 테이블생성시 최대바이트수(8060) 초과오류시 해결방법 (0) | 2017.04.13 |
(MSSQL) cpu 점유율 높은 쿼리 찾아내기 (0) | 2017.04.13 |
(MSSQL) 테이블 컬럼 명칭 변경 (0) | 2017.04.13 |
(MSSQL) xml 저장프로시저 (0) | 2017.04.13 |