Discussion:
[freetds] Microsoft SQL Server versions and FreeTDS
Geoff Montee
2014-04-08 12:39:28 UTC
Permalink
I wrote an open source TDS foreign data wrapper for PostgreSQL using your
implementation of DB-Library:

https://github.com/GeoffMontee/tds_fdw

I mainly wrote it to connect to Sybase databases, but its compatibility
with Microsoft SQL Server is a nice added benefit.

Your TDS protocol page hasn't been updated in a while:

http://www.freetds.org/userguide/choosingtdsprotocol.htm

It's missing MS SQL Server 2008 R2, MS SQL Server 2012, and MS SQL Server
2014. I'm curious, does your implementation of DB-Library support these
newer versions of MS SQL Server? I ask because Microsoft's own
documentation says that they may drop DB-Library support in the future:

http://technet.microsoft.com/en-us/library/aa174484%28v=SQL.80%29.aspx

"While the DB-Library API is still supported in Microsoft SQL Server 2000,
no future versions of SQL Server will include the files needed to do
programming work on applications that use this API. Connections from
existing applications written using DB-Library will still be supported in
the next version of SQL Server, but this support will also be dropped in a
future release. When writing new applications, avoid using DB-Library. When
modifying existing applications, you are strongly encouraged to remove
dependencies on DB-Library."

Thanks,

Geoff Montee
Frediano Ziglio
2014-04-08 18:08:23 UTC
Permalink
Post by Geoff Montee
I wrote an open source TDS foreign data wrapper for PostgreSQL using your
https://github.com/GeoffMontee/tds_fdw
I mainly wrote it to connect to Sybase databases, but its compatibility
with Microsoft SQL Server is a nice added benefit.
http://www.freetds.org/userguide/choosingtdsprotocol.htm
Userguide on website refer to stable release, we are developing stuff
for mssql 2012 (mssql 2008 R2 have very small changes in the
protocol... mostly nothing!). Keep in mind that client and server
decide together the protocol to use. Actually all server versions
support protocols from 4.2 to protocol specific to the server version
(for instance 7.2 for mssql 2005). As client you can use whatever
protocol server provides.
Post by Geoff Montee
It's missing MS SQL Server 2008 R2, MS SQL Server 2012, and MS SQL Server
2014. I'm curious, does your implementation of DB-Library support these
newer versions of MS SQL Server? I ask because Microsoft's own
http://technet.microsoft.com/en-us/library/aa174484%28v=SQL.80%29.aspx
"While the DB-Library API is still supported in Microsoft SQL Server 2000,
no future versions of SQL Server will include the files needed to do
programming work on applications that use this API. Connections from
existing applications written using DB-Library will still be supported in
the next version of SQL Server, but this support will also be dropped in a
future release. When writing new applications, avoid using DB-Library. When
modifying existing applications, you are strongly encouraged to remove
dependencies on DB-Library."
The reason is that Microsoft db-library only support protocol 4.2 (the
protocol introduced by... I think Sybase 4.2 before ms acquired
licences and forked the code! I never worked on such releases, for me
mssql starts with 7.0). Our db-library support newer versions, current
development up to 7.3. Well... in 7.3 (but not on 7.2) MS removed some
information (the text pointer) returning blob (text/image/ntext). This
means that functions relying on this information (mostly to insert
partial blobs) does not work. See for instance results on
freetds.sourceforge.net using protocol 7.3, some tests fail.
So, as long as you don't use text pointers you are safe until MS
remove support for protocol 7.3 (mssql 2008) while if you use text
pointers you are safe until MS remove support for protocol 7.2 (mssql
2005).
Post by Geoff Montee
Thanks,
Geoff Montee
Frediano
Geoff Montee
2014-04-08 18:20:33 UTC
Permalink
Thanks for the insight. That clarifies a lot.

Geoff
Post by Frediano Ziglio
Post by Geoff Montee
I wrote an open source TDS foreign data wrapper for PostgreSQL using your
https://github.com/GeoffMontee/tds_fdw
I mainly wrote it to connect to Sybase databases, but its compatibility
with Microsoft SQL Server is a nice added benefit.
http://www.freetds.org/userguide/choosingtdsprotocol.htm
Userguide on website refer to stable release, we are developing stuff
for mssql 2012 (mssql 2008 R2 have very small changes in the
protocol... mostly nothing!). Keep in mind that client and server
decide together the protocol to use. Actually all server versions
support protocols from 4.2 to protocol specific to the server version
(for instance 7.2 for mssql 2005). As client you can use whatever
protocol server provides.
Post by Geoff Montee
It's missing MS SQL Server 2008 R2, MS SQL Server 2012, and MS SQL Server
2014. I'm curious, does your implementation of DB-Library support these
newer versions of MS SQL Server? I ask because Microsoft's own
http://technet.microsoft.com/en-us/library/aa174484%28v=SQL.80%29.aspx
"While the DB-Library API is still supported in Microsoft SQL Server
2000,
Post by Geoff Montee
no future versions of SQL Server will include the files needed to do
programming work on applications that use this API. Connections from
existing applications written using DB-Library will still be supported in
the next version of SQL Server, but this support will also be dropped in
a
Post by Geoff Montee
future release. When writing new applications, avoid using DB-Library.
When
Post by Geoff Montee
modifying existing applications, you are strongly encouraged to remove
dependencies on DB-Library."
The reason is that Microsoft db-library only support protocol 4.2 (the
protocol introduced by... I think Sybase 4.2 before ms acquired
licences and forked the code! I never worked on such releases, for me
mssql starts with 7.0). Our db-library support newer versions, current
development up to 7.3. Well... in 7.3 (but not on 7.2) MS removed some
information (the text pointer) returning blob (text/image/ntext). This
means that functions relying on this information (mostly to insert
partial blobs) does not work. See for instance results on
freetds.sourceforge.net using protocol 7.3, some tests fail.
So, as long as you don't use text pointers you are safe until MS
remove support for protocol 7.3 (mssql 2008) while if you use text
pointers you are safe until MS remove support for protocol 7.2 (mssql
2005).
Post by Geoff Montee
Thanks,
Geoff Montee
Frediano
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
Loading...