Questions tagged [freetds]

FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Can't connect to MS SQL from linux using both ODBC and freetds

I am trying to connect MS SQL 2016 sp2 from Red Hat 8. I tried both ms odbc and freetds but both do not work. tsql -S server_name -p 1433 -D db_name -U user_name -P pwd Error: log.c:187:Starting ...
  • 301
0 votes
0 answers
20 views

SQL Server : character set conversion is not available between client character set

I'm extracting data from a SQL Server database using the ctds Python library. I get the following error: _tds.DatabaseError: Character set conversion is not available between client character set '(...
0 votes
0 answers
19 views

How to debug the PDOException "There is already an active transaction"?

I have Symfony Messenger on Symfony 4.4. The handler works with a Microsoft SQL Server 2019 (RTM-CU2) (KB4536075) - 15.0.4013.40 (X64). The connection to this db is done with a php custom library that ...
  • 1,433
0 votes
1 answer
326 views

pyodbc.ProgrammingError: ('42000', "[42000] [FreeTDS][SQL Server]Incorrect syntax near ';'.\n (102) (SQLExecDirectW)")

I am executing below code using ctrlM job then I am experiencing pyodbc.ProgrammingError: ('42000', "[42000] [FreeTDS][SQL Server]Incorrect syntax near ';'. (102) (SQLExecDirectW)") error ...
  • 15
0 votes
0 answers
12 views

ctds - Adaptive connection time out during bulk insert

While inserting data into MS SQL Server using ctds.bulkinsert It keeps on giving adaptive server connection timeout How do I get rid of the issue ? How can I use connection properties to increase time ...
0 votes
0 answers
104 views

How do I connect to microsoft sql server remotely with raspberry pi 4

I am trying to connect to microsoft sql server remotely with Raspberry pi 4 but I am getting error as below. What is the reason? I proceeded as stated in the link but failed. text import pyodbc dsn='...
0 votes
1 answer
89 views

FreeTD Character / in columnname

I am using FREETDS between two databases Oracle and SYBASE. My Query is running on the oracle database. The Sybase DB is connect by DBLINK thru the ODBC Gateway based on freetds. The query is: Select ...
  • 101
0 votes
0 answers
30 views

Way around the bcp/freebcp queryout Long Query String error

It's an old bug fixed in Microsoft's Q279180, that can no longer be viewed. In fact, you get that sardonic response from them. We would like to show you a description here but the site won’t allow us. ...
1 vote
0 answers
135 views

Error when connecting to MS SQL database using from Linux using PHP ODBC and FreeTDS

I am trying to connect to a MS SQl server using PHP PDO with ODBC and FreeTSD, but when I use the code below I get the following error: "SQLSTATE[08S01] SQLDriverConnect: 20009 [unixODBC][FreeTDS]...
  • 13
0 votes
1 answer
628 views

Error 20009 (severity 9): Unable to connect: Adaptive Server is unavailable or does not exist OS error 111, "Connection refused"

I tried to connect to MSSQl database using freetds, unixODBC in raspberry pi 4.Below are my settings. [fred] host = 109.*.*.* # Remote Sql Server's IP addr port = 1433 # this is default ...
0 votes
1 answer
253 views

pyodbc.Error: ('01000',"[01000][unixODBC][Driver Manager] can't open lib '/usr/lib/odbc/libtdsodbc/so' : file not Found (0) (SQLDriverConnect)")

I have followed Querying MSSQL from RaspberryPi to install FreeTDS on my Pi4. However, the error below occurs. ['FreeTDS'] Traceback (most recent call last ): File "/home/pi/Downloads/test1.py&...
0 votes
1 answer
74 views

Could not change transaction status (0) (SQLSetConnectAttr)

We have a Django app connected to a remote SQL-server database. I get an error when i try to do an update request on a database table : [HY000] [FreeTDS][SQL Server]Could not change transaction status ...
  • 45
0 votes
1 answer
135 views

Is there some limit to the SQL statements that pyodbc can execute, and I get an error when executing a long SQL statement?

I installed FreeTDS and unixODBC on CentOS 7, configured it and executed SQL query statements with pyodbc on Python 3.6 in order to fetch data from a remote Sybase database (SAP IQ 16) and found that ...
  • 1
0 votes
0 answers
169 views

Error to connect to mssql database from raspberry pi to sql server in windows (FreeTDS - Pyodbc)

I am trying to make a connection from python on a raspberry pi to sql server on a windows computer. I am making the connection with pyodbc and FreeTDS, when running it, it shows me the following error:...
  • 305
0 votes
0 answers
402 views

Why after installing freetds and odbcunix on Debian 11, I ca not connect to database in SQL server?

I am installing freetds and odbcunix on a Debian 11 virtual machine in order to connect from C++ applications to a SQL Server database using ODBC. Consulting several tutorials on the internet, I have ...
  • 113
0 votes
0 answers
149 views

Error Connecting to SQLServer - Login failed. The login is from an untrusted domain and cannot be used with Windows authentication

I am using the following code to connect to the SQL server database from my application. try: self.__db_conn = pymssql.connect(self.__db_host, self.__db_user, self.__db_pass, self.__db_name) ...
  • 4,121
0 votes
0 answers
156 views

Connectivity issues to SAP SQL Anywhere database as a secondary database with Django

I can connect to a SAP SQL Anywhere database with FreeTDS and pyodbc as follows: # hello_sybase.py import pyodbc try: con = pyodbc.connect('Driver={FreeTDS};' 'Server=10.60.1.6,2638;'...
  • 7,087
0 votes
1 answer
217 views

[FreeTDS][SQL Server]SQL Anywhere Error -265: Procedure 'SERVERPROPERTY' not found

I'm trying to connect to a SAP SQL Anywhere database with pyodbc and the FreeTDS ODBC driver. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path....
  • 7,087
1 vote
1 answer
2k views

Adaptive Server is unavailable or does not exist

I'm trying to connect to mssql server via FreeTDS. First I tried it via ODBC Driver 17 for SQL Server and it works. Here is my configuration in settings.py. DATABASES = { 'default': { '...
  • 7,087
0 votes
1 answer
148 views

odbcinst symbol lookup error SQLManageDataSources

I've just installed unixODBC on Pop-OS (Ubuntu 20 base). there's no odbcinst.ini file, just odbc.ini and when I run odbcinst -j I just get the following odbcinst: symbol lookup error: odbcinst: ...
0 votes
0 answers
484 views

Python SQLAlchemy pyodbc.Error: ('HY000', 'Unknown error')

I am working with python, sqlachemy and MSSQL. For no apparent reason I received the following error, it has only happened twice and I have not been able to replicate it. /usr/local/lib/python3.7/site-...
3 votes
2 answers
942 views

Can´t install tiny_tds in Windows 10

When I run: gem install tiny_tds The output tells me that I need FreeTDS installed. Next, it shows me some configuration options and that I'll probably need an option. The options are the following: ...
0 votes
0 answers
468 views

Postgres 14 tds_fdw for SQL Server requires setting ANSI_NULLS and ANSI_WARNING

I am looking into establishing foreign data wrapper between PostgreSQL 14 and remote SQL Server 2014. I do not have administrative-level access to the remote SQL Server, thus need to make changes only ...
  • 609
1 vote
1 answer
415 views

SqlAlchemy connection string using pymssql

Is there an equivalent of odbc_connect in pymssql using freeTDS driver? For example using pyodbc I can use connect within the connection string itself and then pass all required parameters: ...
  • 396
-2 votes
1 answer
330 views

Microsoft SQL Server, FreeTDS, and formatting of legacy datetime type

Why does a value of datetime type get displayed with a format using 12 hour clock and AM/PM, while datetime2 type is returned in ISO format? This using FreeTDS and the client programs sqsh and Perl's ...
  • 1,330
1 vote
1 answer
538 views

Fatal error: 'readline/readline.h' file not found

I am trying to compile FreeTDS for the iPhoneOS platform using Autotools. However, I get the error: Making all in fisql CC fisql.o fisql.c:29:10: fatal error: 'readline/readline.h' file not ...
  • 36
0 votes
1 answer
584 views

tds_fdw PostgreSQL Foreign Table Truncates Large Text to 2048 Characters

I have created several foreign tables already, and they all work fine, but now I have to deal with a table that has a column containing 20-30 KB of text in some rows. If that text is small, it is ...
  • 23
1 vote
1 answer
648 views

SQL Server connection using pymssql on Raspberry Pi 3

I'm trying to connect to SQL Server from Raspberry Pi 3. I've already tried everything that google search suggested and still can't manage to install pymssql using pip3. All the needed packages were ...
  • 19
2 votes
2 answers
1k views

I need a docker image that can get connected to an external MSSQL datatbase with php

I need a docker image that can get connected to an external MSSQL datatbase when executing a PHP script. I have created one, but I could only get connected to the DB through the tsql CLI. I think it ...
0 votes
1 answer
522 views

Can't connect to Azure SQL instance using FreeTDS config

I can connect from my Ubuntu 20.04 VM to my Azure SQL database with: TDSVER=7.3 tsql -H mysubdomain.database.windows.net -U un -P pw -p 1433 I want to get this working with freetds.conf, but it's ...
  • 1,699
0 votes
1 answer
250 views

Does FreeTDS ODBC + pyodbc support table-valued parameters (TVPs)?

I'm working on unix/rhel7 system. I have installed require drivers for FreeTDS, unixODBC and pyodbc.Other query is working fine but when I'm trying execute stored proc with TVP (table valued parameter)...
1 vote
1 answer
579 views

How do I update FreeTDS driver in RHEL-like Docker image?

I am passing some emoticon data from a postgres database object to SQL Server 2016 using pyodbc. Line 5 has my freeTDS driver I'm using. def __insert_records(self, rows, target_fields): try: ...
  • 608
0 votes
1 answer
322 views

Is freetds version 1.1.4 compatible with Microsoft SQL Server 2017?

We are planning to use freetds 1.1.4 in our organisation to connect to SQL Server 2017 using Perl and C++. We saw a compatiblity chart but it doesn't have any info for SQL Server 2017. Could you ...
1 vote
1 answer
2k views

Error 20002 while trying to connect to a server through tsql (OS X)

I've been using this guide for connecting to database through pyodbc: https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-Mac-OSX My config files look like this, in parallel with ...
  • 13
1 vote
0 answers
163 views

Can't find FreeTDS data sources with pyodbc

I've followed the various instructions for connecting to an ODBC data source using pyodbc via FreeTDS. I have most of it set up correctly, as I can connect to my data sources using either isql or tsql....
2 votes
1 answer
124 views

How to retrieve large values from SQL Server columns using DB Library for C?

I am using FreeTDS to process simple SELECT statements. My problem is that I cannot get more than the first 4096 bytes of a large column value. Let's say we have a table like this: CREATE TABLE tab ( ...
0 votes
0 answers
204 views

Migrate from FreeTDS driver to MSODBC17 driver

I needed to change our sql driver from FreeTDS to msobdc17 for msi support. The problem results in a degradation in our insertion operations. Specifically, when we insert in bulk (with batch size~=50),...
0 votes
1 answer
2k views

Pyodbc if connection fails retry

Hi there I have the following python code to connect to my SQL-Server DB class CDBTools: details = { 'server' : 'localhost', 'database' : 'MyDB', 'username' : 'me', ...
0 votes
0 answers
90 views

PHP CLI ODBC FreeTDS MSSQL Login failed

I have an AW server with CentOS. I have installed PHP7.3 and the PHP-CLI for it. I also installed ODBC and FreeTDS modules to be able to connect to a MSSQL database. I have written a PHP script which ...
  • 2,380
1 vote
2 answers
647 views

How to resolve SQL error when fetching data from a foreign data table in Postgres

I have a foreign data table created with tds_fdw which maps a SQL View on an MSSQL server to a foreign table in Postgres. I can view and query the data in this table without any issue. But I'm getting ...
0 votes
1 answer
415 views

Can't open lib 'FreeTDS' : file not found and /etc/odbcinst.ini is missing

I want to connect R to Athena in AWS so that I can get a table from the database into R. So I went online and I googled how to do this. I found this website here. That told me that I need to install ...
  • 357
2 votes
0 answers
1k views

Pyodbc can't connect to Sqlserver: Unable to connect to data source (0) (SQLDriverConnect)?

We are having an error when launching the tsql/isql in my python script. And I follow the solutions from the other answers but I couldn't debug it. Here's the error: Traceback (most recent call last): ...
  • 79
2 votes
0 answers
297 views

Is there anything I can use as a proxy to connect to a SQL Server (on TLS v1.2) from a legacy application which uses only TLS v1?

We have a legacy application (vendor product) which we don't have source for, which connects to a MS SQL Server 2008 using TLS v1. Now there is a mandate to move all connectivity to TLS v1.2. We are ...
  • 21
0 votes
0 answers
154 views

FreeTDS + Doctrine remove zero decimal

I have Symfony 3.4 + Doctrine 2 + FreeTDS + MSSQL Server 2005 I try to get decimal column from DB, and have little trouble. If in db i have value like 100.00 i have in return 100. But i wish to get ...
2 votes
0 answers
585 views

Pyodbc Connection error when trying to connect to remote sql server from azure docker container

Azure Docker Container Error: pyodbc.OperationalError: ('08S01', '[08S01] [FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist (20009) (SQLDriverConnect)') The ...
2 votes
0 answers
2k views

"Unknown host machine name" with FreeTDS and SQL Server

I am running Ubuntu 16.04.6 LTS xential 32bit. Currently I am trying to connect MSSQL Server Express 2019 running on the Windows10. Got freeTDS and Unixodbc I hit the command tsql -S ipaddress -U ...
0 votes
0 answers
117 views

connect to external sql server using pyodbc and FreeTDS drivers on rhel 7 linux

I have an AWS EC2 instance, installed FreeTDS, I run osql and it tells me Configuration looks ok but then does an isql. That fails. I tried the tsql -LH but nothing returned. tsql -S returns: ...
  • 1
0 votes
0 answers
260 views

FreeTDS/pyodbc produces segmentation fault - driver for Raspbian?

I wrote a small Python script to use executemany(sql, *params), with fast_executemany=True. Running it produces a 'segmentation fault' error. The fast_executemany = True uses an ODBC feature called "...
0 votes
1 answer
2k views

Run sql script on remote SQL Server database from my Linux machine

I have a .sql file in my linux machine. I would like to connect to MS SQL database in the remote windows machine and run the .sql file in that database. osql -S servername -U xx -P yy runs okay and ...
1 vote
2 answers
3k views

Error during install of `pymssql` on Mac -- FreeTDS

I have reviewed numerous questions on this topic but all seem either out of date or unhelpful. I am attempting to set up pymssql using pip3. I have python version 3.7 and freetds version 1.1.26. When ...
  • 1,532

1
2 3 4 5
14