Skip to Content.
Sympa Menu

freetds - Re: [freetds] issue with connecting ms sql azure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] issue with connecting ms sql azure
  • Date: Mon, 3 Oct 2011 21:36:50 -0400

On Mon, 3 Oct 2011 18:03:23 -0700
Andy Qian <andyq AT intapp.com> wrote:

> I modified both sybase and freetds codes as you suggested, and tested
> them. It worked. Now I can connect to azure server with modified
> sybase and freetds. I also tested with other versions of ms sql
> server. so far so good.

Excellent, Andy. We look forward to you patch! :-)

> for curiosity, is there any specific reason why the previous versions
> of sybase/freetds do not use the direct connection approach? or is
> there any risk for using the direct-connection approach?

No risk, no.

I can only tell you what I infer from the forensic evidence. The
original login packet didn't have a database name field. AFAIK, even
today there's no way to tell a Sybase server in the login packet what
database to use.

The library reflects the protocol. Sybase specified db-lib and ct-lib,
and neither one has a way to specify the database at connect time.
Sending "use dbname" isn't difficult, and does help distinguish between
"can't log in" and "can't use this database" errors.

Microsoft included the dbname in the TDS 7.0 login packet. If you ask
me, it was to support ODBC. It does make SQL server look a bit more
like other RDBMSs that don't have a notion of "dbname".

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page