Skip to Content.
Sympa Menu

freetds - [freetds] TDS/RPC messages and embedded comments

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Jones, James O" <James.Jones AT unisys.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] TDS/RPC messages and embedded comments
  • Date: Tue, 7 Jan 2003 15:41:30 -0500

This is a low-level TDS protocol question, specifically related to the
construction of RPC messages (TDS packetType=0x03).

I hope to embed a text comment somewhere in a TDS/RPC message buffer. I need
this comment to ultimately be captured in SQL Server log file.

If RPC message buffers don't explicitly support comments, I would welcome
any creative suggestions for how to accomplish this. I am working with TDS
7.0 and SQL Server 2000. I have studied TDS protocol documentation on the
FreeTDS site and also source module query.c that constructs RPC messages.

More background-----

I am writing a library that intercepts outbound TDS messages and adds
auditing information about the client beyond what the standard SQL logfile
captures about the client. This is needed in billing/chargeback scenarios
when a middle-tier application server makes all database calls and hides the
identity of the actual end-user from the database server. I have been
successful in modifying simple text-based messages (TDS packetType 0x01),
but not RPC messages (packetType=0x03).

For example, I can modify a text-based SQL statement such as the following
select * from authors
by inserting a comment identifying the end-client
-- clientID=DOMAIN\jonesjo <cr><lf>
select * from authors

Thanks,
Jamie Jones
Unisys Corp




Archive powered by MHonArc 2.6.24.

Top of Page