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: TurkBear <john.greco_at_dot.state.mn.us>
Date: Thu, 03 Apr 2003 09:19:01 -0600
Message-ID: <r0ko8von633fq0vpro5fnogv0gv9ae6kno@4ax.com>

"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.

----== 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 - 09:19:01 CST

Original text of this message

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