freetds

FreeTDS doesn't use configured tds version

耗尽温柔 提交于 2019-12-13 12:29:35
问题 freetds v0.91 - tds version mismatched I want to connect to a Windows SQL Server with FreeBSD on Ubuntu 14.04. The FreeTDS is installed using apt-get. I tried different tds version with following commands: $ TDSVER=7.0 tsql -H xxx.xxx.xxx.xxx -U xxxx -p 1433 -P xxxxxxx The log file shows: ... net.c:205:Connecting to xxx.xxx.xxx.xxx port 1433 (TDS version 7.0) net.c:270:tds_open_socket: connect(2) returned "Operation now in progress" net.c:310:tds_open_socket() succeeded ... No problem here.

RODBC MS SQL access from Ubuntu using FreeTDS

百般思念 提交于 2019-12-13 11:39:51
问题 I'm trying to access MS SQL server hosted on my Windows box from an Ubuntu machine. I have a shiny app that access MSSQL that works fine on Windows. I want to host this with shiny server on Ubuntu so that others can access the webpage and provide their SQL server as input to the app. All of this works fine on Windows. Now I'm not able to get unixODBC working. I think I've got the odbc/freeTDS installation and configuration correct. I'm able to connect and query SQL DB instance from Ubuntu

FreeTDS translating MS SQL money type to python float, not Decimal

时间秒杀一切 提交于 2019-12-13 04:12:27
问题 I am connecting to an MS SQL Server db from Python in Linux. I am connecting via pyodbc using the FreeTDS driver. When I return a money field from MSSQL it comes through as a float, rather than a Python Decimal. The problem is with FreeTDS. If I run the exact same Python code from Windows (where I do not need to use FreeTDS), pyodbc returns a Python Decimal. How can I get back a Python Decimal when I'm running the code in Linux? 回答1: You could always just convert it to Decimal when it comes

MSSQL+ODBC+PHP = 0 rows in result

给你一囗甜甜゛ 提交于 2019-12-13 00:14:27
问题 I'm using remote MSSQL base via php + linux ODBC. All was fine, but today i wrote query with SET + PIVOT and got error: [unixODBC][FreeTDS][SQL Server]SELECT failed because the following SET options have incorrect settings: 'ANSI_NULLS, QUOTED_IDENTIFIER, CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or

Homebrew / TinyTDS / FreeTDS bundle error

我怕爱的太早我们不能终老 提交于 2019-12-12 10:46:15
问题 I used homebrew (linux port) to install freeTDS and am trying to deploy /bundle install my app with gem tinytds. I get this error output when doing bundle install Installing tiny_tds (0.5.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb /usr/bin/ld: /opt/homebrew/lib/libsybdb.a(dblib.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;

FreeTDS problem connecting to SQL Server on Mac (Unexpected EOF from the server)

浪子不回头ぞ 提交于 2019-12-12 08:34:23
问题 I have setup FreeTDS to connect to SQL Server database. When I try to open TSQL in terminal on Mac (lion) I get this error: locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20017 (severity 9): Unexpected EOF from the server OS error 36, "Operation now in progress" Error 20002 (severity 9): Adaptive Server connection failed There was a problem connecting to the server Does anybody have a clue what could be causing this? 回答1: To make this permenant I found I

How do I configure pyodbc to correctly accept strings from SQL Server using freeTDS and unixODBC?

我与影子孤独终老i 提交于 2019-12-12 08:10:13
问题 I can not get a valid string from an MSSQL server into python. I believe there is an encoding mismatch somewhere. I believe it is between the ODBC layer and python because I am able to get readable results in tsql and isql. What character encoding does pyodbc expect? What do I need to change in the chain to get this to work? Specific Example Here is a simplified python script as an example: #!/usr/bin/env python import pyodbc dsn = 'yourdb' user = 'import' password = 'get0lddata' database =

Go/Golang sql.DB reuse in functions

霸气de小男生 提交于 2019-12-12 07:50:22
问题 sql.Open() returns a variable of type *sql.DB I have a function that calls 10 other functions that all need to make database calls Is it more correct/efficient to: Send the *sql.DB pointer to every function, or Create a new *sql.DB object in each function Meaning func DoLotsOfThings() { db, _ := sql.Open() defer db.Close() DoTask1(db) DoTask2(db) } or func DoLotsOfThings() { DoTask1() DoTask2() } func DoTask1() { db, _ := sql.Open() defer db.Close() } func DoTask1() { db, _ := sql.Open()

Python-Data truncated and spaces are added between data while inserting into MsSQL

亡梦爱人 提交于 2019-12-12 04:07:33
问题 Upon inserting the data into the MS SQL Server DB, my values are getting truncated and single extra space is added in between. For eg:- HomeShop18 is saved as H o m e s . It is truncated as well and space is also included. But when I do select * from table where col= 'Homes' it shows the data. What is the problem? How can I insert the data into the SQL Server DB? Here's what I'm currently doing? PS : I have read threads on SO pointing out to increase the size and TDS version. I've tried it

FreeTDS error connecting to SQL Server 2014

假装没事ソ 提交于 2019-12-12 02:49:30
问题 I have tried all the version available from 4.2 until 7.2, it seems to me all the versions I've tried are invalid. Looking at the errors logs and based on the Choosing TDS protocol, is SQL server 2014 supported? Brief error: Error 20017 (severity 9): Unexpected EOF from the server OS error 115, "Operation now in progress" Error 20002 (severity 9): Adaptive Server connection failed Looking at the log dumped by tsql: log.c:196:Starting log file for FreeTDS 0.91 on 2016-04-05 15:35:48 with debug