SQL:BatchCompleted and RPC:Completed

  • Thread starter Thread starter HiChetu
  • Start date Start date
H

HiChetu

I am executing storedprocedures from C# using SQLClinet.

In the SQL Profiler, I get SQL:BatchCompleted for one of them and
RPC:Completed for another.

Can anyone tell me what SQL:BatchCompleted and RPC:Completed are? and
why i am getting a different results for these two sprocs?


The storedprocedures as captured from the profiler is given below:

1) SQL:BatchCompleted exec sproc_committran .Net SqlClient Data
Provider

2) RPC:Completed .Net SqlClient Data Provider exec sp_executesql N'set
context_info @Pm0 exec sproc_begintran', N'@Pm0 varbinary(16)', @Pm0
= 0x2CDC30D9B88B314ABC6AB6327692645C 67


Thanks in advance for any information.

-- Chetan
 
The best place to find information about SQL Server Profiler events is
SQL Books Online, by searching on the term you are interested in. BOL
states that SQL:BatchCompleted occurs when a batch has completed, and
RPC:Completed when an RPC has completed. As to the why, I don't know.

--Mary
 
SQL:BatchCompleted and RPC:Completed reflect the format we use to send the
command on the server. The short version is (I may miss a detail or two):
when you execute a command that has a SQL statement without parameters we
execute it as a "batch"; on the other hand, when we execute an stored
procedure (CommandType.StoredProcedure) or we execute a SQL statement
(CommandType.Text) with parameters, we execute it as an RPC.

--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top