none
PROFILER doesn't show rpc events for loginname

    Question

  • For some reason the profiler doesn't show the rpc events for a certain LoginName... I do see in the profiler the opened connections but not the RPC events. How can i fix it?

    thanks,

    Dror

    Sunday, August 04, 2013 9:24 AM

Answers

  • An RPC call means that the stored procedure was called from outside the SQL Server instance space.  For example, if you have a web application or windows application which creates a SQL connection string and then makes a call to execute the SP.

    A T-SQL event could be a call to the procedure either through Query Analyzer running on the same server, or from within another stored procedure.  The key is that it is running on the server itself, which is why every RPC event has a TSQL event.  The RPC event must initiate a TSQL event, but a TSQL event does not have to initiate a remote call.

    For example, let's say there is an SP called from a .NET web service called my_StoredProc_A that looks like this:

    CREATE PROCEDURE dbo.my_StoredProc_A

    AS

    -- do something.

    EXECUTE dbo.my_StoredProc_B

    -- do something else.

    GO

    If you ran SQL Profiler trace on this, you would notice that my_StoredProc_A would show up as an RPC event and a TSQL event, but my_StoredProc_B would only show up as a TSQL event because it was not called remotely.

    Hope that explains it!

    Reference : http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6bd9e120-305a-492b-b14b-a3b93fec7a27/tsql-event-and-rpc-event-difference-example

    Did you make sure that you filtered the Profiler to use the same LoginName you specified in the connection string?

    ---------------------------------------------------------------------------------------

    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Sunday, August 04, 2013 10:14 AM
  • For some reason the profiler doesn't show the rpc events for a certain LoginName... I do see in the profiler the opened connections but not the RPC events. How can i fix it?

    As Yazan mentoned, RPC calls must be initiated from application code.  This may be either a stored procedure call or a parameterized query.  Ad-hoc tools like an SSMS query windows simply send the entire batch of text to SQL Server, which will appear as a SQL:BatchCompleted event in the trace.

    If you are certain RPC events are generated on the traced connection, check for trace filters that might exclude the event.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Sunday, August 04, 2013 11:05 AM

All replies

  • An RPC call means that the stored procedure was called from outside the SQL Server instance space.  For example, if you have a web application or windows application which creates a SQL connection string and then makes a call to execute the SP.

    A T-SQL event could be a call to the procedure either through Query Analyzer running on the same server, or from within another stored procedure.  The key is that it is running on the server itself, which is why every RPC event has a TSQL event.  The RPC event must initiate a TSQL event, but a TSQL event does not have to initiate a remote call.

    For example, let's say there is an SP called from a .NET web service called my_StoredProc_A that looks like this:

    CREATE PROCEDURE dbo.my_StoredProc_A

    AS

    -- do something.

    EXECUTE dbo.my_StoredProc_B

    -- do something else.

    GO

    If you ran SQL Profiler trace on this, you would notice that my_StoredProc_A would show up as an RPC event and a TSQL event, but my_StoredProc_B would only show up as a TSQL event because it was not called remotely.

    Hope that explains it!

    Reference : http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6bd9e120-305a-492b-b14b-a3b93fec7a27/tsql-event-and-rpc-event-difference-example

    Did you make sure that you filtered the Profiler to use the same LoginName you specified in the connection string?

    ---------------------------------------------------------------------------------------

    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Sunday, August 04, 2013 10:14 AM
  • For some reason the profiler doesn't show the rpc events for a certain LoginName... I do see in the profiler the opened connections but not the RPC events. How can i fix it?

    As Yazan mentoned, RPC calls must be initiated from application code.  This may be either a stored procedure call or a parameterized query.  Ad-hoc tools like an SSMS query windows simply send the entire batch of text to SQL Server, which will appear as a SQL:BatchCompleted event in the trace.

    If you are certain RPC events are generated on the traced connection, check for trace filters that might exclude the event.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Sunday, August 04, 2013 11:05 AM