Professional Web Applications Themes

SP vs. RPC ? - Microsoft SQL / MS SQL Server

I have a stored proc in my database named "StateCode_Get". If I execute this via Query yzer, SQL Profiler treats it as a stored procedure call. If I call it via a .NET app our company has created, SQL Profiler treats it as a remote procedure call. Does anyone know why there is a difference? Thanks. J.R. Largo SQL Tools The Finest Collection of SQL Tools Available [url]http://www.largosqltools.com[/url]...

  1. #1

    Default SP vs. RPC ?

    I have a stored proc in my database named "StateCode_Get". If I execute
    this via Query yzer, SQL Profiler treats it as a stored procedure call.
    If I call it via a .NET app our company has created, SQL Profiler treats it
    as a remote procedure call. Does anyone know why there is a difference?

    Thanks.

    J.R.
    Largo SQL Tools
    The Finest Collection of SQL Tools Available
    [url]http://www.largosqltools.com[/url]



    Largo SQL Tools Guest

  2. #2

    Default Re: SP vs. RPC ?


    "bruce barker" <nospam_brubarsafeco.com> wrote in message
    news:u8z4TmwRDHA.2116TK2MSFTNGP12.phx.gbl...
    > in qa you are executing a sql batch that contain a sp call
    >
    > for example:
    >
    > exec sp_who2
    > go
    >
    > the sql query engine must p this sql text and process it, even though
    > its only 1 sp call.
    >
    > sqlserver also a rpc interface for sp's that allow skiping the p
    phase.
    > you pass the name of the proc and an array of its parameters. ado.net will
    > do this for you if you set the command type to
    CommandType.StoredProcedure.
    >
    AND you must prepare the command. (Command.Prepare). The prepare costs an
    extra round-trip to the server, but gives you RPC-style invocation. This is
    only usefull if you execute a SqlCommand several times (like with a
    DataAdapter's UpdateCommand).

    David


    David Browne Guest

  3. #3

    Default Re: SP vs. RPC ?

    In addition to the other posts: You can get the RPC call type from QA using below syntax:

    {call sp_help}

    --
    Tibor Karaszi, SQL Server MVP
    Archive at: [url]http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver[/url]


    "Largo SQL Tools" <nospam> wrote in message
    news:%23X0yb8vRDHA.2480tk2msftngp13.phx.gbl...
    > I have a stored proc in my database named "StateCode_Get". If I execute
    > this via Query yzer, SQL Profiler treats it as a stored procedure call.
    > If I call it via a .NET app our company has created, SQL Profiler treats it
    > as a remote procedure call. Does anyone know why there is a difference?
    >
    > Thanks.
    >
    > J.R.
    > Largo SQL Tools
    > The Finest Collection of SQL Tools Available
    > [url]http://www.largosqltools.com[/url]
    >
    >
    >

    Tibor Karaszi Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139