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: Fri, 04 Apr 2003 01:15:35 +0530
Message-ID: <3E8C8F5F.6040706@lycos.co.uk>


TurkBear wrote:

> "Srinivas B.S.S" <bsssrinivas_at_lycos.co.uk> wrote:
> 
> 

>>Hi,
>>
>>I am working with ODBC driver which uses OCI calls to interact
>>with Oracle on Solaris. Oracle version is 8.1.6. When the
>>following query:
>>
>>"select col1 from tab1 where n=?"
>>
>>is executed via ODBC with 'xyz' to the bind variable, it causes
>>the following packet transaction over the network(obtained from
>>sniffing packets at Oracle server on port 1521)
>>
>>1. Connection establishment packets between ODBC client and
>> Oracle server
>>2. Request(TNS) from ODBC client with the data "select col1
>> from tab1 where n=:P0......" Note that no value has been
>> sent for the bind variable.
>>3. Response(TNS) from Oracle server with no data for the
>> request sent in step 2.
>>4. Request(TNS) from ODBC client with the data "select col1
>> from tab1 where n=:P0 xyz"
>>5. Response(TNS) from Oracle server with valid data for the
>> request sent in step 4.
>>[...]
>>
>>Why a dummy TNS request in step 2 is being sent from ODBC ?
>>Is there anything that could cause this scenario in OCI(ODBC
>>driver which I am using is written in OCI) ?
>>
>>Has any one observed this behavior earlier ? Any ideas to
>>overcome ?
>>
>>Thanks,
>>Srinivas.
> 
> I this is what is happening:
> The Parser step in processing a SqlPlus request is probably checking for the existence of a usable cached version of your
> query which,since it is  pre-parsed and will be faster, it will use instead of reparsing yours...If it does not find one (
> using the 'template' it sent) it returns for your version of the query.

Thanks a lot for the explanation.

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 ?

Thanks,
Srinivas.

> 
> 
> 
> 
> ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
> http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
> ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Received on Thu Apr 03 2003 - 13:45:35 CST

Original text of this message

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