freetds

What is TDS Protocol Version 8.0 and why should I use it?

二次信任 提交于 2019-11-28 02:53:41
问题 I've been using FreeTDS with 8.0 protocol for some time to connect to a MSSQL Database, and things have worked great. But, recently, things started to not work so great. I'll spare the details. So we decided we needed to know a bit more, and I am a bit confused by the following: Does FreeTDS support Microsoft servers? Yes. Microsoft servers don't usually accept TDS 5.0 connections. Use one of versions 4.2, 7.0 or 8.0 of the protocol. See the User Guide for details. User Guide [No mention of 8

FreeTDS working, but ODBC cannot connect

99封情书 提交于 2019-11-27 23:05:12
问题 I am trying to run connect to a MSSQL server from an Ubuntu 12.04 webserver with FreeTDS and unixODBC. Using tsql i can connect to the server with ~$ tsql -S dbs3 -U <username> -P <password> No problem there. When I try to connect with isql however, I get the following error message: ~$ isql -v database3 <username> <password> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source [01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name. [ISQL]ERROR: Could not SQLConnect

Read from the server failed when trying to connect to sql-azure from tsql

◇◆丶佛笑我妖孽 提交于 2019-11-27 22:31:11
I'm trying to connect to SQL-Azure from Ubuntu 12.04. I've compiled freeTds-0.91 with openssl and libiconf tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password I try connect using the above statement and I get this error: locale is "en_ZA.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Default database being set to DatabaseName Error 20004 (severity 9): Read from the server failed OS error 104, "Connection reset by peer" Error 20002 (severity 9): Adaptive Server connection failed There was a problem connecting to the server My tsql -C output:

linux环境php调用sqlServer2000存储过程遇到的问题

三世轮回 提交于 2019-11-27 16:18:33
  在linux环境中用php查询sql server并不是很常见的需求.一般来说如果一定要用sql server,编程语言我会先c#;如果一定要用php,数据库我就选mysql.   这几天的开发中,需要从一 个非开源的erp系统中获取数据,它使用的数据库是sql server 2000,并使用了很多存储过程.我们要基于这个系统做一些报表类的功能,并把这些功能集成到一个原有的PHP开发的crm系统中.需求来了~   在linux环境中用php查询sql server可以用php自带的 mssql 扩展或 pdo_dblib 扩展,这两个扩展都需要freetds类库的支持.   在程序调试过程中我绕了很多弯,把里面几个重点记录一下. 1.tds版本设置 参考自: http://cubist.cs.washington.edu/doc/FreeTDS/userguide/x574.htm 我用的是sql server 2000,tds版本应该设置成8.0 ,修改 freetds.conf [global] # TDS protocol version # 前面不要带分号 tds version = 8.0 调试中发现,如果使用 pdo_dblib 扩展,这个版本设置没有什么影响,设置成几都能运行;如果使用 mssql 扩展,这个版本一定要设置成8.0,否则会报错. 2

SQL Server error 1934 occurs on INSERT to table with computed column PHP/PDO

余生颓废 提交于 2019-11-27 15:38:19
After adding a computed column to a table in SQL Server 2005 I am getting the following message on INSERT , only via PHP (using PDO) it's working fine in SQL Server Managment Studio. To ensure I had everything correct I setup a trace with SQL Server Profiler and copy/pasted the INSERT statement into SQL Server Managment Studio. It ran just fine in SSMS, but continues to fail in PHP. Error adding contact: SQLSTATE[HY000]: General error: 1934 General SQL Server error: Check messages from the SQL Server [1934] (severity 16) [(null)] Turns out the problem had to do with the SET parameters. I used

“Adaptive Server is unavailable or does not exist” error connecting to SQL Server from PHP

走远了吗. 提交于 2019-11-27 11:54:53
I'm attempting to connect to a SQL Server 2005 DB from my Mac using unixODBC and FreeTDS as I have outlined here . However, when I try to connect in to a different DB using the same setup, I get: Connection Failed:[FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist. Here is my freetds.conf setup: [my_db] host = 12.34.56.789 port = 1433 tds version = 8.0 And here is my odbc.ini: [my_dsn] Driver = /opt/local/lib/libtdsodbc.so Description = My Database Trace = no Servername = my_db Database = MyDB [ODBC Data Sources] my_dsn = FreeTDS I am still able to connect

freeTDS not using its config

五迷三道 提交于 2019-11-27 11:50:30
I've decided to use FreeTDS driver and unixODBC to manage the PDO connection between my LAMP-based app with a remote MsSQL database. unfortunately it appears that the driver doesn't read the freetds.conf file, nor the environmental variables set either directly via server's CLI or specified in php file by putenv() function. now some data: as I ping the server - no packets are lost. as I telnet the server on 1433 port - the connection is established as I use the command TDSVER=7.0 tsql -H >IP< -p 1433 -U username I am prompted to enter password and connection is established. without the TDSVER

using pyodbc on ubuntu to insert a image field on SQL Server

◇◆丶佛笑我妖孽 提交于 2019-11-27 11:48:49
问题 I am using Ubuntu 9.04 I have installed the following package versions: unixodbc and unixodbc-dev: 2.2.11-16build3 tdsodbc: 0.82-4 libsybdb5: 0.82-4 freetds-common and freetds-dev: 0.82-4 python2.6-dev I have configured /etc/unixodbc.ini like this: [FreeTDS] Description = TDS driver (Sybase/MS SQL) Driver = /usr/lib/odbc/libtdsodbc.so Setup = /usr/lib/odbc/libtdsS.so CPTimeout = CPReuse = UsageCount = 2 I have configured /etc/freetds/freetds.conf like this: [global] tds version = 8.0 client

How to install freetds in Linux?

白昼怎懂夜的黑 提交于 2019-11-27 11:45:11
问题 I am trying to connect to MSSQL server from Ubuntu. I have installed freetds like suggested here. However, when I try to configure /etc/odbc.ini and enter a driver path I have no driver at location /usr/local/freetds/lib/libtdsodbc.so . Can someone help me to install freetds and to configure odbc to use it? *edit1: I have found libtdsodbc.so in /usr/lib/x86_64-linux-gnu/odbc. Should I use that driver/path? 回答1: I've created a Vagrant box which has a full installation example here: https:/

PHP PDO_mssql SQLSTATE[01002] Adaptive Server connection failed (severity 9)

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 02:45:27
问题 I'm connecting to external MSSQL database for exports from PHP55/osx and I have wierd issue. code: new \PDO("dblib:host={$hostname};dbname={$dbname}", $user, $pass); throws: SQLSTATE[01002] Adaptive Server connection failed (severity 9) but connection from CLI works correcty tsql -S hostname -U user -P pass -L dbname: locale is "cs_CZ.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" 1> freetds.conf: [hostname] host = ipaddress port = 1433 tds version = 8.0 tsql -C: Version: