eaiovnaovbqoebvqoeavibavo PKsiZ#+z+z freetds/ea-freetds-1.4.9/NEWS.mdnu[$Id: 4d8b89247d1fb609bbe1761c3c1a430b125e76ba $ Summary of Changes in release 1.4 -------------------------------------------- User visible (not in a particular order): - Fix some numeric conversion checks; - Always use Unicode for SSPI allowing not ASCII to work; - Improve BCP copy, especially for Sybase; - Better error reporting for ICONV failures; - Disable TLSv1 by default; - ODBC: partial TVP support (missing data at execution); - ODBC: support for quoted string in connection string; - CT-Library: support large identifiers; - CT-Library: report appropriate severity values; - apps: datacopy report errors on standard error; - pool: use poll instead of select to support more connections. Implementation: - Use more bool type for boolean instead of integer; - more macros for ODBC tests to encapsulate some ODBC API. Summary of Changes in release 1.3 -------------------------------------------- User visible (not in a particular order): - Generic: - Support UTF-8 columns using MSSQL 2019; - Do not accept TDS protocol versions "4.6" (never really supported) and "8.0"; - Minor portability issues; - Fix log elision for login; - Detect some possible minor memory failure in application; - Support long (more than 64k) SSPI packets (never encountered but you never know); - Fix unicode columns for ASA database; - Avoid using BCP with old protocols; - (\*) Fix bulk copy using big endian machines; - (\*) Fix Sybase uni(var)char and unsigned types for big endian machines; - (\*) Do not send nullable data during bulk copy if type is not nullable; - ODBC: - Added "Timeout" setting; - Applications: - Improve defncopy utility: - Fix some declaration; - Fix Sybase support; - (\*) Fix datacopy and freebcp logging ; - CT-Library: - Minor fix for variant type; - Better support for timeout setting; - (\*) Support some missing types (like nullable unsigned integers) for Sybase; - DB-library: - Unify date format (all systems can use the same syntax); - (\*) Allows to pass 0 as type for bcp_bind; - (\*) Fix DBSETLSERVERPRINCIPAL macro; - (\*) Do not limit queries length for bcp using Sybase; - (\*) Add KEEP_NULLS to BCP hints. (\*) Feature backported in stable 1.2 branch. Implementation: - Move replacement headers under freetds directory for coherence with other internal headers; - Lot of style updates; - Optimize UTF-8 encoding for ODBC, reuse common code. Summary of Changes in release 1.2 -------------------------------------------- User visible (not in a particular order): - Sybase server: - All strings are now converted as MSSQL; - Support kerberos login; - DB-Library: add DBSETNETWORKAUTH, DBSETMUTUALAUTH, DBSETDELEGATION and DBSETSERVERPRINCIPAL; - CT-Library: add CS_SEC_NETWORKAUTH, CS_SEC_NETWORKAUTH, CS_SEC_NETWORKAUTH and CS_SEC_NETWORKAUTH; - Bulk copies: - DB-Library: fix trim of unicode fields; - (\*) Apply character conversion for Sybase, like MSSQL; - (\*) Ignore computed columns; - (\*) Properly support multibyte strings in column names; - (\*) DB-Library: stop correctly on BCPMAXERRS setting; - (\*) DB-Library: do not try to convert skipped rows reading file allowing for instance to load CVS files; - (\*) CT-Library: added CS_DATABASE property to allows to connect correctly to Azure servers; - (\*) Improve support for MS XML columns for both DB-Library and CT-Library; - (\*) Fix some issues with MSSQL server redirection (used for instance in Azure); - (\*) Change SQL_DESC_OCTET_LENGTH value for wise character columns; - Better support for SQL_VARIANT: - Better column checks; - (\*) CT-Library: now supported, columns are returned as CS_CHAR_TYPE; - Some updates to server part: - Set correctly initial state; - IPv6 support; - Fix TDS 7.2 logins; - Support extended character using domain logins under Unix; - Improve MARS: - Less memory copies; - (\*) Remove possible deadlock; - Handle wrapping sequence/window numbers; - Make sure we sent the wanted packet; - (\*) Support UTF-16 surrogate pairs in odbc_wide2utf and odbc_set_string_flag fixing some character encoding support; - (\*) Fix multiple queries, used by ODBC to optimize data load; - (\*) Improve emulated parameter queries, fixing minor issues and reducing memory usage; - Support DBVERSION_UNKNOWN in dbsetlversion (will use automatic detection); - CT-Library: define CS_MIN_SYBTYPE and CS_MAX_SYBTYPE; - (\*) CT-Library: fix cs_will_convert accepting library constants, not libTDS. (\*) Feature backported in stable 1.1 branch. Implementation: - User guide converted to XML; - Always use little endian on network level, simpler and faster; - Converted some files to markdown; - Optimize bytes endianess conversion; - Made character lookup faster making character conversion quicker; - Optimize data padding in CT-Library; - Fix some build dependencies causing some files to not be properly recompiled during development; - Add "freeze" support allowing to pause sending in order to simplify lengths computations sending data. Summary of Changes in release 1.1 -------------------------------------------- User visible (not in a particular order): - Changed default TDS protocol version during configure to "auto". Versions 4.2 and 7.0 are no longer accepted for default, you may still specify an explicit version to connect to obsolete servers ("auto" won't attempt these versions); - allows to disable TLS 1.0 support; - pool server allows to specify different username/password for server and clients allowing to hide internal server logins; - tsql utility now send final partial query to server to avoid to have to specify a final "GO" line to terminate commands; - better support for Microsoft cluster, client will attempt multiple connection to server at the same time if DNS reply multiple IPs; - MONEY/SMALLMONEY types are now formated with 4 decimal digits to avoid truncation; - MARS support is now compiled by default; - pool server is now compiled by default; - Fixed SQL_ATTR_LOGIN_TIMEOUT for ODBC; - Fixed large integer numbers for ODBC RPC constants; - Fixed encrypted logins if "auto" protocol version is used; - Support CS_TIMEOUT, CS_LOGIN_TIMEOUT and CS_CLIENTCHARSET properties under CTLibrary; - Added a dbacolname function in DBLibrary, similar to dbcolname but for compute columns (mainly for Sybase now, Microsoft removed support for compute columns); - NTLMv2 is now on by default. Implementation: - Improved UTF-8 performances; - Use more stdint.h style definitions (like uint32_t); - Use bool type instead of int; - pool server compile under Windows too (not as capable as Unix version); - CMake build is now able to do an installation; - Added a src/utils directory to collect all common code not strictly related to replacements or TDS; - Simplified makefiles; - Support CP1252 encoding in internal trivial iconv; - Better ODBC detection. Allows to specify a directory with --with-iodbc to specify custom iOBDC. Summary of Changes in release 1.0 -------------------------------------------- User visible (not in a particular order): - Removed "8.0" from protocol version string accepted. Please update configuration files; - Default protocol version is now auto. This could slow down connection but make user experience less painful; - Sybase encrypted login. Set encryption to get it; - Support protocol version 7.4; - Add intent support to specify we don't want to change data; - Allow to attach database file during the login (MS SQL Server); - Support for Sybase time/date/bigdate/bigdatetime; - Pool is working again; - ODBC BCP (not complete); - Improved dbconvert and dbconvert_ps (more compatible); - Fixed dbspid; - Improved ODBC type information; - Better certificate verification; - AppVeyor is used for every build; - Try all IPs from DNS. This allows SQL Cluster connection to secondary servers. Implementation: - Removed Nmake support; - Type conversions simplified; - Better type handle code. Summary of Changes in release 0.95 -------------------------------------------- User visible (not in a particular order): - Support for build with CMake under Windows. - Support MSSQL 2008: - new date/time types; - NBCROWs; - able to retrieve CLR UDT types in binary format. - Moved from CVS to git. - Support MARS under ODBC. - IPv6 support. - Support unsigned Sybase types. - Sybase use some characters conversion like MSSQL. - Bulk-copy improvements: - more types; - support for empty fields; - no needs for seekable file; - avoid possible buffer overflows; - less memory consumption; - handle different BIT fields in Sybase; - -T option for datacopy. - datacopy: - prompting for password (use "-" password on command line); - empty user/password (to use Kerberos). - Support for query notifications in ODBC. - Support for protocols 7.2 and 7.3 under dblib and ctlib. - dblib: - dbpivot extension; - dbprcollen extension to get printable column size; - add DBCOL2 structure for dbtablecolinfo; - support DBTEXTSIZE option for dbsetopt; - support SRCNUMERICBIND and SRCDECIMALBIND binding; - DATETIME2BIND extension binding to support new mssql 2008 type; - ODBC: - add SQL_INFO_FREETDS_TDS_VERSION option to SQLGetInfo to retrieve FreeTDS version; - add --enable-odbc-wide-tests configure option to use wide functions in unit tests. - Better thread support. - Allow to specify server SPN for GSSAPI. - Sybase graceful disconnects. - Better support for VARCHAR(MAX)/VARBINARY(MAX). - Better error reporting from login failure. - More strict test for configuration errors, fails if configuration is wrong. - "use utf-16" option to enable use of UTF-16 for server encoding (MSSQL). - Remove support for Dev-C++. - Remove support for bad iconv, use libiconv instead (Tru64 and HP-UX should be affected), connect will fail. - New NTLM options: - "use lanman"; - "use ntlmv2". - New Kerberos options: - "realm" ("REALM" in ODBC); - "spn" ("ServerSPN" in ODBC). - New certificate options: - "ca file"; - "crl file"; - "check certificate hostname". - Many bug fixes, majors: - SSPI with Kerberos on some setup; - SQLCancel threading; - ctlib numeric; - ODBC statistic function quotings. Implementation: - Introdude streams support to make easier handling large data and making conversions faster. - Use array of flags to make faster to retrieve data type features. - Use callbacks for handling various type functions. - Optimize data conversions. - Store TDS packets in a new structure to handle multiple packets. - New DSTR implementation which use less memory. - Faster logging. - Put mostly data handling in src/tds/data.c. - Move mostly headers to include/freetds directory. - Add a include/freetds/proto.h header to separate protocol declarations. - Add src/tds/packet.c to separate code handling TDS packets. - Modify libTDS error codes, not only TDS_FAIL. - Use DSTR for names in TDSCOLUMN. - Generate graphs in Doxygen. Summary of Changes in release 0.91 -------------------------------------------- 1. Full Kerberos and SSPI support for passwordless login to Microsoft SQL Server from Unix and Windows clients. Includes Kerberos delegation option. 2. Full support for DB-Library under Win32/64 via NMAKE.EXE. 3. Built-in support for UTF-8. 4. Support for wide characters in ODBC. 5. Support for varchar(max) and varbinary(max). 6. Better thread-safety in ODBC. 7. Distinguish between connect and login errors. 8. Bulk-copy functions in CT-Library. TDS versions now reflect Microsoft's nomenclature. The previous version numbers (8.0 and 9.0) are now 7.1 and 7.2. See the UG for details. Executive Summary of Changes in release 0.82 -------------------------------------------- 1. timeout handling 2. encrypted connections 3. fisql (and odbc utilities) 4. autoconf improvements 5. 23,710 lines added or deleted (101,022 total). 6. 85 files added 7. 21 unit tests added Details ------- db-lib - timeouts work! - corrected dbnextrow - implemented dbsetnull and dbsetinterrupt - improved error reporting and checking - fixed rpc parameter processing, now php works correctly ct-lib - added cs_loc_alloc, cs_loc_drop, cs_locale implementations odbc - cursors (mssql) - fixed database setting - return error always if odbc returns SQL_ERROR - fixed SQLGetData result utilities - added support for NUL characters inside terminators in freebcp - added row termination and column termination option to tsql - new fisql application - new ODBC utilities documentation - significant updates to TDS protocol documentation - freetds.conf man page - added tenderfoot sample code general - fixed timeout handling - added freetds.conf option for encryption - added protocol version discovery - NTLM2 session response - read table and real column name from wire - experimental Kerberos support using gssapi - some optimizations for GCC4 - optimized conversions avoiding some memory copy - minor improves to server stuff - improved MingW compile (even cross one) - more verbose log for dblib and odbc - many test added 1 test for libTDS 1 test for ctlib 3 tests for dblib 13 tests for odbc libTDS API changes - tds_add_row_column_size removed - tds_alloc_row return now TDS_SUCCEED/TDS_FAIL - tds_alloc_compute_row return now TDS_SUCCEED/TDS_FAIL - removed TDSCOLUMN->column_offset - added TDSCOLUMN->column_data and TDSCOLUMN->column_data_free - added TDSCURSOR->type and TDSCURSOR->concurrency for mssql support - added fetch_type and i_row parameters to tds_cursor_fetch - added tds_cursor_update and tds_cursor_setname functions - made tds_alloc_get_string static - removed tds_free_cursor - added TDSCURSOR->ref_count - added tds_cursor_deallocated and tds_release_cursor to handle cursor release. tds_cursor_deallocated is called when cursor got deallocated from server while tds_release_cursor is called to decrement reference counter. Reference counter is used cause is difficult to trace pointer owner between libTDS and upper libraries - added TDS_COMPILETIME_SETTINGS->sysconfdir - changed DSTR_STRUCT structure to include dstr_size - changed DSTR type - error handler cannot return TDS_INT_EXIT - removed TDSSOCKET->query_timeout_func TDSSOCKET->query_timeout_param, TDSSOCKET->query_start_time - changed TDSLOGIN->host_name to client_host_name - changed TDSCONNECTION->host_name to client_host_name - changed TDSLOGIN->encrypted to encryption_level - changed TDSCONNECTION->encrypted to encryption_level - added TDSRESULTINFO->row_free handler to free row - added TDSCONTEXT->int_handler handler - removed tds_prtype - removed tds_alloc_param_row - added tds_alloc_param_data - added flags parameter to tds7_send_auth - removed tds_client_msg - added tdserror to report error - added flags parameter to tds_answer_challenge - added is_variable_type macro - added TDSCOLUMN->table_column_name - added tds parameter to tds_set_column_type - renamed BCPCOLDATA->null_column to is_null - added TDSMESSAGE->oserr - remove length, number_upd_cols and cur_col_list from TDSCURSOR (never used) - added new TDSAUTHENTICATION to handle authentication modules - added TDSSOCKET->authentication - added tds_ntlm_get_auth and tds_gss_get_auth - removed TDSANSWER - removed tds7_send_auth (use new tds_ntlm_get_auth) - added tds_get_int8 - add TDSPARAMINFO *params argument to tds_cursor_declare - add TDSPARAMINFO *params argument to tds_cursor_open - changed TDSSOCKET->rows_affected from int to TDS_INT8 - added TDSSOCKET->tds9_transaction (used internally for TDS9) - added TDSCONNECTION->server_host_name needed for Kerberos support * 0.64 - core library - reduced network bandwidth use on Linux and *BSD - do not free TDSSOCKET in tds_connect - moved network stuff into net.c - fixed conversion NUMERIC->NUMERIC changing precision/scale - added named instance support (mssql2k) - fixed cancel and timeout - added support for encrypted connection using mssql (using either GnuTLS or OpenSSL) - improved numeric conversions performance - improved debug logging (added "debug flags" option) - ctlib - ct_dynamic and friends (placeholder support) - dblib - more functions - made threadsafe - improved bcp - support for large files using BCP - fixed buffering - ODBC - fixed compute handling in ODBC - paramset support - constant parameters in rpc (ie {?=call func(10,?)} ) - configure use automatically odbc_config if available - compatibility - improve PHP support - improve DBD::ODBC support - partial dos32 support - improve JDBC support - added msvc6 project to build dblib library on windows - support long password on tsql for all platforms - improved pool server - RPMs - ODBC driver registration (in odbcinst.ini) - better dependency for RedHat and SUSE - a lot of fixes libTDS API changes - tds_connect does not free TDSSOCKET* on failure - TDSSOCKET->env is not a pointer anymore - tds_free_compute_result and tds_free_compute_results are now static - added TDSDYNAMIC->next for linked list - removed TDSCURSOR->client_cursor_id - use TDSCURSOR* cursor instead of TDS_INT client_cursor_it in tds_cursor_* functions - added const char* file param to tdsdump_dump_buf and tdsdump_log and added line information in level - changed tds_alloc_compute_results declaration, pass a TDSSOCKET* - removed tds_do_until_done (not used) - removed tds_set_longquery_handler function (not used) - changed some fields in TDSSOCKET - removed out_len (not used) - renamed cursor to cursors - removed client_cursor_id - added cur_cursor (instead of removed client_cursor_id) - dyns now a pointer to a pointer to first dynamic allocated - removed num_dyns (now useless with linked list) - removed chkintr and hndlintr (use longquery_*) - removed longquery_timeout (use query_timeout) - renamed longquery_func to query_timeout_func - renamed longquery_param to query_timeout_param - queryStarttime to query_start_time - add a DSTR instance_name to TDSCONNECTION - add tds7_get_instance_port - removed tds_free_all_dynamic - tdsdump_append now static - new tds_process_tokens to replace removed - tds_process_result_tokens - tds_process_row_tokens - tds_process_row_tokens_ct - tds_process_trailing_tokens - removed tds_ctx_set_parent/tds_ctx_get_parent, use parent member - added void * parent argument to tds_alloc_context - tds_process_tokens return a TDS_CANCELLED if handle cancellation - removed query_timeout_func and query_timeout_param from TDSCONNECTION and TDSLOGIN - add tds_free_row - renamed TDSLOCALE->char_set to server_charset * 0.63 - ODBC: use tds_dstr* functions to store descriptor information - header privatizations (removing tds.h dependency). This is quite important for future binary compatibility. - ODBC: SQLFetch returns error correctly - ODBC: fix problem rebinding parameters - ODBC: ability to fetch data types after prepare (needed for Oracle bindings and OTL library). - Builds cleanly under OS X. - Improved BCP support for NULL fields and native file format. - ct-lib: ct_blk support (bcp for ct-lib). - ct-lib: Cursors! - apps: added bsqldb and defncopy. - iconv: better collation support, e.g. SQL_Scandinavian_CP850_CI_AS * 0.62 - ct-lib: cursor support - fixed PHP problem handling empty recordsets. See messages on ML: Damian Kramer, September 23, "Possible bug in freeTDS" Steve Hanselman, September 16 "Issue with freetds 0.61.2 ..." - ODBC: improved, best error report - ct-lib: support ct_diag (for Python) - ODBC: fixed SQLMoreResults/SQLRowCount and batch behavior - ODBC: fixes call to {?=store(?)} - ODBC: multiple record with "select id,name from sysobjects where name = 'sysobjects'" - ODBC: fixed early binding - ODBC: autodetect iODBC or unixODBC during configure - ODBC: implemented option 109 in SQLGetConnectOption (for OpenOffice) - freebcp understand \n as newline. Also \r and \0 (null byte). - added --without-libiconv configure option to switch off iconv library - ODBC: test and fixes for NUMERIC parameter - ODBC: dynamic query - SQLPutData - Sybase and blobs ported code for string building from ODBC to libtds - extended TDSSOCKET::iconv_info as an array. Keep converters for non-UCS-2 server charsets. Every TDSCOLINFO holding character data should point to one of these elements. - dblib: src/dblib/unittests/t0017.c (bcp) fixed - changed tds_get_char_data(), ML 2 May 2003, "tds_get_char_data and iconv". - rewrote tds_iconv: - use iconv() signature. - rely on TDSCOLINFO::iconv_info for conversion descriptor, instead of inferring it from the column sizes. - on read error, emit Msg 2403, Severity 16 (EX_INFO): "WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?')." - on write error emit Msg 2402, Severity 16 (EX_USER): "Error converting client characters into server's character set. Some character(s) could not be converted." and return an error code. Do not proceed. - Cf. ML 16 Apr 2003. "conversion error management". - added doxygen to the nightly build - "make install" put the UG in PREFIX/share/doc/freetds/userguide - "make install" put doxygen html in PREFIX/share/doc/freetds/reference - moved website docs (not UG) to doc/htdoc, put in CVS - added bcp support to tds/dblib/ctlib. (started in dblib) - RPC stuff - added support for TDS 8.0 - TDS 7 Unicode to native charset conversion using iconv - autoconf the connection pooling stuff - DBLIB: output params - set database during login process - libtds: dynamic query - ctlib: null returns zero-length string (see "SELECT '' and TDS 7.0" in message list on 26 Jan 2003) * Jan 2003 - Version 0.61 - Dynamic SQL - Output parameters - Compute rows - Varbinary support - dsn-less ODBC connections - RPC support (db-lib) - Compatibility with DBD::Sybase 0.95 - 68 new functions! (see doc/api_status.txt) - Error/message handling rewritten, uses real error numbers - new sample programs - much cleaner code, warning-free compiles - namespace cleanup - public domain versions of functions for OSs that lack them - autoconf portability improvements - builds in HP-UX, Win32, and cygwin - No dependency on OpenSSL * Sep 2002 - Version 0.60 - Support for SQL Server 2000 datatypes and domain logins. - Support and convertibility of all major datatypes. - Much expanded coverage of the ODBC API. - An all-new BCP implementation, including host variable support. - Character set conversions, via the iconv library. - Threadsafe operation. * [late 2001?] - tdspool now working for big endian systems - Fixed mem leak in ctlib - Added some descriptive text to the PWD file - EINTR handling during login (Kostya Ivanov) - Added support for TLI style interfaces files (thanks Michael for explaining) - Added 'text size' config option which changes textsize on connect - Added preliminary TDS 8.0 support (no new datatypes supported though) - Added 'emulate little endian' config flag - Some TDS5 placeholder stuff. Not ready for primetime yet. - Fixed interfaces handling seg fault * Jul 2001 Brian Bruns - Version 0.52 - Mem leak fixes in dbloginfree() and tds_free_env() (John Dumas) - Added support for new configuration format (freetds.conf) - unixODBC now working - Fixed error in two's complement function for money types - Added support for nullable bits (BITN) - checked in work on tds connection pooling server - added preliminary userguide (James Lowden and me) - a lot of work on ODBC driver, now works with PHP - added config options for iodbc/unixodbc (unixODBC doesn't actually work yet) - image -> char now works (verified with ctlib only) - varbinary -> char now works with destlen of -1 - New config routines - Free socket on login fail - 64bit patches - off by one error - numeric problem with 7.0 fixed - digit cutoff on numerics/floats fixed * Nov 2000 Brian Bruns - Version 0.51 - removed all the old unittests from the samples directory - endian detection fixed - 'make check' and ctlib unittests (Mark) - TDS 7.0 fixes, numerics et al. (Scott) - dead connection handling (Geoff) - query timeout stuff (Jeff) * Dec 1999 Brian Bruns - Version 0.50 - Added TDS 7.0 support for MS SQL 7 - Added hostfile bulk copy for dblib - Added writetext support for dblib - Added CS_CON_STATUS property to ctlib - Fixed bugs for ctlib version of PHP 3/4 - Many changes to text/image handling - New script for running the unittests - dbcancel/ct_cancel now working properly - inserts/updates now return proper rowcount - Numerous bug fixes * Sep 1999 Brian Bruns - Version 0.47 - Added workaround for SQL 7.0 bug handling datetime/money for big endian (testing/bug report - Paul Schaap) - Added TDS 7.0 login function (untested) - Fixed many big endian bugs - Fixed some bus errors on Sparc - Fixed big endian detection - DBD::Sybase 0.19 now passes all tests - Fixed date bug working with PHP 3.x - binary/varbinary support added - Fixed Text datatypes in tds layer - More conversions implemented (Mark Schaal) - Fix make install for not overwriting interfaces (Michael Peppler) - CS_USERDATA now works - Numerous bug fixes (many people) * Thu Aug xx 1999 Brian Bruns - Version 0.46 - Fixed floating type support - Fixed lots of little datatype conversion bugs - Fixed 5.0 login acknowledgement bug - Message processing was cleaned up (Mark Schaal) - Fixed login bug for SQL Server 7.0 - DBD::Sybase 0.19 now compiles and partially works (very partially) - Fixed Solaris #define clash - Numerous bug fixes * Thu Jun 03 1999 Brian Bruns - Version 0.45 - Capabilities added to ctlib code - Numeric support working - MONEY to string conversions now support > 32 bit values - Fixed underread in message handling - Fixed various buffer overflow problems - Fixed NULL handling - Added support for length binding (copied arguement to ct_bind) - Converted ODBC to use iODBC driver manager - SQSH 1.7 runs - PHP 3.0.x with ctlib now runs * Thu Jan 14 1999 Brian Bruns - Version 0.41 - Better row buffering (Craig Spannring) - CT-Lib code improved greatly - Closer behaviour to real dblib - Commonized datatype conversions - Server side code is running somewhat. - SQSH 1.6 running - More ODBC functionality - Many bug fixes - Lots of other stuff I've already forgotten * Sun Nov 22 1998 Brian Bruns - Version 0.40 - Row buffering is now supported for dblib. - Better row handling (side effect of above) - Improved conversion code - Preliminary ODBC layer - PHP now runs basic scripts, maybe more - Many many bug fixes - General cleanup (better error handling, C++ friendly headers, etc...) * Fri Sep 04 1998 Mihai Ibanescu - Version 0.31 - By default the install dir is /usr/local/freetds - The Makefile in the samples dir is automatically built from Makefile.am. The samples dir is not installed, only packaged in the distribution. * Wed Sep 02 1998 Brian Bruns - Version 0.3 - Updated the AUTHORS file - FIXME Brian (added by misa) * Mon Aug 31 1998 Mihai Ibanescu - Version 0.21 - GNUified - Fixed a couple of the TODO issues: byte order is automatically determined, and the TDS version is a configurable option - Modified the README file to reflect the new directory structure Pre-GNUification log by Brian : 2/8/98 Should be able to send the first packet to a server soon, my output is only slightly different than open clients. This codes pretty crappy right now. I need to clean up alot of stuff, remove hardcode values, etc...but I'm anxious to see something work! 2/7/98 Broke the code up a bit, tds.c now handles all wire level stuff, dblib.c handles dblib specific stuff. So, in the future there can be ctlib.c and obdc.c can also sit on top of tds.c to handle the other CLIs 3/16/98 Been working on the code here and there...We can now send a query to the server, dbnumcols() and dbcolname() both work. Almost ready to get some data back. I put in a dummy dbbind to just handle strings so, I could do some work on dbnextrow(). However, we will have revisit almost everything later. 3/23/98 Haven't been able to work on it lately. Still trying to decide on the best way to propagate the row data from tds.c to dblib.c to the calling func. Not that hard, but nothing strikes me as the "Right Way" (tm). 4/2/98 Ok we are ready to release 0.01 (marked by the fact that a simple dblib program actually works!) 5/1/98 Haven't updated in quite a while. A few more dblib commands are supported. dbconvert() support is preliminary. Fixed alot of bugs. A little bit of cleanup. dbbind() sorta works now, needs work still. At least one mem leak that I know of (haven't gotten around to fixing it. Wish I had more time to work on it... 5/2/98 Decided to release what I have. executing sp_who seems to mostly work.. a step in the right direction. Version 0.02. Seem to have generated a little interest after mentioning it in a usenet post. 5/6/98 Can compile against sqsh!!! Did a reorg on tds.c, all dblib func that read data now go through tds_process_messages() which read the marker and calls other routines as necessary. sqsh's output is a little screwy (well I don't have a real dbprrow() yet, but the number of result sets coming back is too many). So, anyway Version 0.04 5/9/98 Decided to upload some new code, mostly just stubs. Sybperl compiles I can't get my perl to work with it. (I need to download perl and link statically, the one that comes on the system won't do). Anyway, most of dblib is present in stub form. 5/17/98 Managed to scrape up some time and release new code. Duplicate result sets went away, and handling of more datatypes (money, bit, more int stuff). Also, improved dbprhead()/row() function. 5/26/98 Ok, I'm doing the long overdue cleaning up of the code. All the kludges should be gone. Thanks, to everyone who contributed code/idea/corrections. 6/3/98 The majority of the overhaul is done...still some work to do, but this is much better than before. I'm bumping the version to 0.1 signifying that I actually use sqsh compiled against it on a regular basis. 6/5/98 TDS 4.2 support seems to be working properly 6/26/98 Gregg Jenson has added support for err and msg handling among other things. I've added some prelimary ctlib support (nothing working yet) 7/3/98 I think we are about ready to release 0.2. Gregg sent some datetime code which appears to work great. I added TDS 4.6 support (small changes really) and tested all the byte order issues on an RS/6000. Also, ctlib code will run the unittest.c and will compile all modules in sqsh 1.6, however there are many missing functions before it will link! 7/10/98 Haven't been able to work on it lately (moved this week). Anyway, trying to add some functions to server. 7/13/98 Tom Poindexter made some changes to get sybtcl to work. 8/8/98 Haven't had much time lately (again), however some small stuff has been fixed and the protocol version stuff has (mostly) been moved to a runtime option. sybperl is supposedly running for simple stuff. PKsiZ-&&%freetds/ea-freetds-1.4.9/tds_ssl.htmlnu[ SSL and TDS

How to enable encryption on MSSQL

Under Linux (or any system that have openssl)

# create a file containing key and self-signed certificate
openssl req \
  -x509 -nodes -days 365 \
  -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

# export mycert.pem as PKCS#12 file, mycert.pfx
openssl pkcs12 -export \
  -out mycert.pfx -in mycert.pem \
  -name "My Certificate"

So we created a mycert.pfx certificate ready to be imported

Under Windows

Open MMC and add certificates snap-in, add our certificate under personal and under ca root (to validate it)

Add to the registry the thumbprint of our certificato so to be used by mssql. For examples

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\SuperSocketNetLib]
"Certificate"=hex:DD,5F,6C,EE,47,8E,0C,C0,74,8B,C4,71,8D,87,1C,E6,07,20,F2,28

Restart MSSQL

Check event viewer for results

Encryption protocol

Prelogin packet (tds 7.1 only)

>From client to server

00000000  12 01 00 34 00 00 00 00  00 00 15 00 06 01 00 1b ...4.... ........
00000010  00 01 02 00 1c 00 0c 03  00 28 00 04 ff 08 00 01 ........ .(......
00000020  55 00 00 01 4d 53 53 51  4c 53 65 72 76 65 72 00 U...MSSQ LServer.
00000030  38 09 00 00                                      8...
HeaderDescriptionValue
00 00 15 00 06 netlib version (0) start from 0x15 length 0x06 8.341.0
01 00 1b 00 01 encrypt flag (1) start from 0x1b length 0x01 1, see below
02 00 1c 00 0c instance name (2) start from 0x1c length 0x0c "MSSQLServer\0" (as you note string is null terminated)
03 00 28 00 04 process id (3) start from 0x28 length 0x04 0x938 (why in little endian ??)
ff end  

Meaning of encryption flag (client):

  • 0x00 normal
  • 0x01 high encryption (128 bit ??)

MSSQL 2005 have 9.0.0 as a version and have a single byte option 4 (always seen as zero, I don't know the meaning).

>From server to client

00000000  04 01 00 25 00 00 01 00  00 00 15 00 06 01 00 1b ...%.... ........
00000010  00 01 02 00 1c 00 01 03  00 1d 00 00 ff 08 00 02 ........ ........
00000020  f8 00 00 01 00     

Similar
HeaderDescriptionValue
00 00 15 00 06 version (0) start from 0x15 length 0x06 8.0.760.0
01 00 1b 00 01 encrypt flag (1) start from 0x1b length 0x01 1, see below
02 00 1c 00 01 instance name (2) start from 0x1c length 0x01 "\0" (still null terminatted)
03 00 1d 00 00 process id (3) start from 0x1d length 0x0 no info
ff end  

Meaning of encryption flag (server):

  • 0x02, no certificate, no encryption required just do normal jobs (like FreeTDS)
  • 0x00, certificate, no force flag on server, prelogin to see certificate (TLS 1.0, not SSL 2 or 3 !!) login encrypted, after login do normal TDS (not encrypted)
  • 0x01, certificate, high encryption required by client prelogin to see certificate login encrypted, after login changed crypt (my client close connection perhaps a configuration problem...)
  • 0x03, certificate enabled, force encryption configured on server prelogin like 0x00, remains in SSL after login

Note that mssql2k unpatched do not set last packet flag (byte 2) for this packet.

Following a valid encrypted connection (0x00 from server, no force)

>From client to server

00000034  12 01 00 46 00 00 00 00  16 03 01 00 39 01 00 00 ...F.... ....9...
00000044  35 03 01 41 b9 5e 02 f8  7d 45 81 31 d9 73 9e 93 5..A.^.. }E.1.s..
00000054  91 b2 dd f4 4a 80 a3 92  a8 0f aa 67 32 8a 72 6d ....J... ...g2.rm
00000064  4b 22 07 00 00 0e 00 09  00 64 00 62 00 03 00 06 K"...... .d.b....
00000074  00 12 00 63 01 00                                ...c..

prelogin packet (0x12), content TLS 1.0 (you can see a ClientHell0, see RFC 2246)

>From server to client

00000025  04 01 03 da 00 00 01 00  16 03 01 03 cd 02 00 00 ........ ........
00000035  46 03 01 41 b9 5e 03 4b  c1 bf 9b a5 7d 83 74 57 F..A.^.K ....}.tW
00000045  00 03 de b5 fb fc 4d f8  84 15 ce 07 d9 ab fe 2b ......M. .......+
00000055  57 3c ad 20 96 10 00 00  6f 31 af e4 17 ae 2a 2b W<. .... o1....*+
00000065  37 29 0e 57 8a 4d 1d 32  aa d9 ed 62 6b 3d 3c d1 7).W.M.2 ...bk=<.
00000075  d1 c6 a9 cb 00 09 00 0b  00 03 7b 00 03 78 00 03 ........ ..{..x..
00000085  75 30 82 03 71 30 82 02  da a0 03 02 01 02 02 01 u0..q0.. ........
00000095  00 30 0d 06 09 2a 86 48  86 f7 0d 01 01 04 05 00 .0...*.H ........
000000A5  30 81 88 31 0b 30 09 06  03 55 04 06 13 02 49 54 0..1.0.. .U....IT
000000B5  31 10 30 0e 06 03 55 04  08 13 07 42 6f 6c 6f 67 1.0...U. ...Bolog
000000C5  6e 61 31 10 30 0e 06 03  55 04 07 13 07 42 6f 6c na1.0... U....Bol
... omissis...

normal reply packet (0x4), ServerHello(2), content TLS (certificate).

NOTE: if server send certificate request client (MS ODBC) crash so I think this is not supported.

>From client to server

0000007A  12 01 00 c6 00 00 00 00  16 03 01 00 86 10 00 00 ........ ........
0000008A  82 00 80 3a c6 96 ba 55  ce 8e 4b a4 e2 d7 b7 bd ...:...U ..K.....
0000009A  5d 5e f4 28 30 c6 c7 b9  4e 66 60 80 45 ce cb 4e ]^.(0... Nf`.E..N
000000AA  f6 f7 91 d7 9b 05 79 f8  ad f7 c7 13 77 36 cb 8c ......y. ....w6..
000000BA  04 58 33 3f 51 c8 0a bb  6a 95 8f 65 a1 e9 74 c5 .X3?Q... j..e..t.
000000CA  c9 c6 4a 11 b1 36 87 84  f2 96 82 d0 19 8a dd dc ..J..6.. ........
000000DA  d1 32 6a 32 ab 73 47 76  58 69 16 fd 9f 0b bd d7 .2j2.sGv Xi......
000000EA  72 79 a7 86 9a 71 2b 70  9a d1 8f e2 54 63 46 81 ry...q+p ....TcF.
000000FA  3e 6d 8a f7 8d 2e 26 02  3f 2d 0c a1 bc 63 ac 0a >m....&. ?-...c..
0000010A  8a 38 0e 14 03 01 00 01  01 16 03 01 00 28 12 09 .8...... .....(..
0000011A  d5 2d 93 8c 60 aa ae ec  e3 9b 2b 3c 27 63 46 ad .-..`... ..+<'cF.
0000012A  b1 b9 3d 1e 06 60 18 49  6d bb 76 80 8b 7b 51 70 ..=..`.I m.v..{Qp
0000013A  b7 79 14 b8 ba 62                                .y...b

prelogin (0x12), still TLS handshake, client_key_exchange (??) (0x16, 0x10), change crypt (0x14), handshake (crypted)

>From server to client

000003FF  04 01 00 3b 00 00 01 00  14 03 01 00 01 01 16 03 ...;.... ........
0000040F  01 00 28 96 3c 2e 41 42  09 d3 a8 77 82 19 7f 4b ..(.<.AB ...w...K
0000041F  ac 04 b8 96 4b f1 65 c2  35 9e ef 6a 1d c2 41 2d ....K.e. 5..j..A-
0000042F  a3 98 b8 2b 5c 0f 40 d1  98 b0 1e                ...+\.@. ...

normal reply (0x4), still TLS

0x14 means change crypt, followed by 0x16 (handshake crypted).

>From client to server

00000140  17 03 01 01 08 d7 3a b5  c3 fd a7 4d 14 b7 ce c7 ......:. ...M....
00000150  c6 6f f3 c5 03 1c 5c 86  7b 15 98 45 2a 93 73 c7 .o....\. {..E*.s.
00000160  72 75 72 23 c2 11 20 7d  5c b1 be e7 ac 72 ac b3 rur#.. } \....r..
00000170  47 41 4f 45 d8 fa 22 2b  94 b1 67 a5 7f de af 96 GAOE.."+ ..g.....
00000180  05 ad bb fc e4 33 66 3a  a2 f1 8d c5 5f 84 8b 38 .....3f: ...._..8
00000190  86 b0 df e8 87 e7 2c 26  e6 c0 66 2e b1 53 86 40 ......,& ..f..S.@
000001A0  98 0d 9e 2f 49 0b 17 b2  9d 55 d3 e3 7e 08 ca b9 .../I... .U..~...
000001B0  de 62 87 23 14 98 6e 10  d0 dd c2 94 70 4c 33 4b .b.#..n. ....pL3K
000001C0  09 8d b8 46 e5 a2 31 52  4d 89 06 b2 10 a8 ed b0 ...F..1R M.......
000001D0  a8 21 02 79 ab 99 de 67  28 a3 6c ea 18 88 b5 63 .!.y...g (.l....c
000001E0  02 ab f4 a1 78 0d 83 ec  b6 7b 61 7d 42 d2 38 bb ....x... .{a}B.8.
000001F0  50 fc e1 9e 1e e0 51 69  93 ea 05 9f d5 a4 a8 2b P.....Qi .......+
00000200  18 7f 79 4f 29 1a c0 35  3c 55 83 b0 9f af b7 de ..yO)..5 <U......
00000210  6d 2d 12 fa 27 ef 28 6b  a9 83 12 e6 a1 09 58 00 m-..'.(k ......X.
00000220  30 b3 3d f0 60 00 97 84  ee 28 b0 ae 31 78 50 d7 0.=.`... .(..1xP.
00000230  85 82 19 9f 57 ca a6 1c  d2 81 0f 6b 2d fb 47 41 ....W... ...k-.GA
00000240  37 58 8a ba 4f 38 f6 00  23 24 56 c2 35          7X..O8.. #$V.5

Well... you can note that this it's not a TDS packet !!! This is a fully crypted packet (login packet).

>From server to client

0000043A  04 01 01 79 00 33 01 00  e3 1b 00 01 06 6d 00 61 ...y.3.. .....m.a
0000044A  00 73 00 74 00 65 00 72  00 06 6d 00 61 00 73 00 .s.t.e.r ..m.a.s.
0000045A  74 00 65 00 72 00 ab 66  00 45 16 00 00 02 00 25 t.e.r..f .E.....%
0000046A  00 43 00 68 00 61 00 6e  00 67 00 65 00 64 00 20 .C.h.a.n .g.e.d. 
0000047A  00 64 00 61 00 74 00 61  00 62 00 61 00 73 00 65 .d.a.t.a .b.a.s.e
0000048A  00 20 00 63 00 6f 00 6e  00 74 00 65 00 78 00 74 . .c.o.n .t.e.x.t
0000049A  00 20 00 74 00 6f 00 20  00 27 00 6d 00 61 00 73 . .t.o.  .'.m.a.s
... omissis ...

Now normal data follow. In this case server used flag 0 (see above).

With force login (0x03 from server) after crypted login packet server and client continue to keep encrypting full packets

Note that uncrypted packets are still splitted using packet size selected during login (that is usually 4096 bytes). PKsiZq freetds/ea-freetds-1.4.9/TODO.mdnu[To Do List ========== This list is ordered top-to-bottom by priority. Things that are broken and need mending are at the top, followed by things that should work before the next release, followed by features that should be added/fixed/reworked (grouped by library). Everyone is encouraged to add to the list. Developers can do it directly; anyone else can post a patch to SourceForge. In this way we can communicate with each other about the project's priorities and needs. Must be fixed: ==== * ctlib parameters, handle all case even in tds7 * handle and test prepared query (? and @ syntax should be supported) * cancellation * ctlib seems to hang reading row while in IDLE state (tds_peek if not in pending state hang... update) Applied but could not test fix from ML 21 May 2008: "Problem with FreeTDS validating SQL commands (actually a ct_cancel() error)" I don't know if this is still true. Upper libraries should not use tds_peek as it does handle cancellation. Work in progress: ==== * be able to disable iconv for BCP (see Sybase documentation) I have a patch to disable it, how to handle NVARCHAR? -- freddy77 * BCP under ODBC. There is an experimental patch trying to implement it. For future versions (in priority order within library): All ---- * Cache protocol discovery (TDSVER=0.0). Save port/instance into some permanent storage. tsql should report progress in verbose mode. * retain values used from freetds.conf, so we can report them. * add a way for tsql to report host, port, and TDS version for the connection it's attempting. Actually libTDS does the name resolution in tds_connect and then just connect so there is no way for tsql to report these information. * move error message macro/prototype to tds.h.in; use in dblib.c. * conversion from ucs2 to utf8, provide for 2+ bytes/character * change numeric format to improve performance ?? * little/big endian based on platform * already packet at word * correctly aligned to read directly packetized * limit copy of data (now wire -> tds -> temp -> client) use a method like zero-copy In token.c getting row should write data even to client (callback, new user types, see ctlib conversion functions) In query.c writing data do the same (use additional column fields?) Situation is much improved in 0.95 version. In ODBC is much better as wire -> tds are never performed and convert extension to give client buffer is used if possible so to avoid the temp step. * review the way parameters are packed (too complicate, see ctlib bulk, cf "bulk copy and row buffer") * improve cursor support on dblib and ctlib * read on partial packet, do not wait entire one * detect if realloc accepts NULL pointers (in configure.ac) * support for password longer than 30 characters under Sybase (anybody know how ??) * under Sybase using prepared statements and BLOBs we shouldn't try to prepare every time (cache failure preparing, see odbc unittests logs, binary_test) done in ODBC ?? * Native bcp has no iconv support; character bcp files are assumed be encoded with the client's charset. More flexibility one both sides would be good. * date/time on Sybase (from 12.5) * encrypted connection for Sybase db-lib ---- * add DBTEXTLIMIT (dbsetopt), PHP require it to support textlimit ini value ct-lib ---- * dynamic placeholders (DBD::Sybase) * ct_option() calls (CS_OPT_ROWCOUNT, CS_OPT_TEXTSIZE, among others) * async function, async calls (dbpoll() and friends) * support all type of bind in ct_bind (CS_VARBINARY_TYPE and other) search "site:.sybase.com CS_VARBINARY ct_bind" on google for more info * complete sqlstate and other field in message (for Python) odbc ---- * SQLDescribeParam (Sybase seems to require it) A 100% success for DBD::ODBC require this. Require parsing of the string to extract placeholders ("?") type, something like "INSERT INTO test_table(field_a) VALUES(?)" -> "SELECT field_a FROM test_table(NOLOCK) WHERE 0=1" * Star Office complains that these TypeInfo constants are not implemented in SQLGetInfo: 47 SQL_USER_NAME (handle environment callbacks) do a "SELECT USER_NAME()". If data pending MS do another connection with same login. * SQLNativeSql and fill SQLGetInfo according (mssql7+ handle odbc escapes directly) * it seems that if statement it's wrong and we issue SQLPrepare on SQLExecute it try to send unprepared dynamic... state on dynamic?? * odbc array binding test large field (like image) have language queries some limits? do we have to split large multiple queries? * report error just before returning SQL_ERROR from inner function? * handle async flags ?? * handle no termination on odbc_set_string* Test and fix ---- * hidden fields (FOR BROWSE select, see flag test on tds) * what happen if we bind to an hidden field?? * if we use SQLGetData?? * if we request informations with SQLDescribeCol/SQLColAttribute(s)/ SQLGetDescField?? * as you noted returning # columns hidden fields are not counted (there is however a setting which is a mssql extension which threat hidden columns as normal) (cfr "SQLNumResultCols() is wrong (+1)" Jan 8 2008) * test: descriptors work * what happen to SQL_DESC_DATETIME_INTERVAL_CODE and SQL_DESC_CONCISE_TYPE changing only SQL_DESC_TYPE (with SQLSetDescField) * test: set SQL_C_DEFAULT and call SQLFetch (numeric, others) * test: SQLGetStmtAttr(SQL_ATTR_ROW_NUMBER) * all binded parameters * no bind and sqlgetdata * before first fetch * after last fetch pool ---- * get connection pooling working with all protocol versions * Make pool configuration a non-recompile process server ---- * Server API needs more work. It's in a quite ugly state. It's more experimental. Should be disabled by default to state it. PKsiZD[!freetds/ea-freetds-1.4.9/tds.htmlnu[ TDS Protocol Documentation

TDS Protocol Documentation

This document attempts to cover the TDS protocol for:

TDS VersionSupported Products
4.2Sybase SQL Server < 10 and Microsoft SQL Server 6.5
5.0Sybase SQL Server >= 10
7.0Microsoft SQL Server 7.0
7.1Microsoft SQL Server 2000
7.2Microsoft SQL Server 2005

Contents

Common Terms

TDS protocol versions
  TDS 5.0    tds version 5.0
  TDS 7.0    tds version 7.0
  TDS 7.0+   tds version 7.0, 7.1 and 7.2
  TDS 5.0-   tds version 5.0 and previous

Variable types used in this document:
  CHAR      8-bit char
    CHAR[6]	string of 6 chars
    CHAR[n]     variable length string
  XCHAR    single byte (TDS 5.0-) or ucs2le (TDS 7.0+) characters
  INT8      8-bit int
  INT16    16-bit int
  INT32    32-bit int
  UCS2LE   Unicode in UCS2LE format

Note: FreeTDS uses TDS_TINYINT for INT8 and TDS_SMALLINT for INT16.

Typical Usage sequences

These are TDS 4.2 and not meant to be 100% correct, but I thought they might be helpful to get an overall view of what goes on.

--> Login
<-- Login acknowledgement

--> INSERT SQL statement
<-- Result Set Done

--> SELECT SQL statement
<-- Column Names
<-- Column Info
<-- Row Result
<-- Row Result
<-- Result Set Done

--> call stored procedure
<-- Column Names
<-- Column Info
<-- Row Result
<-- Row Result
<-- Done Inside Process
<-- Column Names
<-- Column Info
<-- Row Result
<-- Row Result
<-- Done Inside Process
<-- Return Status
<-- Process Done

The packet format

Every informations in TDS protocol (query, RPCs, responses and so on) is splitted in packets.

All packets start with the following 8 byte header.

 INT8       INT8          INT16      4 bytes
+----------+-------------+----------+--------------------+
|  packet  | last packet |  packet  |    unknown         |
|   type   |  indicator  |   size   |                    |
+----------+-------------+----------+--------------------+

Fields:
packet type 
     0x01 TDS 4.2 or 7.0 query
     0x02 TDS 4.2 or 5.0 login packet
     0x03 RPC
     0x04 responses from server
     0x06 cancels
     0x07 Used in Bulk Copy
     0x0F TDS 5.0 query
     0x10 TDS 7.0 login packet
     0x11 TDS 7.0 authentication packet
     0x12 TDS 8 prelogin packet
last packet indicator 
     0x00 if more packets
     0x01 if last packet
packet size
     (in network byte order)
unknown?
     always 0x00
     this has something to do with server to server communication/rpc stuff

The remainder of the packet depends on the type of information it is providing. As noted above, packets break down into the types query, login, response, and cancels. Response packets are further split into multiple sub-types denoted by the first byte (a.k.a. the token) following the above header.

Note: A TDS packet that is longer than 512 bytes is split on the 512 byte boundary and the "more packets" bit is set. The full TDS packet is reassembled from its component 512 byte packets with the 8-byte headers stripped out. 512 is the block_size in the login packet, so it could be set to a different values. In Sybase you can configure a range of valid block sizes. TDS 7.0+ use a default of 4096 as block size.


TDS 4.2 & 5.0 Login Packet

Packet type (first byte) is 2. The numbers on the left are decimal offsets including the 8 byte packet header.

byte   var type    description
------------------------------
   8   CHAR[30]    host_name
  38   INT8        host_name_length
  39   CHAR[30]    user_name
  69   INT8        user_name_length
  70   CHAR[30]    password
 100   INT8        password_length
 101   CHAR[30]    host_process
 131   INT8        host_process_length
 132   ?           magic1[6]          /* mystery stuff */
 138   INT8        bulk_copy 
 139   ?           magic2[9]          /* mystery stuff */
 148   CHAR[30]    app_name
 178   INT8        app_name_length
 179   CHAR[30]    server_name
 209   INT8        server_name_length
 210   ?           magic3[1]          /* 0, don't know this one either */
 211   INT8        password2_length
 212   CHAR[30]    password2
 242   CHAR[223]   magic4
 465   INT8        password2_length_plus2
 466   INT16       major_version      /* TDS version */
 468   INT16       minor_version      /* TDS version */
 470   CHAR        library_name[10]   /* "Ct-Library" or "DB-Library" */
 480   INT8        library_length
 481   INT16       major_version2     /* program version */
 483   INT16       minor_version2     /* program version */
 485   ?           magic6[3]          /* ? last two octets are 13 and 17 */
                                      /* bdw reports last two as 12 and 16 here  */
                                      /* possibly a bitset flag  */
 488   CHAR[30]    language           /* e.g. "us-english" */
 518   INT8        language_length
 519   ?           magic7[1]          /*  mystery stuff */
 520   INT16       old_secure         /* explanation? */
 522   INT8        encrypted          /*  1 means encrypted all password fields blank */
 523   ?           magic8[1]          /*  no clue... zeros */
 524   CHAR        sec_spare[9]       /* explanation? */
 533   CHAR[30]    char_set           /* e.g. "iso_1" */
 563   INT8        char_set_length
 564   INT8        magic9[1]          /* 1 */ 
 565   CHAR[6]     block_size         /*  in text */
 571   INT8        block_size_length 
 572   ?           magic10[25]        /* lots of stuff here...no clue */

Any help with the magic numbers would be most appreciated.


TDS 7.0+ Login Packet

byte  var type  description
---------------------------
  0   INT32	total packet size
  4   INT8[4]	TDS Version	
                	0x00000070 7.0
			0x01000071 7.1
                	0x02000972 7.2 (7.2.9?)
  8   INT32	packet size (default 4096)
 12   INT8[4]	client program version
 16   INT32	PID of client
 20   INT32	connection id (usually 0)
 24   INT8	option flags 1
                0x80 enable warning messages if SET LANGUAGE issued
                0x40 change to initial database must succeed
                0x20 enable warning messages if USE <database> issued
                0x10 enable BCP
		0x08 use ND5000 floating point format (untested)
		0x04 use VAX floating point format (untested)
		0x02 use EBCDIC encoding (untested)
		0x01 use big-endian byte order (untested)
 25   INT8	option flags 2
                0x80 enable domain login security
		0x40 "USER_SERVER - reserved" 
		0x20 user type is "DQ login"
		0x10 user type is "replication login"
		0x08 "fCacheConnect"
		0x04 "fTranBoundary"
                0x02 client is an ODBC driver
                0x01 change to initial language must succeed
 26   INT8	0x04 spawn user instance (TDS 7.2)
                0x02 XML data type instances are returned as binary XML (TDS 7.2)
                0x01 password change requested (TDS 7.2)
 27   INT8	0x01 SQL Type: 0 = use default, 1 = use T-SQL (TDS 7.2)
 28   INT8[4]	time zone (0x88ffffff ???)
 32   INT8[4]	collation information
 36   INT16	position of client hostname (86)
 38   INT16	hostname length
 40   INT16	position of username
 42   INT16	username length
 44   INT16	position of password
 46   INT16	password length
 48   INT16	position of app name
 50   INT16	app name length
 52   INT16	position of server name
 54   INT16	server name length
 56   INT16	position of remote server/password pairs
 58   INT16	remote server/password pairs length
 60   INT16	position of library name
 62   INT16	library name length
 64   INT16	position of language
 66   INT16	language name (for italian "Italiano", coded UCS2)
 68   INT16	position of database name
 70   INT16	database name length
 72   INT8[6]	MAC address of client
 78   INT16	position of auth portion
 80   INT16	NT authentication length
 82   INT16	next position (same as total packet size)
 84   INT16	0
 86   UCS2LE[n] hostname
      UCS2LE[n]	username
      UCS2LE[n]	encrypted password
      UCS2LE[n]	app name
      UCS2LE[n]	server name
      UCS2LE[n]	library name
      UCS2LE[n]	language name
      UCS2LE[n]	database name
      NT Authentication packet

NT Authentication packet
  0   CHAR[8]	authentication id "NTLMSSP\0"
  8   INT32     1  message type
 12   INT32	0xb201 flags
 16   INT16	domain length
 18   INT16     domain length
 20   INT32     domain offset
 24   INT16     hostname length
 26   INT16     hostname length
 28   INT32     hostname offset
 32   CHAR[n]   hostname
      CHAR[n]   domain
See documentation on Samba for detail (or search ntlm authentication for IIS)

For mssql 2005 before hostname (byte 86) you have
 86   INT16     next position,  or 
                position of file name for a database to be 
                attached during the connection process
 88   INT16     database filename length
 90   INT16     new password position
 92   INT16     new password length
 94   UCS2LE[n] hostname
      ... (as above)

"current pos" is the starting byte address for a Unicode string within the packet. The length of that Unicode string immediately follows. That implies there are at least 2 more strings that could be defined. (character set??)

Username and password are empty if domain authentication is used.

If the client uses an authentication packet, the server replies with an Authentication token followed by an Authentication packet.


TDS 7.0 Authentication Packet

 varies
+------+
| auth |
+------+

auth   authentication data
       for NTLM this message 3

This packet usually follows Authentication token.


Types

HEXDECtypeprotocolnullablesizecollate
0x1F31SYBVOID7+no0
0x2234SYBIMAGEyes4
0x2335SYBTEXTyes4yes
0x2436SYBUNIQUE7+yes1
0x2537SYBVARBINARYyes1
0x2638SYBINTNyes1
0x2739SYBVARCHARyes1
0x2D45SYBBINARYyes1
0x2F47SYBCHARyes1
0x3048SYBINT1no0
0x3250SYBBITno0
0x3452SYBINT2no0
0x3856SYBINT4no0
0x3A58SYBDATETIME4no0
0x3B59SYBREALno0
0x3C60SYBMONEYno0
0x3D61SYBDATETIMEno0
0x3E62SYBFLT8no0
0x4064SYBSINT15no0
0x4165SYBUINT25no0
0x4266SYBUINT45no0
0x4367SYBUINT85no0
0x6298SYBVARIANT7+yes4
0x6399SYBNTEXT7+yes4yes
0x67103SYBNVARCHAR7+yes1
0x68104SYBBITNyes1
0x6A106SYBDECIMALyes1
0x6C108SYBNUMERICyes1
0x6D109SYBFLTNyes1
0x6E110SYBMONEYNyes1
0x6F111SYBDATETIMNyes1
0x7A122SYBMONEY4no0
0x7F127SYBINT8no0
0xA5165XSYBVARBINARY7+yes2 *
0xA7167XSYBVARCHAR7+yes2 *yes
0xAD173XSYBBINARY7+yes2
0xAF175XSYBCHAR7+yes2yes
0xE1225SYBLONGBINARY5yes4
0xE7231XSYBNVARCHAR7+yes2 *yes
0xEF239XSYBNCHAR7+yes2yes

* Under TDS 7.2+ these types allow size to be -1, representing varchar(max), varbinary(max) and nvarchar(max). Data representation for them changes:

  • size is 64 (not 16) bits
  • size of -1 means NULL
  • size of -2 means the size is unknown
  • the data are split in chunks, where each chunk starts with a 32-bit size
  • a chunk with size <= 0 is the terminal chunk

Collation type - TDS 7.1

The collation structure contains information about the character set encoding and comparison method.

 INT16      INT16    INT8
+----------+--------+------------+
| codepage | flags  | charset_id |
+----------+--------+------------+

codepage    windows codepage (see http://www.microsoft.com/globaldev/nlsweb/)
            also specified in lcid column of master..syslanguages
flags       sort flags
            0x100 binary compare
            0x080 width insensitive
            0x040 Katatype insensitive
            0x020 accent insensitive
            0x010 case insensitive
            If binary flag is specified other flags are not present
            Low nibble of flags is a charset specifier (like chinese dialect)
charset_id  charset id in master..syscharsets table or zero for no SQL collations

Collations names can be obtained from select name from ::fn_helpcollations() query


Column Metadata

 INT8          XCHAR[n]       INT8    INT32   INT8
+-------------+--------------+-------+-------+---------+
| column name | column name  | flags |  user | column  |
|   length    |              |       |  type |  type   |
+-------------+--------------+-------+-------+---------+

 varies        INT8       INT8       INT16      XCHAR[n]     INT8     varies
+-------------+----------+----------+----------+------------+--------+--------+
| column size |precision |  scale   | t length | table name | locale | locale |
|             |          |          |          |            | length |  info  |
| (optional)  |(optional)|(optional)|(optional)| (optional) | (opt)  | (opt)  |
+-------------+----------+----------+----------+------------+--------+--------+

column name length 
column name        column name in result set, not necessarily db column name
flags              bit flags
                   0x1  hidden (TDS 5.0)
                   0x2  key
                   0x10 writable
                   0x20 can be NULL
                   0x40 identity
user type          usertype column from syscolumns
column type        column type
column size        not present for fixed size columns
precision          present only for SYBDECIMAL and SYBNUMERIC
scale              present only for SYBDECIMAL and SYBNUMERIC
t length           present only for SYBTEXT and SYBIMAGE, length of table name
table name         present only for SYBTEXT and SYBIMAGE
locale length      length of locale info (in bytes)
                   only for TDS 5.0 results (not for parameters)
locale info        unknown
                   only for TDS 5.0 results (not for parameters)

Client request

Normal tokens (contained in packets 0xF)

TODO

Special packets


Language packet (0x1 1)

This sample packet contain just SQL commands. It's supported by all TDS version (although TDS 5.0 have others token with similar use)

  XCHAR[n]
+---------+
| string  |
+---------+

string   SQL text

RPC packet (0x3 3)

Do not confuse an RPC packet with an RPC token. The RPC packet is supported by all version of TDS; the RPC token is supported only by TDS 5.0 (and has different format). This is the oldest (and the only one in mssql) way to call directly an RPC. Sybase also documents it, but as 0xE.

  INT16         XCHAR[n]   INT16  
+-------------+----------+-------+----------+
| name length | rpc name | flags | params   |
+-------------+----------+-------+----------+

name length   length of RPC name in characters. 
              mssql2k+ support some core RPC using numbers
              If a number is used instead of name name length is marked as -1
              (null) and a INT16 is used for the name.
                0x1  1  sp_cursor
                0x2  2  sp_cursoropen
                0x3  3  sp_cursorprepare
                0x4  4  sp_cursorexecute
                0x5  5  sp_cursorprepexec
                0x6  6  sp_cursorunprepare
                0x7  7  sp_cursorfetch
                0x8  8  sp_cursoroption
                0x9  9  sp_cursorclose
                0xA  10 sp_executesql
                0xB  11 sp_prepare
                0xC  12 sp_execute ???
                0xD  13 sp_prepexec
                0xE  14 sp_prepexecrpc
                0xF  15 sp_unprepare
              sp_execute seems to have some problems, even MS ODBC use name
              version instead of number.
rpc name      name of RPC.
flags         bit flags. 
               0x1 1 recompile procedure (TDS 7.0+/TDS 5.0)
               0x2 2 no metadata (TDS 7.0+)
                     (I don't know meaning of "no metadata" -- freddy77)
params        parameters. See below

Every parameter has the following structure

+-----------+------+
| data info | data |
+-----------+------+
data info    data information. See below
data         data. See results for detail

Data info structure

  INT8          XCHAR[n]     INT8    INT32
+-------------+------------+-------+--------------------+
| name length | param name | flags | usertype (TDS 5.0) |
+-------------+------------+-------+--------------------+
  INT8   varies  varies     INT8[5]         INT8
+------+-------+----------+---------------+------------------+
| type | size  | optional | collate       | locale           |
|      | (opt) | (opt)    | info(TDS 7.1) | length (TDS 5.0) |
+------+-------+----------+---------------+------------------+

name length   parameter name length (0 if unused)
param name    parameter name
flags         bit Name           Meaning
              0x1 TDS_RPC_OUTPUT output parameter
              0x2 TDS_RPC_NODEF  output parameter has no default value. 
                                 Valid only with TDS_RPC_OUTPUT.

usertype      usertype
type          param type
size          see Results
optional      see Results. Blobs DO NOT have 
              optional on input parameters (output blob parameters
              are not supported by any version of TDS).
collate info  only for type that want collate info and using TDS 7.1
locale length locale information length. Usually 0 (if not locale
              information follow, the structure is unknown)

Chained RPCs

Under TDS 7.0+ is possible to chain multiple RPCs together. This is useful to limit packets and round-trips with server. RPCs can be chained using byte 0x80 (TDS 7.0/TDS 7.1) or 0xFF (TDS 7.2).

       INT8                     INT8
+-----+------------------------+----------------+-----+
| RPC | 0x80 (TDS 7.0/TDS 7.1) | 0xFF (TDS 7.2) | RPC | ...
+-----+------------------------+----------------+-----+

Bulk Copy packet (0x7 7)

This documents a TDS 5.0 packet. It might be true for others....

BCP Packet Structure

 INT8       INT16          INT32                
+----------+-------------+--------------------+
|  packet  | last packet |  packet            |
| type = 7 |  indicator  |   size             |
+----------+-------------+--------------------+

		followed by N row buffers, 
		where N is computed by exhausting the packet size

BCP Packet Row Buffer

 INT16          INT8       INT8	      INT16	    
+--------------+----------+----------+--------------+
| size         |  ncols   |  zero    | size (again) |
+--------------+----------+----------+--------------+

	followed by column buffers (data), where 
		
		first, the fixed-size datatype columns

		 fixed size and count (determined by column definition)
		+--------------+
		|    data .... | [repeats once for each mandatory column]
		+--------------+

		then, the variable-size (including nullable) datatype columns

		 variable size and count
		+--------------+
		|    data .... | [repeats ncol times]
		+--------------+

		followed by two tables (!) to describe the column buffers

 Adjustment Table (optional)
 
 INT8       INT8        
+----------+----------+
| 1 + ncols| offset   | [repeats ncol + 1 times]
+----------+----------+

 Offset Table (mandatory)
 
 INT8       INT8        
+----------+----------+
| 1 + ncols| offset   | [repeats ncol + 1 times]
+----------+----------+

The BCP packet has a slightly different Packet header!?

Computation of Offset and Adjustment tables

The offset and adjustment tables describe the postion of the first byte of each variable-size column. The first element holds the count of elements in the offset/adjustment table. Thereafer, the offsets are arranged in reverse order: the last element — which is also the last byte of the row buffer — holds the offset from the start of the row of the first variable-size column. The next-to-last offset table element holds the starting position of the second variable-size column, and so on.

Offset Table Example

  1. 5
  2. 31
  3. 22
  4. 21
  5. 8
  6. 4

The first element is 5 because there are five elements in the list. There are 4 column data buffers with 5 endpoints. The first column's data begins at offset 4. Computations:

column 1
offset 4
length: 4 = 8 - 4
column 2
offset 8
length: 13 = 21 - 8
column 3
offset 21
length: 1 = 22 - 21
column 4
offset 22
length: 9 = 31 - 22

Any column not accounted for is implicitly NULL. To represent a NULL column between two dataful columns, the offset table will have adjacent entries of the same value.

Adjustment table

The so-called adjustment table provides for longer rows. The reader will note the Offset table has 8-bit elements, which would limit the width of the table: the last variable column would have to end less than 256 bytes from the start fo the row. Rather than changing the definition of the Offset table, a second table, the Adjustment table, was introduced. It holds high-order bytes for the column offsets.

In other words, to compute a variable column's offset from the start of the row buffer, the server looks up its offset table value, then consults the same position in the adjustment table, and splices them together.

Offset table commentary

The BCP packet is very dense. The data formats are governed by the table definition. Non-NULL columns of course must be present; there is no need to count them or compute their size. The NULL columns are undelimited; their boundaries are defined by the minimalist offset table.

The Adjustment table seems silly at first glance. Why not just make the offset table's elements 16 or or even 32 bits? The reason is overhead. Most rows will have less than 256 bytes of variable column data. By using the adjustment table, the BCP packet avoids adding one or even three empty bytes per column per row.

Why is the table in reverse order? Because that places the first offset at a known location: the end of each row gives the start of the first column. The server can work its way down the offset table and compute the column sizes. If they don't add up — if there are data between the (presumed) end of the last column and the start of the offset table — the server knows it should look for an adjustment table. Because the scheme is infinitely repeatable, rows could one day grow to terabyte widths without redefining the packet structure.


Server Responses

Responses from the server start with a single octet (token) identifying its type. If variable length, they generally have the length as the second and third bytes

Tokens encountered thus far:
HEXDECnamenote
0x2032Param Format 25.0 only
0x2133Language5.0 only, client-side
0x2234OrderBy 25.0 only??
0x6197Row Format 25.0 only
0x71113"Logout"5.0? ct_close(), client-side?
0x79121Return Status 
0x7C124Process ID4.2 only
0x80128Cursor Close5.0 only
0x81129Cursor Delete5.0 only
0x811297.0 Result7.0 only
0x82130Cursor Fetch5.0 only
0x83131Cursor Info5.0 only
0x84132Cursor Open5.0 only
0x86134Cursor Declare5.0 only
0x881367.0 Compute Result7.0 only
0xA0160Column Name4.2 only
0xA1161Column Format4.2 only
0xA3163Dynamic 25.0 only
0xA4164Table namesname of tables in a FOR BROWSE select
0xA5165Column Infocolumn information in a FOR BROWSE select
0xA6166Option Cmd5.0 only
0xA7167Compute Names 
0xA8168Compute Result 
0xA9169Order By 
0xAA170Error Message 
0xAB171Info Message 
0xAC172Output Parameters 
0xAD173Login Acknowledgement 
0xAE174Control 
0xD1209Data --- Row Result 
0xD3211Data --- Compute Result 
0xD7215Params5.0 only
0xE2226Capability5.0 only. Information on server
0xE3227Environment Change(database change, packet size, etc...)
0xE5229Extended Error Message 
0xE6230DBRPC5.0 only RPC calls
0xE7231Dynamic5.0 only
0xEC236Param Format5.0 only
0xED237Authentication7.0 only
0xEE238Result Set5.0 only
0xFD253Result Set Done 
0xFE254Process Done 
0xFF255Done inside Process 

Param Format 2 - TDS 5.0 (0x20 32)

TODO.  


Language - TDS 5.0 (0x21 33)

 INT32    INT8     CHAR[n]
+--------+--------+-------+
| length | status | query |
+--------+--------+-------+

length  total token length
status  0 no args
        1 has args (followed by PARAMFMT/PARAMS)
query   query (total length - 1)

Order By 2 (0x22 34)

TODO.  


Row Format 2 - TDS 5.0 (0x61 97)

TODO.  


"Logout" (0x71 113)

No information. (1 byte, value=0 ?)  


Return Status (0x79 121)

 INT32
+---------------+
| Return status |
+---------------+

The return value of a stored procedure.  

Process ID (0x7C 124)


 8 bytes
+----------------+
| process number |
+----------------+

Presumably the process ID number for an executing stored procedure. (I'm not sure how this would ever be used by a client. *mjs*)  


Cursor Close - TDS 5.0 (0x80 128)

TODO.  


Cursor Delete - TDS 5.0 (0x81 129)

TODO.  


Result - TDS 7.0+ (0x81 129)

 INT16  
+----------+-------------+
| #columns | column_info | 
+----------+-------------+

The TDS 7.0 column_info is formatted as follows for each column:

 INT16      INT16   INT8   varies  varies     INT8[5]         INT8          UCS2LE[n]
+----------+-------+------+-------+----------+---------------+-------------+---------+
| usertype | flags | type | size  | optional | collate       | name length | name    | 
|          |       |      | (opt) | (opt)    | info(TDS 7.1) |             |         |
+----------+-------+------+-------+----------+---------------+-------------+---------+

usertype	type modifier
flags		bit flags
		0x1  can be NULL
		0x8  can be written (it's not an expression)
		0x10 identity 
type		data type, values >128 indicate a large type
size		none for fixed size types
		4 bytes for blob and text
		2 bytes for large types
		1 byte for all others
optional
                               INT8        INT8
                              +-----------+-------+
  numeric/decimal types:      | precision | scale |
                              +-----------+-------+

                               INT16               UCS2LE[n]
                              +-------------------+------------+
  blob/text types:            | table name length | table name |
                              +-------------------+------------+

  collate info are available only using TDS 7.1 and for characters types (but not
  for old type like short VARCHAR, only 2byte length versions)

Cursor Fetch - TDS 5.0 (0x82 130)

TODO.

Cursor Info - TDS 5.0 (0x83 131)

TODO.

Cursor Open - TDS 5.0 (0x84 132)

TODO.

Cursor Declare - TDS 5.0 (0x86 134)

TODO.

Compute Result - TDS 7.0+ (0x88 136)

TODO.

Column Name (0xA0 160)

 INT16          INT8      CHAR[n]               INT8      CHAR[n] 
+--------------+---------+--------------+------+---------+--------------+
| total length | length1 | column1 name | .... | lengthN | columnN name |
+--------------+---------+--------------+------+---------+--------------+

This token is the first token that contain result informations. Is usually followed by Column Format token (0xA1 161)


Column Format (0xA1 161)

 INT16  
+--------------+-------------+
| total length | column_info | 
+--------------+-------------+

The number of columns is the same of previous Column Name token.

The TDS 4.2 column_info is formatted as follows for each column:

 INT8[4]     INT8   varies  varies
+-----------+------+-------+----------+
| usertype/ | type | size  | optional |
|   flags   |      | (opt) | (opt)    |
+-----------+------+-------+----------+

usertype/flags for Sybase

   INT32
  +----------+
  | usertype |
  +----------+

usertype/flags for MSSQL

   INT16
  +----------+-------+
  | usertype | flags |
  +----------+-------+

usertype	type modifier
flags		bit flags (only MSSQL)
		0x1  can be NULL
		0x8  can be written (it's not an expression)
		0x10 identity 
type		data type
size		none for fixed size types
		4 bytes for blob and text
		1 byte for all others
                (TDS 4.2 do not support large types)
optional
                               INT8        INT8
                              +-----------+-------+
  numeric/decimal types:      | precision | scale |
  (supported??)               +-----------+-------+

                               INT16               CHAR[n]
                              +-------------------+------------+
  blob/text types:            | table name length | table name |
                              +-------------------+------------+

Dynamic 2 - TDS 5.0 (0xA3 163)

TODO.

Option Cmd - TDS 5.0 (0xA6 166)

TODO.

Compute Result (0xA8 168)

 INT16          INT16        INT8       varies        INT8      INT8[n]
+--------------+------------+----------+-------------+---------+-------+
| total length | compute id | #columns | column info | #bycols | bycol |
+--------------+------------+----------+-------------+---------+-------+

column info:

 INT8       INT8      INT32      INT8     varies  INT8               varies
+----------+---------+----------+--------+-------+------------------+----------------+
| operator | operand | usertype | column | size  | locale length    | locale info    |
|          |         |          |  type  | (opt) |  info (TDS 5.0)  | (TDS 5.0)      |
+----------+---------+----------+--------+-------+------------------+----------------+

operator      operator
              0x4b COUNT
              0x4c UNSIGNED? COUNT
              0x4d SUM
              0x4e UNSIGNED? SUM
              0x4f AVG
              0x50 UNSIGNED? AVG
              0x51 MIN
              0x52 MAX
              0x09 COUNT_BIG (mssql2k)
              0x30 STDEV (mssql2k)
              0x31 STDEVP (mssql2k)
              0x32 VAR (mssql2k)
              0x33 VARP (mssql2k)
              0x72 CHECKSUM_AGG (mssql2k)
operand       ???
usertype      usertype
column type   data type
size          data size
locale length length of locale informations
locale info   locale informations (unknown)

Each bycol information contains column info for a specific column.

TODO: optional possible?? collate infos ??

TabName (0xA4 164)

TDS4/5/7:

 INT16          INT16         XCHAR[n]
+--------------+-------------+------------+
| total length | name length | table name | ...
+--------------+-------------+------------+

name length   table name length
table name    table name

TDS 7.1:

 INT16          varies
+--------------+-------------+
| total length | table names |
+--------------+-------------+

table name:
 INT8              INT16              XCHAR[n]
+-----------------+------------------+----------------+
| # of components | component length | component name |
+-----------------+------------------+----------------+

ie:
  name        -> 01  04 00  ucs2le "name"
  db..name    -> 03  02 00  ucs2le "db"  00 00  04 00  ucs2le "name"
  db.dbo.name -> 03  02 00  ucs2le "db"  03 00  ucs2le "dbo"  04 00  ucs2le "name"

Column Info (0xA5 165)

 INT16          varies
+--------------+--------------+
| total length | column infos |
+--------------+--------------+

column info:

 INT8    INT8          INT8    INT8          XCHAR[n]
+-------+-------------+-------+-------------+-------------+
| index | table index | flags | name length | column name |
|       |             |       |  (opt)      |  (opt)      |
+-------+-------------+-------+-------------+-------------+

index        index in result format (1-based)
table index  index in previous TabName (1-based)
             0 means no table (ie computed)
flags        set of flags
             0x04 expression
             0x08 key
             0x10 hidden
             0x20 column name present
name length  length of following column
column name  real column name (result contain the label)

This token follow TabName token    


compute "control" ? (0xA7 167)

"control" (0xAE 174)

Miscellaneous note (from *bdw* ?) found with 0xAE:

  has one byte for each column, 
  comes between result(238) and first row(209),
  I believe computed column info is stored here, need to investigate

Order By (0xA9 169)

 INT16    variable (1 byte per col)
+--------+---------+
| length | orders  |
+--------+---------+

length		Length of packet(and number of cols)
orders          one byte per order by indicating the
                column # in the output matching the
                order from Column Info and Column Names
                and data in following Row Data items.
                A 0 indicates the column is not in the
                resulting rows.

an example:
select first_name, last_name, number from employee
order by salary, number
assuming the columns are returned in the order
queried:
first_name then last_name, then number. we would have:
----------------
|  2   | 0 | 3 |
----------------
where length = 2 then the orders evaluate:
0 for salary, meaning there is no salary data returned
3 for number, meaning the 3rd data item corresponding
to a column is the number

 


Error Message (0xAA 170)

Non-error Message (0xAB 171)

Extended Error Message (0xE5 229)

 INT16    INT32        INT8    INT8    
+--------+------------+-------+-------+
| length | msg number | state | level |
+--------+------------+-------+-------+

 INT16      XCHAR[n]  INT8       XCHAR[n]  INT8       XCHAR[n]  INT16             INT32
+----------+---------+----------+---------+----------+---------+-----------------+-----------------+
| m length | message | s length | server  | p length | process | line#(TDS 7.1-) | line# (TDS 7.2) |
+----------+---------+----------+---------+----------+---------+-----------------+-----------------+

length		Length of packet
msg number	SQL message number
state		?
level		An error if level > 10, a message if level <= 10
m length	Length of message
message		Text of error/message
s length	Length of server name
server		Name of "server" ?
p length	Length of process name
process name	Stored procedure name, if any
line#		Line number of input which generated the message

Output Parameters (0xAC 172)

  Output parameters of a stored procedure.

 INT16    INT8       XCHAR[n]  INT8    INT32      INT8
+--------+----------+---------+-------+----------+----------+------+
| length | c length | colname | flags | usertype | datatype | .... | 
+--------+----------+---------+-------+----------+----------+------+

length		Length of packet
c length	Length of colname
colname		Name of column
flags		0x1 Nullable
usertype	cf. systypes table in database
datatype	Type of data returned

The trailing information depends on whether the datatype is
a fixed size datatype.
				 N bytes
				+---------+
  Datatype of fixed size N	| data    |
				+---------+

				 INT8          INT8            N bytes
				+-------------+---------------+--------+
  Otherwise			| column size | actual size N | data   |
				+-------------+---------------+--------+

Login Acknowledgement (0xAD 173)

 INT16    INT8    4 bytes   INT8       XCHAR[n] 4 bytes
+--------+-------+---------+----------+--------+----------+
| length |  ack  | version | t length |  text  | ser_ver  |
+--------+-------+---------+----------+--------+----------+

length		length of packet
ack		0x01 success	4.2
		0x05 success	5.0
		0x06 failure	5.0
version		TDS version 4 bytes:  major.minor.?.?
t length	length of text
text		server name (ie 'Microsoft SQL Server')
ser_ver		Server version
		(with strange encoding, differring from TDS version)

   


Data - Row Result (0xD1 209)

Data - Compute Result (0xD3 211)

 INT8       variable size
+----------+--------------------+
|  token   |   row data         |
+----------+--------------------+

Row data starts with one byte (decimal 209), for variable length types, a one byte length field precedes the data, for fixed length records just the data appears.
Note: nullable integers and floats are variable length.

For example: sp_who

The first field is spid, a smallint
The second field is status a char(12), in our example "recv sleep "

The row would look like this:

  byte  0 is the token
  bytes 1-2 are a smallint in low-endian
  byte  3 is the length of the char field
  bytes 4-15 is the char field

byte  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
hex  D1  01  00  0C  72  65  63  76  20  73  6C  65  65  70  20  20
    209   1   0  12   r   e   c   v ' '   s   l   e   e   p ' ' ' '

Params - TDS 5.0 (0xD7 215)

TODO.

Capability - TDS 5.0 (0xE2 226)

 INT16    variable
+--------+--------------+
| length | capabilities |
+--------+--------------+

length		Length of capability string
capabilities	Server capabilities?  Related to login magic?

Environment change (0xE3 227)

 INT16    INT8       INT8        CHAR[n]   INT8        CHAR[n] 
+--------+----------+-----------+---------+-----------+---------+
| length | env code | t1 length |  text1  | t2 length |  text2  |
+--------+----------+-----------+---------+-----------+---------+

env code	Code for what part of environment changed
	0x01  database context
	0x02  language
	0x03  character set
	0x04  packet size
	0x05  TDS 7.0+ LCID
	0x06  TDS 7.0+ ??? (sort method? sql server encoding?)
	0x07  Collation info
text1		Old value
text2		New value

text1 and text2 are text information (coded in ucs2 in TDS 7.0+) except 
collation info that's a structure (see collation structure)

DBRPC - TDS 5.0 (0xE6 230)

TODO.

Dynamic - TDS 5.0 (0xE7 231)

TODO.

Param Format - TDS 5.0 (0xEC 236)

 INT16     INT16        variable size
+---------+------------+-------------------+
| length  | number of  | parameter info    |
|         | parameters |                   |
+---------+------------+-------------------+

length            	length of message following this field
number of parameters	number of parameter formats following
list of formats		I (*bdw*) imagine it uses the column format structure.

Authentication - TDS 7.0 (0xED 237)

 INT16     varies
+---------+------+
| length  | auth |
+---------+------+

length   length of authentication data following this field
auth     authentication data
         for NTLM this is message 2

Client reply with Authentication packet.

Result Set - TDS 5.0 (0xEE 238)

 INT16     INT16        variable size
+---------+------------+-----------------+
| length  | number of  | column info     |
|         | columns    |                 |
+---------+------------+-----------------+


Fields:
length             length of message following this field
number of columns  number of columns in the result set, this many column
                   information fields will follow.
column info        column info

Done Packets

Result Set Done (0xFD 253)
Process Done (0xFE 254)
Done Inside Process (0xFF 255)

 INT16       INT16     INT32                  INT64
+-----------+---------+----------------------+---------------------+
| bit flags | unknown | row count (TDS 7.1-) | row count (TDS 7.2) |
+-----------+---------+----------------------+---------------------+

Fields:
bit flags          0x01 more results
		   0x02 error (like invalid sql syntax)
		   0x10 row count is valid
		   0x20 cancelled
unknown            2,0  /* something to do with block size perhaps */
row count          number of rows affected / returned in the result set. 
                   row count is 64-bit using TDS 7.2.
		(FIXME check if "affected / returned" is correct)

"Result Set Complete" is the end of a query that doesn't create a process on the server. I.e., it doesn't call a stored procedure.
"Process Done" is the end of a stored procedure
"Done In Process" means that a query internal to a stored procedure has finished, but the stored procedure isn't done overall.


Acknowledgements

The following people have contributed to this document:

  • Brian Bruns (first draft, protocol discovery)
  • Brian Wheeler (protocol discovery)
  • Mark Schaal (second draft)
  • Frediano Ziglio

(short list)

Document Status

$Id: tds.html,v 1.41 2008-11-25 23:38:33 jklowden Exp $

Valid HTML 4.01 Strict

PKsiZ,d  "freetds/ea-freetds-1.4.9/README.mdnu[README for FreeTDS 1.4 ==== *Release date 23th September 2023* **To build FreeTDS read the file [INSTALL](./INSTALL.md) or the [FreeTDS Users Guide](http://www.freetds.org/userguide/)** FreeTDS is a free implementation of Sybase's DB-Library, CT-Library, and ODBC libraries. FreeTDS builds and runs on every flavor of unix-like systems we've heard of (and some we haven't) as well as Win32 (with or without Cygwin), VMS, and Mac OS X. Failure to build on your system is probably considered a bug. It has C language bindings, and works also with Perl and PHP, among others. FreeTDS is licensed under the GNU LGPL license. See [COPYING_LIB.txt](./COPYING_LIB.txt) for details. Other files you might want to peruse: * [AUTHORS](./AUTHORS.md) Who's involved * [NEWS](./NEWS.md) Summary of feature changes and fixes * [TODO](./TODO.md) The roadmap, such as it is Also, [api_status](./doc/api_status.txt) shows which functions are implemented. For details on what's new in this version, see NEWS. For unbearable detail, see git log. Documentation ============= A User Guide, in XML and HTML form, is included in this distribution. Also included is a reference manual, generated in HTML with Doxygen. "make install" installs the HTML documentation, by default to /usr/local/share/doc/freetds-. Note to Users ============= Submissions of test programs (self-contained programs that demonstrate functionality or problems) are greatly appreciated. They should create any tables needed (since we obviously don't have access to your database) and populate them. Unit tests for any of the libraries is appreciated Notes to Developers =================== The code is split into several pieces. 1. `tds` directory is the wire level stuff, it should be independent of the library using it, this will allow db-lib, ct-lib, and ODBC to sit on top. 2. `db-lib` directory. This is the actual db-lib code which runs on top of tds. 3. `ct-lib` directory. This is the ct-lib code which runs on top of tds. 4. `server` directory. This will be a set of server routines basically to impersonate a dataserver, functions like send_login_ack() etc... 5. `odbc` directory. ODBC implementation over tds. Uses iODBC or unixODBC as a driver manager. You need to have one of those if you are using the ODBC CLI. 6. `unittests` directories. Test harness code for ct-lib, db-lib, ODBC and libtds. 7. `samples` directories. Sample code for getting started with Perl, PHP, etc... 8. `pool` directory. A connection pooling server for TDS. Useful if you have a connection limited license. Needs some hacking to get configured but is quite stable once configured correctly. Contact the list if interested in how to use it. Please look at doc/getting_started.txt for a description of what is going on in the code. Side note: Brian, as many free software authors, appreciates postcards from all over. So if you live someplace neat (read: not Michigan) and want to send one, email him (brian@bruns.org) for his current snail mail address. PKsiZFNFF$freetds/ea-freetds-1.4.9/COPYING.txtnu[ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. PKsiZd #freetds/ea-freetds-1.4.9/AUTHORS.mdnu[Brian Bruns Started this crazy thing James K. Lowden Documentation, maintainer from 2003 to early 2015. Marc Abramowitz Testing and patches, Travis CI tests. Koscheev Andrey Negative money patch. Craig A. Berry VMS support. James Cameron GNU standards compliance and minor fixes. Peter Deacon Lots of help, testing and patches. John F. Dumas Patch to fix memory leaks. David Fraser Testing and patches (NO-DM support). Scott Gray TDS 7.0 numeric support and bug fixes. Alex Hornby Testing and patches. Mihai Ibanescu GNUified the packet. Gregg Jensen Message handlers and extra datatype support and some sybperl stuff? Viktar Klimkovitch ODBC fixes to get libodbc++ working. Bob Kline NTEXT support. Lothar Krauss ODBC fixes. Steve Langasek Off by one fixes and autoconf byte size thing. Debian package maintainer. Mark J. Lilback Implementation of dbstrlen and dbstrcpy. Kevin Lyons Various TDS bug fixes. Steve Murphree Contributed a huge ODBC patch. Dennis Nicklaus vxWorks port and fixes for dbdata() and SYBVARBINARY. Arno Pedusaar Donated his TDS4.2 code to the cause. Brandon M. Reynolds Fix for arbitrarily large queries under dblib. Thomas Rogers Testing and patches. Mark Schaal Cleaned up message handling, bug fixes, ctlib unittests. Ken Seymour ODBC Driver Fixes. Craig Spannring JDBC driver and CVS repository. Martin Spott Testing and patches. Sam Tetherow Various TDS bug fixes. Bill Thompson BCP patches and datetime fixes. Patrick van Kleef Various bug fixes, dbcanquery() and odbc version checks. Geoff Winkless Lost connection stuff. Nicholas S. Castellano Many bug fixes and improvements, contributor of fisql application. Frediano Ziglio Lot of contributions, maintainer since 2015. Special thanks to Michael Peppler , author of the DBD::Sybase Perl module. Thanks go to the folks at A2i, Inc. (http://www.a2i.com) for funding the development of dblib host file bulk copy and writetext support, and to Dave Poyourow there for helping with the debugging. PKsiZ3֚((7freetds/ea-freetds-libs-1.4.9/samples-odbc/odbctest.phpnu[ PKsiZ e 77Kfreetds/ea-freetds-libs-1.4.9/samples-odbc/unixodbc.freetds.driver.templatenu[# # $Id: unixodbc.freetds.driver.template.in,v 1.2 2006-09-13 11:56:37 freddy77 Exp $ # # FreeTDS - Library of routines accessing Sybase and Microsoft databases # Copyright (C) 1998-1999 Brian Bruns # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # [FreeTDS] Description = FreeTDS unixODBC Driver Driver = /opt/cpanel/freetds/lib64/libtdsodbc.so Setup = /opt/cpanel/freetds/lib64/libtdsodbc.so PKsiZ6freetds/ea-freetds-libs-1.4.9/samples-odbc/odbctest.plnu[#!/usr/local/bin/perl # $Id: odbctest.pl,v 1.2 2005-04-04 22:05:33 jklowden Exp $ use DBI; my ($dsn, $user, $pass, $sql) = @ARGV; $dsn = "dbi:ODBC:JDBC" unless $dsn; $user = 'guest' unless $user; $pass = 'sybase' unless $pass; $sql ="select \@\@servername" unless $sql; my $dbh = DBI->connect($dsn, $user, $pass, {PrintError => 1}); die "Unable for connect to server $DBI::errstr" unless $dbh; my $rc; my $sth = $dbh->prepare($sql); if($sth->execute) { while(@dat = $sth->fetchrow) { print "@dat\n"; } } PKsiZg$>freetds/ea-freetds-libs-1.4.9/samples-odbc/unixodbc.install.shnuȯ#! /bin/sh # # $Id: unixodbc.install.sh,v 1.1 2002-10-09 17:05:44 castellano Exp $ # # FreeTDS - Library of routines accessing Sybase and Microsoft databases # Copyright (C) 1998-1999 Brian Bruns # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # # Run this script as root to install FreeTDS unixODBC drivers and datasources. # # You will most likely want to edit unixodbc.jdbc.datasource.template # to add your own dataserver instead of the public Sybase dataserver. # # For more information about these template files, please see # http://www.unixodbc.org/doc/FreeTDS.html # # Install driver. odbcinst -i -d -f unixodbc.freetds.driver.template # Install system datasource. odbcinst -i -s -l -f unixodbc.jdbc.datasource.template PKsiZK003freetds/ea-freetds-libs-1.4.9/samples-odbc/odbc.ininu[; ; odbc.ini ; [ODBC Data Sources] JDBC = Sybase JDBC Server [JDBC] Driver = /usr/local/lib/libtdsodbc.so Description = Sybase JDBC Server Trace = No Servername = JDBC Database = pubs2 UID = guest [Default] Driver = /usr/local/lib/libtdsodbc.so PKsiZhLfreetds/ea-freetds-libs-1.4.9/samples-odbc/unixodbc.jdbc.datasource.templatenu[# # $Id: unixodbc.jdbc.datasource.template,v 1.1 2002-10-09 17:05:44 castellano Exp $ # # FreeTDS - Library of routines accessing Sybase and Microsoft databases # Copyright (C) 1998-1999 Brian Bruns # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # [JDBC] Driver = FreeTDS Description = Sybase JDBC Server Trace = No Servername = JDBC Database = pubs2 UID = guest PKsiZ[y'c'c-freetds/ea-freetds-libs-1.4.9/COPYING_LIB.txtnu[ GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! PKsiZ~7freetds/images/caution.gifnu[GIF87a!!11BBZZcckkss{{sss{s{cZcc19B191,uH_@Ȑ 6DHB $N$ 4>pиa (e|QGE(YaD`P 8j,XEJt@P?MeHL)%d)؝ JCgep`-[ tYb 16|o "ؕd=H)UDFW4  热-XċBݐ'ơ:o ;PKsiZs̚freetds/images/callouts/3.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, wG)98\ r@ ƹ!x0֌d.SAq$VDPsd1TBlE$gfe.FwV޽Vc,<M C҄;PKsiZBi͛freetds/images/callouts/8.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, x l%%E) |!8'PRެ ƽRxnCJ 108P\F%.s,aA9B'YD@;J8=c8sfw R";PKsiZDyfreetds/images/callouts/2.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, pG)98\ R!{g A,e @=hDo("HfTrN+YsYS$5Ĉ!彇I=dà5- #gJ ;PKsiZdtfreetds/images/callouts/10.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!,   . ÛjJ9)) ZxHIDg_7s|3P.urF@b5<ڋ^0Up\F ;PKsiZiЗfreetds/images/callouts/5.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, t  .)B@Ûr0|N Jȓ*le )9P`@;PKsiZ~ϲfreetds/images/callouts/1.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, _G)98\ 9 =F##K#N+#%/cI3&{(D-  ;PKsiZu]AFfreetds/images/callouts/7.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, k %%E % wO  !@qN ƽ^Bp"J&E2G {͐jD2?)0c ) Ykh BN9 HQT`@;PKsiZ߶freetds/images/callouts/4.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, p l%%E % 8'C%8qC(jtH"VލC- [e)1r A1 rcG3?2㨷5{(K;PKsiZgfreetds/images/callouts/9.gifnu[GIF89a   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, | l%%E) wO ݹsr:̉5Jcr/92@>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!, z l%%E %  )8'!RC ǽVÀ],+"G108<ΙMثCg`] 2w{Hqɜ/SxSxK1 ;PKsiZ2U/freetds/images/tip.gifnu[GIF87a  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~, HA*xX)J"Btvoa{&!%J,2M3QUQsj)TK!s W&tV{{BYTI7yFЛх*^Uh k`֔x˞ )Hv[?]m&V'^BxpBÀ#DẂV2 g-Oz3& kQ«k='ۘɔ=x"m|_@;PKsiZo>s99freetds/images/important.gifnu[GIF87a)))999BB1BBBJJJRRRZZ)ccccRccckkBkkkssR{{{9{ZZc{c!9k{JRZZsRck!19R!)1Zc{1B19J!,HpA*ܲĆ ""Bae!A+3,|ҤcG,0$WRTC dd͔ML9& |ܰs 5WR@ARM< $J rSG 8Pܼ"i'c9,""LdOW`+D2ͫ2$ou;w ;PKsiZo..freetds/images/note.gifnu[GIF87a  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~, HA*ثR:[1F{1J&R<(Zʓ[Hi&L5 :+ub)LS`QzRAJ5kr͚3F Ftn9 <Ҙ9Mu lFQE=5k-5Szҿw=QbsT¸$eJ{Jq\ǫ=@W˚Z!l3ƦR<-%3!c[B*'{ƚxyǨ^Sj lĊQ9o;6$H;PKsiZGїYUUfreetds/userguide/index.htmlnu[

at www.freetds.org PKsiZ#+z+z freetds/ea-freetds-1.4.9/NEWS.mdnu[PKsiZ-&&%{zfreetds/ea-freetds-1.4.9/tds_ssl.htmlnu[PKsiZq Ҡfreetds/ea-freetds-1.4.9/TODO.mdnu[PKsiZD[!freetds/ea-freetds-1.4.9/tds.htmlnu[PKsiZ,d  "^freetds/ea-freetds-1.4.9/README.mdnu[PKsiZFNFF$freetds/ea-freetds-1.4.9/COPYING.txtnu[PKsiZd #freetds/ea-freetds-1.4.9/AUTHORS.mdnu[PKsiZ3֚((7freetds/ea-freetds-libs-1.4.9/samples-odbc/odbctest.phpnu[PKsiZ e 77Ktfreetds/ea-freetds-libs-1.4.9/samples-odbc/unixodbc.freetds.driver.templatenu[PKsiZ6&freetds/ea-freetds-libs-1.4.9/samples-odbc/odbctest.plnu[PKsiZg$>freetds/ea-freetds-libs-1.4.9/samples-odbc/unixodbc.install.shnuȯPKsiZK003freetds/ea-freetds-libs-1.4.9/samples-odbc/odbc.ininu[PKsiZhL$freetds/ea-freetds-libs-1.4.9/samples-odbc/unixodbc.jdbc.datasource.templatenu[PKsiZ[y'c'c-freetds/ea-freetds-libs-1.4.9/COPYING_LIB.txtnu[PKsiZ~7=Xfreetds/images/caution.gifnu[PKsiZs̚\freetds/images/callouts/3.gifnu[PKsiZBi͛}`freetds/images/callouts/8.gifnu[PKsiZDyedfreetds/images/callouts/2.gifnu[PKsiZdtEhfreetds/images/callouts/10.gifnu[PKsiZiЗ9lfreetds/images/callouts/5.gifnu[PKsiZ~ϲpfreetds/images/callouts/1.gifnu[PKsiZu]AFsfreetds/images/callouts/7.gifnu[PKsiZ߶wfreetds/images/callouts/4.gifnu[PKsiZg{freetds/images/callouts/9.gifnu[PKsiZ+Cfreetds/images/callouts/6.gifnu[PKsiZ2U/}freetds/images/tip.gifnu[PKsiZo>s99ȇfreetds/images/important.gifnu[PKsiZ.閔Mfreetds/images/warning.gifnu[PKsiZo..freetds/images/note.gifnu[PKsiZGїYUU(freetds/userguide/index.htmlnu[PK ɕ