FreeTDS is re-implementation of C libraries originally marketed by Sybase and Microsoft SQL Server. It allows many open source applications such as Perl and PHP (or your own C or C++ program) to connect to Sybase or Microsoft SQL Server.

FreeTDS provides drop-in replacements for

  • Sybase's DB-Library and CT-Library

  • Microsoft's DB-Library (which differs in small details from Sybase's)

  • the ODBC drivers from both vendors

  • interactive SQL and BCP utilities

The "TDS" part of the name comes from name of the protocol used to communicate with such servers: the Tabular Data Stream.

FreeTDS is distributed in source code form, and is expected to compile on just about any operating system. That means every form of Unix® and Unix-like™ system (including notable variants such as Interix® and QNX®), as well as Win32®, VMS®, and OS X®. If it doesn't compile on your system — and you're not using MS-DOS® — it's probably considered a bug.

Background: The TDS Protocol and related APIs

TDS is a protocol, a set of rules describing how to transmit data between two computers. Like any protocol, it defines the types of messages that can be sent, and the order in which they may be sent. Protocols describe the "bits on the wire", how data flow.

In reading this manual, it may be helpful to keep in mind that a protocol is not an API, although the two are related. The server recognizes and speaks a protocol; anything that can send it the correct combination of bytes in the right order can communicate with it. But programmers aren't generally in the business of sending bytes; that's the job of a library. Over the years, there have been a few libraries — each with its own API — that do the work of moving SQL through a TDS pipe. ODBC, DB-Library, and CT-Library have very different APIs, but they're all one to the server, because on the wire they speak TDS.

The TDS protocol was designed and developed by Sybase Inc. for their Sybase SQL Server relational database engine in 1984. The problem Sybase faced then still exists: There was no commonly accepted application-level protocol to transfer data between a database server and its client. To encourage the use of their product, Sybase came up with DB-Library.

DB-Library provided an API to the client program, and communicated with the server. What it sent to the server took the form of a stream of bytes meant for tables of data, a Tabular Data Stream.

In 1990 Sybase entered into a technology sharing agreement with Microsoft which resulted in Microsoft marketing its own SQL Server. Microsoft kept the DB-Library API and added ODBC. (Microsoft has since added other APIs, too. It no longer supports its own DB-Library implementation.) At about the same time, Sybase introduced a more powerful "successor" to DB-Library, called CT-Library, and called the pair OpenClient.

CT-Library, DB-Library, and ODBC are APIs that — however different their programming style may be — all communicate with the server in the same way. The language they use is TDS.

The TDS protocol comes in several flavors, most of which were not openly documented. If anything, it was considered to be something like a trade secret, or at least proprietary technology. The exception is TDS 5.0, used exclusively by Sybase, for which documentation is available from Sybase.

http://www.freetds.org/userguide/what.htm的更多相关文章

  1. linux使用freetds 连接连远程服务器sqlservser2012

    1.下载:freetds-patched.tar.gz  http://www.freetds.org/software.html http://www.freetds.org/userguide/c ...

  2. CentOS 6.8 LAMP 安装配置

    1.远程系统拒绝了连接: 需要关闭防火墙/etc/rc.d/init.d/iptables stop service iptables stop chkconfig iptables off sete ...

  3. ubuntu系统下配置php支持SQLServer数据库

    最近在做一个项目,该项目的数据库是微软公司的的SQLserver ,数据库安装在另一台windows服务器上,而项目却部署在ubuntu server上.那么这样就会涉及到项目在linux上如何链接S ...

  4. 一次php访问sql server 2008的API接口的采坑

    2018年6月21日17:17:09,注意:不是详细文档,新手可能会看不懂 windows下安装 项目是sql server 2008的k3,php连接数据库写的API,因为是买的时候是别人的程序,测 ...

  5. ubuntu php 连接sql server

    1.下载最新的freetds ,访问 http://www.freetds.org/, 或者在 ubuntu上用 wget ftp://ftp.freetds.org/pub/freetds/stab ...

  6. Ubuntu系统下配置PHP支持SQLServer 2005

    最近在做一个项目,该项目的数据库是微软公司的的SQLserver ,数据库安装在另一台windows服务器上,而项目却部署在ubuntu server上.那么这样就会涉及到项目在linux上如何链接S ...

  7. pymssql.connect(server='.', user='', password='', database='', timeout=0, login_timeout=60, charset='UTF-8', as_dict=False, host='', appname=None, port='1433', conn_properties, autocommit=False, tds_

    http://pymssql.org/en/stable/ref/pymssql.html """ This is an effort to convert the py ...

  8. 在MacOS下使用sqlalchemy 连接sqlserver2012 数据库

    在MacOS下使用sqlalchemy 连接sqlserver 数据库 前言 最近有要求,要将数据库换成巨硬家的sqlserver 2012 因为在网上苦苦找不到sqlalchemy 配置连接SqlS ...

  9. linux lazarus 连接mssqlserver

    1 . 从https://www.freetds.org/ 下载驱动源文件 2. 参照 https://www.freetds.org/userguide/config.htm 内容编译 3. 启动l ...

随机推荐

  1. Python-接口自动化(十一)

    配置文件的作用(十一) (十二)配置文件 1.python当中有一个模块可以读取配置文件里面的信息:configparser,对这个模块进行导入之后就可以使用了,import configparser ...

  2. 教你轻松在React Native中集成统计(umeng)的功能(最新版)

    关于在react-native中快速集成umeng统计,网上的文章或者教程基本来自----贾鹏辉老师的文章http://www.devio.org/2017/09/03/React-Native-In ...

  3. 未能加载文件或程序集“System.ServiceModel, Version=2.0.5.0, ...”解决方法

    未能加载文件或程序集“System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它 ...

  4. UVALive 7148 LRIP

    LRIPTime Limit: 10000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu 解题:树分治 参考了Oyking大神的解法 ...

  5. PHP中的字符串替换(str_replace)

    /*替换 字符串处理  str_replace() */ $num = 0; $str = "http://www.phpbrother.net/php/demo.php";$st ...

  6. [转]Fedora 添加国内源(sohu, 163)

    第一种方案 在国内163和搜狐提供很好的源,现在我们把它们俩添加到我们的源库.1. 添加搜狐的源 进入网站http://mirrors.sohu.com/,在左边找到fedora目录,点击该行右边的h ...

  7. python学习之-- Mysql 基础知识

    数据库介绍及MYSQL基础操作了解 关系型数据库(RDBMS)是按照数据结构来组织,存储和管理数据的仓库.特点:1:数据以表格的形式出现2:每行为各种记录名称3:每列为记录名称所对应的数据域4:许多的 ...

  8. SGU 106 The equation【扩展欧几里得】

    先放一张搞笑图.. 我一直wa2,这位不认识的大神一直wa9...这样搞笑的局面持续了一个晚上...最后各wa了10发才A... 题目链接: http://acm.hust.edu.cn/vjudge ...

  9. T1992 聚会 codevs

    http://codevs.cn/problem/1992/  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 黄金 Gold 题目描述 Description 小S 想要从某地 ...

  10. 编写一个删除c语言程序文件中所有的注释语句

    //删除c语言程序中所有的注释语句,要正确处理带引号的字符串与字符串常量 #include <stdio.h> using namespace std; #define MAXLINE 1 ...