[转]Choosing a TDS protocol version

转自http://www.freetds.org/userguide/choosingtdsprotocol.htm#TAB.PROTOCOL.BY.PRODUCT

Choosing a TDS protocol version

The TDS protocol version is probably something you'd rather not know even existed, much less something you'd have to choose. But there's not that much to it, really. Unless you run into an incompatibility, you're best off running with the highest protocol version supported by your server. That's what the vendors' own products do, which is why when you read the Sybase or Microsoft documentation you find no mention of TDS versions.

Table 3-1. Versions of the TDS Protocol, by Product

ProductTDS VersionComment
Sybase before System 10, Microsoft SQL Server 6.x4.2Still works with all products, subject to its limitations.
Sybase System 10 and above5.0Still the most current protocol used by Sybase.
Sybase System SQL Anywhere5.0 onlyOriginally Watcom SQL Server, a completely separate codebase. Our best information is that SQL Anywhere first supported TDS in version 5.5.03 using the OpenServer Gateway (OSG), and native TDS 5.0 support arrived with version 6.0.
Microsoft SQL Server 7.07.0Includes support for the extended datatypes in SQL Server 7.0 (such as char/varcharfields of more than 255 characters), and support for Unicode.
Microsoft SQL Server 20007.1Include support for bigint (64 bit integers), variant and collation on all fields. Collation is not widely used.
Microsoft SQL Server 20057.2Includes support for varchar(max), varbinary(max), xml datatypes and MARS[a].
Microsoft SQL Server 20087.2 (unchanged) 
Notes:
a. Multiple Active Result SetsFreeTDS does not support MARS.

For best results, use the highest version of the protocol supported by your server. If you encounter problems, try a lower version. If that works, though, please report it to the mailing list! [1]

TDS 4.2 has limitations

  • ASCII only, of course.

  • RPC is not supported.

  • BCP is not supported.

  • varchar fields are limited to 255 characters. If your table defines longer fields, they'll be truncated.

  • dynamic queries (also called prepared statements) are not supported.

The protocol version may also affect how database servers interpret commands. For example, Microsoft SQL Server 2000 is known to behave differently with versions 4.2 and 7.0. Version 7.0 is recommended for compatibility with SQL Server tools.

Notes

[1]

Want to help? Try out the auto-protocol feature. FreeTDS has experimental support for iteratively trying protocol connections until it finds one the server accepts. This is suitable when query responses are non-trivial (because the tiny delay in connecting is thus insignificant). Try setting your TDS version to 0 and report your results.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值