Skip to Content.
Sympa Menu

freetds - RE: [freetds] Sybase Incompatibilities?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Sybase Incompatibilities?
  • Date: Thu, 17 Jul 2003 11:51:24 -0400

> From: Ben Vaughn [mailto:bvaughn AT BlackbirdTech.com]
> Sent: July 17, 2003 10:59 AM
>
> I must not have been clear -- The TDSDUMP file you are looking
> at was generated by TDS from a PHP session. In this case,
> appname is an
> optional argument of the sybase_connect() function in PHP.
> It should be
> noted that appname and servername are different fields (if you look at
> the hex.) There appears to be no function within FreeTDS.conf to
> specify the application name, or the server name (short of
> the resource name.)

So, Ben, just so I'm sure I understand: For a connection to ASA to work,
the [servername] entry of freetds.conf has to match the server's database
name. The server evidently compares the server_name field of the TDS 5.0
login packet to its database name, and rejects the login if they don't
match. The "app_name" field doesn't affect your ability to log in.

You'd like an override. You'd like to control the value of the server_name
field in the freetds.conf entry, in some way besides the [servername]
entry.

We'll have to invent a reasonable name for it. I think "database name" is
misleading unless we also send a "use <databasename>" command immediately
after logging on. I think "servername" is confusing. Perhaps "ASA
Servername" is better.

Nes pas?

--jkl

> -----Original Message-----
> From: James K. Lowden [mailto:jklowden AT schemamania.org]
> Sent: Wednesday, July 16, 2003 07:18
> On Wed, 16 Jul 2003 18:37:19 -0400, "Ben Vaughn"
> <bvaughn AT BlackbirdTech.com> wrote:
> > Interesting...What does this line of the TDSDUMP file
> specify? That's
>
> > where I can see TDS submitting that info to the server.
>
> Indeed you do. FreeTDS sent "appnameappnamea" in the
> app_name field of
> the login packet (see doc/tds.html for explication). My breakdown of
> your
> packet follows. What I don't understand is, where FreeTDS decides to
> populate the app_name field with your servername as found in
> freetds.conf.
>
> Header
> 0000 02 00 02 00 00 00 00 00-
>
> 8 CHAR[30] host_name
> 6d 61 6e 61 67 65 2e 70 |........ manage.p|
> 0010 69 63 6b 65 74 2d 66 65-6e 63 65 2e 6f 72 67 00
> |icket-fe nce.org.|
>
> 0020 00 00 00 00 00 00
>
> 38 INT8 host_name_length
> 17
>
> 39 CHAR[30] user_name
> 69-64 73 6d 64 63 00 00 00 |.......u nameu...|
> 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
> |........ ........|
>
> 0040 00 00 00 00 00
>
> 69 INT8 user_name_length
> 06
>
> 70 CHAR[30] password
> 43 31-73 43 30 43 31 73 43 30 |......pw pwpwpwpw|
> 0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
> |........ ........|
>
> 0060 00 00 00 00
>
> 100 INT8 password_length
> 0a
>
> 101 CHAR[30] host_process
> 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
> 0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
> |........ ........|
>
> 0080 00 00 00
>
> 131 INT8 host_process_length
> 05
>
> 132 ? magic1[6] /* mystery stuff */
> 03 01 06 0a-09 01
>
> 138 INT8 bulk_copy
> 00
>
> 139 ? magic2[9] /* mystery stuff */
> 00 00 00 00 00 |........ ........|
> 0090 00 00 00 00
>
> 148 CHAR[30] app_name
> 73 71 6c 63-6f 72 65 64 62 73 65 72 |....appn ameappna|
> 00a0 76 65 72 00 00 00 00 00-00 00 00 00 00 00 00 00
> |mea..... ........|
>
> 00b0 00 00
>
> 178 INT8 app_name_length
> 0f
>
> 179 CHAR[30] server_name
> 69 64 73 6d 64-63 00 00 00 00 00 00 00 |...uname u.......|
> 00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
> |........ ........|
>
> 00d0 00
>
> 209 INT8 server_name_length
> 06
>
-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page