Freetds Error 100 Unrecognized Msgno
Contents |
to be able to use Python (my new development weapon of choice) to communicate with SQL Server from GNU/Linux (specifically Ubuntu). Part of this equation is to installFreeTDS, which is a set of C libraries that facilitate talking to SQL Server
Sqlgetprivateprofilestring Failed With Unable To Find Component Name
from Linux. I'm still wading through both pyodbc and pymssql but from what I can unixodbc freetds 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 FreeTDS.
Pymssql
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'll see the file freetds.conf Open that file in vim or your favorite text editor (note that you need to open the file using sudo). The file contains some global settings and a couple of sample server entries, and you'll just be adding a new section to this config file. At the bottom of the file add the following information, adjusting as appropriate with the connection information for your server and database. [foo] host = my.sqlserver.com port = 1433 tds version = 7.2 A few notes about these settings: The [foo] in brackets at the top can be anything you want. That's simply an alias for these configuration settings, and we'll see how this is used in t
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss 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 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, http://blog.mattwoodward.com/2012/08/freetds-quick-start.html helping 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 http://stackoverflow.com/questions/33341510/how-to-install-freetds-in-linux location /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 g
a GitHub account Sign in Create a gist now Instantly share code, notes, and snippets. Star 9 Fork 1 tommct/README.md Last active Sep 10, 2016 Embed What would you https://gist.github.com/tommct/5749453 like to do? Embed Embed this gist in your website. Embed Share http://dba.stackexchange.com/questions/35643/can-connect-to-sql-server-through-tsql-but-not-from-the-bsqldb Copy sharable URL for this gist. Share Clone via HTTPS Clone with Git or checkout with SVN using the repository's web address. HTTPS Learn more about clone URLs Download ZIP Code Revisions 5 Stars 9 Forks 1 FreeTDS and pyodbc on Mac OS X 10.8 via Homebrew Raw README.md After spending freetds error many hours trying to get FreeTDS and unixodbc to run on a Mac OS X 10.8 system with the python module, pyodbc, I eventually came to this recipe, which is remarkably simple thanks to homebrew. I also found unixodbc was unnecessary and I couldn't get it to play well with FreeTDS, so this install does not include unixodbc. See also http://www.acloudtree.com/how-to-install-freetds-and-unixodbc-on-osx-using-homebrew-for-use-with-ruby-php-and-perl/ and http://www.cerebralmastication.com/2013/01/installing-debugging-odbc-on-mac-os-x/. Prerequisites: freetds error 100 Be sure you have XCode and the Commandline Tools for XCode installed from Apple. Also install homebrew followed with brew update and brew doctor. Install FreeTDS: brew install freetds Test your install: tsql -H
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss 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 Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Can connect to SQL Server through tsql but not from the bsqldb up vote 5 down vote favorite After installing FreeTDS I was able to connect to our SQL Server using tsql but not yet through bsqldb. With bsqldb it's trying to connect to the master even though the db was specified to testDB. serverName is setup in /etc/freetds.conf [serverName] host = database.windows.net port = 1433 tds version = 8.0 Using tsql: [gpadmin@mdw ~]$ /usr/bin/tsql -S serverName -U user -D testDB -P password works fine With bsqldb it's trying to connect to the master even though the db was specified to testDB. [gpadmin@mdw ~]$ /usr/bin/bsqldb -U user -P password -S serverName \ -D testDB -i tag.sql -o tag.csv Msg 4060, Level 11, State 1 Server 'fj5j2jtt5k', Line 1 Cannot open database "master" requested by the login. The login failed. bsqldb: error: severity 11 > 10, exiting freetds share|improve this question edited Feb 28 '13 at 5:31 Mat 6,56622234 asked Feb 28 '13 at 4:25 dhew 2612 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote I know this is an old question but for the sake of "drive by googlers" I shall attempt an answer. I'm assuming you know the backslash doesn't belong in your cmd line and that the servername showing in your output is something random you typed to hide the actual name. Check this page http://www.freetds.org/userguide/confirminstall.htm Its got info on troubleshooting your config. Use this command to confirm your instance / server config: tsql -LH servername Make sure your pointing to the proper port, remember you can only specify an instance OR a port, not both. Once you confirmed your settings use this command to connect to the server and open an interactive prompt from which you can run SQL commands on the server: tsql -S servername -U username You will then have