Pyodbc on Mac connection issues

徘徊边缘 提交于 2020-01-17 08:31:32
问题 I have FreeTDS, unixODBC in my python 3.6.1 installation I'm trying to get pyodbc connected to my sql server (local VM) . I have tried the following to test configuration of freetds tsql -S servername -U pydata I get the following message Error 20012 (severity 2): Server name not found in configuration files. locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20013 (severity 2): Unknown host machine name. There was a problem connecting to the server however

Connect to MS SQL Server Database Using isql on Mac

徘徊边缘 提交于 2020-01-16 18:17:31
问题 Summary: tsql connects and isql doesn't. Details: I have tried every official installation guide and Stack Overflow question I can find, but none of them produce joy. I'm trying to connect to a MS SQL Server database from my Mac (Mohave), and ultimately a Xubuntu 16.04 virtual machine as well, using pyodbc . Before getting into the Python, I just want to trouble-shoot the connection. The problem is, most of the documentation I'm seeing is missing important details such as, "Should I use

freeTDS on Linux and Azure database, login issue

只愿长相守 提交于 2020-01-15 23:02:35
问题 I try to connect to Azure database like: tsql -H -p 1433 -U mycorrectusername but I got message Msg 20004, Level 9, State 0, Server OpenClient, Line 0 Read from SQL server failed. Msg 20014, Level 9, State 0, Server OpenClient, Line 0 Login incorrect. There was a problem connecting to the server It is possible that I cant login because I have to choose database first. I have to, when I log in via website. When I try to choose database like: tsql -H XXXXXXXXX

Using mssql methods (FreeTDS, PHP and Apache on Mac OS X)

北慕城南 提交于 2020-01-14 14:17:11
问题 I have installed FreeTDS on my Mac, but I'm having some issues connecting using mssql_connect . First, when I run tsql -C I see that the freetds.conf directory is listed as /opt/local/etc/freetds . I have a freetds.conf file inside this directory. Next, if I connect like this: $connect = mssql_connect('IP_ADDRESS', 'username', 'password'); then everything works as expected. That is, I can retrieve, update, insert data from/into whichever DB I select with mssql_select_db() . If I try to

How to use windows authentication to connect to MS SQL server from windows workstation in another domain with Python

拥有回忆 提交于 2020-01-12 07:43:09
问题 I'm trying to connect to SQL server 2000 installed on Windows server 2003 from Windows Server 2008 R2 using Python 3.4 and pyodbc module. Those servers are in different AD domains. Windows only authentication is enabled on SQL server and I can't change that. drv = '{SQL server}' svr = '' usr = 'my-domain.local\testuser' pwd = 'password' db = 'testdb' pyodbc.connect(driver=drv, server=svr, user=usr, password=pwd, database=db) The connection above fails with the following

Working with Nodejs + MSSQL at Linux / Ubuntu

蹲街弑〆低调 提交于 2020-01-07 02:54:12
问题 I've my nodejs app connected to MSSQL server, worked perfectly in my Windows laptop, sing mssql@npm The same app is not able to see the database in my Ubuntu laptop. I defined the mssql connectivity in Ubuntu as below, am I missing any thing? Updated my ~/.profile, as: ~$ export ODBCINI=/etc/odbc.ini ~$ export ODBCSYSINI=/etc ~$ export FREETDSCONF=/etc/freetds/freetds.conf Logged-out the laptop, to get the above active, and the profile refreshed. Installed the required connectivity packages.

Java - connecting to a SQL Server database on Linux

 ̄綄美尐妖づ 提交于 2020-01-06 06:51:40
问题 I've downloaded and imported into my project this JDBC driver that supposedly supports Linux (albeit tested only on SUSE Linux). What I want is to be able to use a .mdf database through Java on Linux. The queries obviously need something to run on, not simply connect to a database - if I am understanding this correctly. I found a question on SO that seems to have valuable information concerning my issue. So I was thinking a FreeTDS + JDBC combination. Will queries execute as expected or do I

I can't make SQSH 2.1.7 with freetds 0.91

独自空忆成欢 提交于 2020-01-05 12:10:09
问题 I am having trouble building sqsh against freetds. This post cross-references with I've installed Freetds 0.91 from on Solaris 10. I've confirmed the installation as noted in Chapter 9 of the user guide. Following the sqsh notes from, I've set the SYBASE environment variable to /usr/local/freetds and run the configure script. (I do not have Sybase installed on this machine. I shouldn't need it.)

Connecting to SQL Server on Linux: tsql works; isql cannot log in

你离开我真会死。 提交于 2020-01-05 08:51:26
问题 I am trying to set-up a connection to a SQL server instance using Linux. My FreeTDS setup seems to work, but my unixODBC set-up does not. Here is what happens when I access the database with tsql: tsql -S STCONNSQLDEV\\RscSwitchboard -U sa_RSCSWITCHBOARD -P password locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Here is what happens when I use isql: isql RscSwitchboard sa_RSCSWITCHBOARD password -v [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to

Bash script makes connection using FreeTDS, interacts, doesn't exit (just hangs)

£可爱£侵袭症+ 提交于 2020-01-04 01:57:05
问题 I'm using FreeTDS in a script to insert records into a MSSQL database. The USE and INSERT commands work, but the exit command doesn't and it hangs. I've tried redirecting stdout but cat complains. I suppose I will use Expect otherwise. Meh. Thanks. echo -e "USE db\nGO\nINSERT INTO db_table (id, data, meta)\nVALUES (1, 'data', 'meta')\nGO\nexit" > tempfile cat tempfile - | tsql -H -p 1433 -U user -P pass 回答1: Did you mean to do this: cat tempfile - ? It means that it will wait for