Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI sends duplicate TNS packet to Oracle server ?
bsssrinivas_at_lycos.co.uk said...
> 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.
>
>
If these are the *only* packets, then you might be seeing false clues.
I've never sniffed, so I don't know what data the packets contain. But
using your step numbers, here's what would happen at the "logical" level
(very brief):