March 15, 2013 at 10:09 am
We have an event session in which we are trying to capture the stored proc executed along with the parameters passed. Session here:
--Using a comparator predicate
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='InputbufferTrace')
DROP EVENT SESSION AuctionTrace ON SERVER;
CREATE EVENT SESSION AuctionTrace
ON SERVER
ADD EVENT sqlserver.sp_statement_completed(
ACTION(sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.client_pid,
sqlserver.session_id, sqlserver.sql_text, sqlserver.tsql_stack)
WHERE (sqlserver.client_hostname = 'HostName')
),
--ADD EVENT sqlserver.rpc_starting(
-- ACTION(sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.client_pid,
--sqlserver.session_id, sqlserver.sql_text, sqlserver.tsql_stack)
-- WHERE (sqlserver.client_hostname = 'hostname')
--),
ADD EVENT sqlserver.module_end (
ACTION(sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.client_pid,
sqlserver.session_id, sqlserver.sql_text, sqlserver.tsql_stack)
WHERE (sqlserver.client_hostname = 'HostName')
)--,
--ADD EVENT sqlserver.sp_statement_completed(
-- ACTION(sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.client_pid,
--sqlserver.session_id, sqlserver.sql_text, sqlserver.tsql_stack)
-- WHERE (sqlserver.client_hostname = 'hostname')
--)
ADD TARGET package0.ring_buffer(
SET max_memory=4096)
with (track_causality = on, MAX_DISPATCH_LATENCY = 1 SECONDS)
GO
We are confident through testing that we are getting the event information for the proper requests, but it always says that the sql text is unavailable. Through testing, we can get this in profiler. Any thoughts on how to really get this inputbuffer information through extended events? Is it a 2008 R2 issue?
Jared
CE - Microsoft
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy