Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI sends duplicate TNS packet to Oracle server ?

Re: OCI sends duplicate TNS packet to Oracle server ?

From: Srinivas B.S.S <bsssrinivas_at_lycos.co.uk>
Date: Sat, 05 Apr 2003 12:26:43 +0530
Message-ID: <3E8E7E2B.80004@lycos.co.uk>


Justin Cave wrote:
> "Srinivas B.S.S" <bsssrinivas_at_lycos.co.uk> wrote in message news:<3E8C8F5F.6040706_at_lycos.co.uk>...
>

>>TurkBear wrote:
>>
>>>"Srinivas B.S.S" <bsssrinivas_at_lycos.co.uk> wrote:
>>
>>Will the 'Parser step' be carried out at server side or OCI side ?
>>If the pre-parsed statement is available at OCI side, it can just send
>>it with the correct value given to the bind variable. I am still unclear
>>with the reason why a dummy packet is being sent. Any thoughts on this ?
>>

>
>
> What's probably going on at the client end is that the application is
> doing
>
> - prepare
> - bind
> - execute
>
> The "dummy" packet you're seeing is likely the result of the prepare
> step, where the ODBC driver is unaware of what value is going to be
> assigned to the bind variable. The ODBC driver sends the statement to
> the database for parsing-- OCI doesn't do any parsing. When you do
> the execute after binding the bind variable, you're seeing the second
> packet.
>
> If the application has an opportunity to reuse the same statement in
> the future, it shouldn't have to re-send the "dummy" packet. In other
> words, if the series of steps is
>
> - prepare
> - bind
> - execute
> - bind
> - execute
>
> you'd see
>
> - "dummy" packet on prepare
> - "real" packet on execute
> - "real" packet on execute

Excellent! This is what exactly happening. Thanks a million.

But the OCI documentation states that OCIStmtPrepare() is purely a local call which is not true!

Cheers,
Srinivas.

>
> Justin Cave
Received on Sat Apr 05 2003 - 00:56:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US