freetds

FREETDS and UNIXODBC character converting

拜拜、爱过 提交于 2019-12-09 12:52:22
问题 ive got an error to fix. its: [FreeTDS][SQL Server]Error converting characters into server's character set. Some character(s) could not be converted when i use turkish characters to insert i get this error. my question is how can i disable that converting thing? im connecting to sql server via freetds and unixodbc. thanks.. 回答1: You need to set client charset = UTF-8 in your freetds.conf file and read it from odbc.ini by setting the Servername option to the connection definition in freetds

odbc unable to connect to MSSQL data source on OS X Lion

浪尽此生 提交于 2019-12-08 18:39:47
问题 odbc isql was unable to connect to data source: $ isql SMS_GTWY username password -v returns: [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 while tsql is ok: $ tsql -S SERVER001 -U username -P password returns: locale is "C/UTF-8/C/C/C/C" locale charset is "UTF-8" using default charset "UTF8" 1> $ cat ~/.freetds.conf : [SERVER001] host = 192.168.8.101 port = 1433 tds

freebcp: “Unicode data is odd byte size for column. Should be even byte size”

醉酒当歌 提交于 2019-12-08 15:17:11
问题 This file works fine (UTF-8): $ cat ok.txt 291054 Ţawī Rifā This file causes an error (UTF-8): $ cat bad.txt 291054 Ţawī Rifā‘ Here's the message: $ freebcp 'DB.dbo.table' in bad.txt ... -c Starting copy... Msg 20050, Level 4 Attempt to convert data stopped by syntax error in source field Msg 4895, Level 16, State 2 Server '...', Line 1 Unicode data is odd byte size for column 2. Should be even byte size. Msg 20018, Level 16 General SQL Server error: Check messages from the SQL Server The

How to install mssql in ubuntu 12.04

限于喜欢 提交于 2019-12-08 08:49:21
问题 Installed freetds /etc/odbcinst.ini [FreeTDS] Description = ODBC for Microsoft SQL Driver = /usr/lib/libtdsodbc.so UsageCount = 1 Threading = 2 /etc/odbc.ini [myserver-connector] Description = MS SQL connection to 'asterisk' database Driver = FreeTDS Database = mydb Server = 192.168.100.1 UserName = sampleuser Password = password Trace = No TDS_Version = 7.0 Port = 1433 echo "select 1" | isql -v myserver-connector I got following error message: [01000][unixODBC][Driver Manager]Can't open lib

Django: Unable to connect to Microsoft SQL Server

心不动则不痛 提交于 2019-12-08 02:48:06
问题 I am unable to connect to the MS SQL server using Django (Version- 1.11.3) Here is the error, I seem to be getting: django.db.utils.OperationalError: ('08001', u'[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)') This is the odbcinst.ini file: [FreeTDS] Description=TDS driver (Sybase/MS SQL) Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup=/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so CPTimeout= CPReuse= UsageCount=2 This is the django

mssql_connect(): Unable to connect to server (without freetds.conf)

独自空忆成欢 提交于 2019-12-08 02:20:15
问题 I have 2 servers: one is OpenSUSE, another one is SLES 11 sp2 Suse Linux Enterprise Server. In order to have connection to MSSQL I have to install mssql.so for php. OpenSUSE permits to install mssql from rpm. SLES - does not have mssql rpm, and this is why need to compile it. OpenSUSE: mssql rpm installed => $server="172.x.x.x:49888"; $username="username"; $password="password"; $link = mssql_connect($server, $username, $password); here successfully connected to MSSQL! SLES: with mssql.so

Error connecting to MS SQL Server using pyODBC, unixODBC and FreeTDS (on a Mac)

不羁岁月 提交于 2019-12-08 02:04:29
问题 I am getting an error when trying to connect to a MS SQL server in python, using the pyODBC --> unixODBC --> FreeTDS --> MS SQL stack. I’ve spent a lot of time on this, and there are some great resources if you’ve reached this question with more fundamental problems getting a connection to work here and here. However, my question is regarding an error that (I think) is very close to the finish line of this very frustrating experience. Specifically, this code in jupyter notebook: pyodbc

“USE statement is not supported to switch between databases” when running query

浪尽此生 提交于 2019-12-07 15:22:41
问题 I get the following error when trying to select a database with php's standard mssql_select_db function: USE statement is not supported to switch between databases. Use a new connection to connect to a different Database. (severity 16) . So i'm stumped as in where to go from here. Connection Code: $link = mssql_connect('dsn', 'user@server', 'password'); if (!$link) { die('Unable to connect!'); } if (!mssql_select_db('db', $link)) { die('Unable to select database!'); } $result = mssql_query(

Using UnixODBC and FreeTDS to connect to Pervasive SQL server in ubuntu?

别说谁变了你拦得住时间么 提交于 2019-12-07 15:20:33
问题 I am trying to connect to a Pervasive Sql Server which is running on Windows 10 from an Ubuntu 14.04.4 server. I am using the following services to try connect to the server: FreeTDS unixODBC Before starting I tried to ping the host machine from the vm console with success. I then run the following command to check FreeTDS has installed correctly; tsql -C Which returned: Compile-time settings (established with the "configure" script) Version: freetds v0.95.95 freetds.conf directory: /usr

Cannot install pymssql on windows

强颜欢笑 提交于 2019-12-07 04:48:37
问题 i am trying to install pymssql as pip install pymssql i have windows 7 and python 3.5 (from anaconda) but i get Failed building wheel for pymssql i believe its related to freetds and python-dev . how do i install these on windows? Which packages would i need to install? this pip install worked just fine for python 2.7. If the pip does not work,is there any other way i can download and install pymssql? 回答1: I just went through this small bit of hell and finally got things working, here is what