Skip to Content.
Sympa Menu

freetds - Re: [freetds] MS SQL Queries

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] MS SQL Queries
  • Date: Fri, 9 Mar 2007 16:18:59 +0100

> Hi
>
>
>
> I am working on MS SQL. I am having queries regarding the TDS
> protocol.
> Basically I am dealing with MS SQL Server 2000.
>
> I would like to know about the following things:
>
>

A good start can be

http://freetds.cvs.sourceforge.net/*checkout*/freetds/freetds/doc/tds.ht
ml
http://jtds.sourceforge.net/TDS.html
Even Sybase release information for it's TDS 5.0.

>
> 1) A detailed packet format of Result - TDS 7.0+ (0x81) response
> token. I actually want to know the different values that its
> "type" field
> can take. Also I want to know the details of its "size" and "optional"
> fields.
>
>
>
> 2) The detailed packet format of RPC (Remote Procedure
> Call).How can I
> generate/capture a trace which contains a RPC packet? What
> are RPC packets
> used for?
>

RPC == store procedure

Take in mind that some special feature use RPCs (like cursors or
prepared statements)

>
>
> 3) A detailed packet format of Output Parameters (0xAC) response
> token. How can I generate a trace for it?
>
>
>
> 4) A detailed packet format of Data - Row Result (0xD1), Data -
> Compute Result (0xD3) response tokens. I notice from the
> packet traces that
> sometimes strings contained in row data are in 16-bit
> Unicode, and sometimes
> they are not. Why? Also I would like to know if there is
> anyway to determine
> the size of the row data block? How to know if it contains
> fixed length
> records or variable length records?
>
>

Unicode/other depends from type.
Types depends on result format (0x81)

>
>
>
> 5) A detailed packet format of Capability packet ( 0xE2
> ). How can I
> generate a trace for it?
>
>
>
> 6) A detailed packet format of Param format (0xEC). How
> can I generate
> a trace for it?
>
>
>
>
>
> 7) A detailed packet format of Result Set ( 0xEE ). How can I
> generate a trace for it?
>

These 3 packets type are not used by mssql2k (only by Sybase). mssql use
RPCs and 0xAC.

>
>
> Any inputs/references that answers this questions would be
> appreciated.
>
> Thanks,
> Shama
>

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page