Dear Coallegues,
I am trying to configure an extended event session in order to capture parameters executed with a specific stored procedures in a specific database, without results:
It is not possible use Profiler
Please help, thanks for any idea
CREATE EVENT SESSION [9999] ON SERVER
ADD EVENT sqlserver.rpc_completed
(
ACTION
(
sqlserver.database_id,
sqlserver.session_id,
sqlserver.username,
sqlserver.client_hostname,
sqlserver.sql_text,
sqlserver.tsql_stack
)
WHERE (sqlserver.database_id = 24) )
ADD TARGET package0.asynchronous_file_target
(
SET FILENAME = N'd:\test\299650v5.xel',
METADATAFILE = N'd:\test\299650v5.xem'
)
WITH (MAX_MEMORY=2048 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,
MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,
MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF
);
September 8, 2020 at 7:03 pm
Profiler is of course a really bad idea, but why would a server side Trace be impossible?
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 8, 2020 at 8:48 pm
Try adding the module_end event to your event session. I believe you need to include that to get the parameters.
Sue
September 9, 2020 at 12:32 pm
Thanks for your responses,
but it appears that in SQL Server 2008 (r2), is not possible to capture store procedures parameters, I have tryed with the events commented above and it brings the name but not the parameters.
Again, thanks for your ideas and effort.
Yeah, all I get for tsql_text is "Unable to retrieve SQL text".
Extended Events in SQL 2008 was a little half-baked, and things like capturing what is executed definitely works better with Trace in that version. (Well, I tend to think that it works better in any version given how much easier Trace is to use, but that is another story.)
So these appear to be the choices: Trace ...or upgrade, which is overdue anyway.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 9, 2020 at 5:03 pm
(Well, I tend to think that it works better in any version given how much easier Trace is to use, but that is another story.)
It's too bad that we can only give one "LIKE" to a post or I'd give you a million on that statement. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply