RPC sql profiler

  • I have a generic question on the trace output from sql profiler.. Hope someone can help..

    While testing slowness on a program, I ran a trace with RPC:completed, RPC:starting. SQL’s that appear in TextData seem to be repeating more like a loop.

    SELECT faxt from item where icode = ‘A’ (RPC:Completed at 11:40)

    SELECT faxt from item where icode = ‘A’ (RPC:Completed at 11:42)

    For example, the SQL above is in RPC:Completed at say 11:40 am, looks like the same SQL with same where clause repeats again at 11:42am. I was wondering if the same SQL has been called twice in the program code, but the developers say it’s not the case. If the SQL is in a stored procedure, will it appear in RPC:completed over and over even though it’s called only once? Please advice.

    Thank you

  • The SQL is being called twice from the application.

    An RPC is a remote procedure call, the application calling a procedure on the SQL server. One call from the app, one RPC:started and one RPC:completed event

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks. I have asked to check the code again but I'm pretty sure it will come back that its not the code. If the select statement is only called once per result set and not on a row by row basis, it's difficult to understand why the same SQL keeps popping up multiple times .. For once i thought may be because it is in a loop..

    Thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply