你好,网上的另外一个回答好像说RPC:Completed指的是sp_executesql执行完毕,我测了一下是这样,而普通SP是不会触发这个事件的。
我是初学者,如果这个说法不对,请您指正。
https://dba.stackexchange.com/questions/34484/difference-between-sql-batch-statement-and-rpc
RPC" vs "batch" is the TDS execution mode that ADO.NET (or any SQL Server client) uses. When a plain SQL statement with no parameters is executed, we use a "batch". When a stored-proc is executed, we use RPC (this is not the same as RPC as the stand-alone network remote procedure call, we just happen to call this mode RPC in TDS (the SQL Server network protocol)). Also, if you execute a batch with parameter, we actually use a stored-proc called sp_executesql, and pass the SQL statement itself and the rest of the parameters to it, so it also shows up as RPC.
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.