Freetds Error 100
Contents |
to be able to use Python (my new development weapon of choice) to communicate with SQL Server from GNU/Linux (specifically sqlgetprivateprofilestring failed with unable to find component name Ubuntu). Part of this equation is to installFreeTDS, which is a set
Unixodbc Freetds
of C libraries that facilitate talking to SQL Server from Linux. I'm still wading through both pyodbc and error 20002 (severity 9): adaptive server connection failed pymssql but from what I can tell thus far both these solutions use (or can use) FreeTDS. (Random aside: if you're familiar with jTDS that's a Java implementation of pymssql FreeTDS. And another fun fact, TDS stands for "Tabular Data Stream," which is the protocol used by the native SQL Server client from Microsoft.) Installing and using FreeTDS is simple enough but I figured I'd take notes for my own reference and share in case they help anyone else wanting to set this up. Installation If you're familiar with compiling and installing things from source on Linux there's nothing new here, and if you're not, this will show you just how easy this is. First, download FreeTDS by clicking on the "stable release" link on the right-hand side of http://freetds.org,extract the tar file, and in a terminal, navigate to the directory to which the files were extracted. Next, type the following three commands, hitting enter after each one: ./configure make sudo make install You'll see a ton of stuff being spit out to your terminal as you do this, but unless you see actual error messages that cause the execution of any of this to abort, that's all there is to it. You can test the installation and get some information about the compile settings, etc. by typing this in a terminal: tsql -C With FreeTDS installed, now you just need to add some information to a configuration file to provide details about the servers and databases to which you wish to connect. Configuration In your terminal, navigate to /usr/local/etc/ and in that directory you
server port mismatch Re: tsql -S works but tsql -H times out Newsgroups: gmane.comp.db.tds.freetds Date: Wednesday 9th May 2012 19:48:46 UTC (over 4 years ago) Thanks Eric-- Someone had turned on dynamic ports on the SQL server and didn't http://blog.mattwoodward.com/2012/08/freetds-quick-start.html set it back so instead of having the server listening at 1433 like I thought. tsql -LH 123.123.123.123 showed the portnumber to be up in the 49000 range. tsql -H 123.123.123.123\\instancename -p portnumber -U http://permalink.gmane.org/gmane.comp.db.tds.freetds/14494 Things worked when instead of using 1433, I set it to the right number. my freetds.conf only had [shortname] host = 123.123.123.123 instance = instance tds version = 8.0 and didn't have a port = in it. Am guessing that tsql -S shortname -U sa was talking to the SQL Server Browser which sent things to the correct dynamic port For what it's worth TDSVER=7.2 tsql -H 123.123.123.123\\instancename -p portnum -U username on SQL Server 2008 Express will connect but first throws up the following error Error 100 (severity 11): unrecognized msgno 1> Changing to TDSVER=8.0 fixes that. CD: 3ms
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/33341510/how-to-install-freetds-in-linux the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow http://marc.info/?l=freetds&m=104345784824182&w=2 Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping freetds error each other. Join them; it only takes a minute: Sign up How to install freetds in Linux? up vote 1 down vote favorite 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 freetds error 100 /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? sql-server linux freetds unixodbc share|improve this question edited Oct 26 '15 at 8:44 asked Oct 26 '15 at 8:38 Hrvoje T 140111 check my the steps I followed here, hope that help you: stackoverflow.com/questions/34725523/… –Hasan A Yousef Jan 11 at 15:54 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote I've created a Vagrant box which has a full installation example here: https://github.com/FlipperPA/django-python3-vagrant/ ...but here are the basic steps. # Install pre-requesite packages sudo apt-get install unixodbc unixodbc-dev freetds-dev freetds-bin tdsodbc Point odbcinst.ini to the driver in /etc/odbcinst.ini: [FreeTDS] Description = v0.91 with protocol v7.2 Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Create your DSNs in odbc.ini: [dbserverdsn] Driver = FreeTDS Server = dbserver.domain.com Port = 1433 TDS_Version = 7.2 ...and your DSNs in freetds.conf: [global] # TDS protocol version, use: # 7.3 for SQL Server 2008 or greater (tested through
not all that familiar with ODBC but I think I've come across a problem with the \ freetds ODBC driver. Of course, the problem could be in my code or my ODBC driver \ (unixODBC 2.2.2). I'm using freetds 0.60, and the DB server is MS SQLServer 2000. When I run a query with SQLExecDirect or SQLExecute and it returns an error, I can't \ seem to get any details about the error with SQLGetDiagRec - it returns 100 \ (SQL_NO_DATA), and the error fields and error code are not returned. SQLGetDiagRec \ seems to work for an error from SQLConnect, however. I've enclosed an example program that uses SQLExecDirect. It tries to SELECT uid FROM \ master..sysusers (which should succeed) and then it tries to fail with SELECT uid FRO \ master..sysusers (which should fail with an error message, I would hope) You'll need to edit the SQLConnect line in main() to run it. -- Craig Davison Symantec Corporation +1 (403) 213-3939 ext. 228 ["error100_post.c" (text/plain)] #include