Freetds Tsql Error 100 Unrecognized Msgno
Contents |
[ date ] [ thread ] [ subject ] [ author ] Hi, New to FreeTDS, I've got my first successfull query from the freetds install Linux tsql command- line, WOO-HOO !!! Now before the rewarding: 1> sqlgetprivateprofilestring failed with unable to find component name prompt, I've got what seems a benign: Error 100 (severity 11): unrecognized msgno I'll research the error 20002 (severity 9): adaptive server connection failed threads some more but THANKS if someone can already hint towards the right direction.. Recommendations for improving the FreeTDS installation documentation, which assumes (user exposure to all Unix/Linux
Tsql Linux
things) a slight tad too much: 1) For a good while all my tsql connections attempts were unsucssessful. I was actually modifying the wrong freetds.conf, the one from extracting the fresh freeTDS download.. it's probably obvious for regular Unix/Linux installers that it's: etc/freetds.conf not: freetds-0.91/freetds.conf that tsql reads, but nonetheless an easy possible pitfall for less unixodbc freetds seasonned users.. I only discovered about etc/freetds.conf after issuing a find - name "freetds.conf" 2) since there was mention of root user to be able to 'make install' in the default /usr/local directory, somehow I related that to the -U of a: tsql -S egOurServer -U user as would be user on my Linux box, like if tsql needed some 'su' permissions for the client to proceed or something.. I didn't get at first that it was actually the authentication for SQL Server already.. I thought that this piece would come later. So I had ended-up removing the -U option actually and was satisfied not to get the prompt anymore! There too it becomes really obvious once you've got all things working and well rounded, but an easy pitfall before that. Previous message: [freetds] unixodbc: no ?? Next message: [freetds] unixodbc: no ?? Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the FreeTDS mailing list
server port mismatch Re: freetds version tsql -S works but tsql -H times
Unable To Connect: Adaptive Server Is Unavailable Or Does Not Exist
out Newsgroups: gmane.comp.db.tds.freetds Date: Wednesday 9th May 2012 19:48:46 UTC (over
Pymssql
4 years ago) Thanks Eric-- Someone had turned on dynamic ports on the SQL server and didn't http://lists.ibiblio.org/pipermail/freetds/2011q4/027425.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: 2ms
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 http://serverfault.com/questions/258991/problem-connecting-to-sql-server-2005-via-freetds-on-freebsd About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a http://www.freetds.org/userguide/confirminstall.htm question and answer site for system and network administrators. 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 unable to are voted up and rise to the top Problem connecting to SQL Server 2005 via FreeTDS on FreeBSD up vote 1 down vote favorite 1 I am trying to connect to SQL Server 2005 from a FreeBSD server with the following command: tsql -H DEV -p 1433 -U **** This results in the following error message: locale is "C" locale charset is "US-ASCII" Password: Msg 20004, freetds tsql error 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 Since the error message reports "Login incorrect", my first step was to verify that I am indeed typing in the correct username and password. It is a SQL Server login (i.e. not Windows authentication) and I have ensured that it's correctly input with case sensitivity. Note that I am able to connect using the same login from a Windows client without any issues. My next step was to dump a log from FreeTDS: util.c:288:Starting log file for FreeTDS 0.64 on 2011-04-12 16:29:57 with debug flags 0x4fff. iconv.c:195:names for ISO-8859-1: ISO-8859-1 iconv.c:195:names for UTF-8: UTF-8 iconv.c:195:names for UCS-2LE: UCS-2LE iconv.c:195:names for UCS-2BE: UCS-2BE iconv.c:361:iconv to convert client-side data to the "US-ASCII" character set iconv.c:514:tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE" net.c:168:Connecting to 10.5.5.226 port 1433. net.c:673:Sending packet ...snipped... net.c:673:Sending packet ...snipped... token.c:310:tds_process_login_tokens() util.c:119:Changing query state from IDLE to DEAD token.c:2252:tds_client_msg: #20004: "Read from SQL server failed.". Connection state is now 4. token.c:314:looking for login token, got 0() token.c:105:tds_process_default_tokens() marker is 0() token.c:108:leaving tds_process_default_tokens() connection dead util.c:119:Changing query state from DEAD
to make sure that when your application requests a connection to your server, it actually works. In detail, we want to know:
FreeTDS can find and read freetds.confservername exists in freetds.confa host property exists for servernamehost can be resolved to a network addressthe server is listening to the port or named instancethe user can log in to the server Each of the above can be confirmed independently with tsql. Once you're sure you can connect and log in, you can run the unit tests to see if the software works as promised.tsqlThe tsql utility is provided as part of FreeTDS expressly for troubleshooting. tsql is superficially similar to an isql, but uses libtds directly, bypassing the client libraries (e.g., DB-Library). It can also report where it looks for freetds.conf and other compile-time settings (with tsql -C).Example 3-2. Show compile-time settings with tsql $ tsql -C Password: Compile-time settings (established with the "configure" script) Version: freetds v0.1.0 freetds.conf directory: /usr/local/etc MS db-lib source compatibility: no Sybase binary compatibility: no Thread safety: yes iconv library: no TDS version: 7.0 iODBC: no unixodbc: no SSPI "trusted" logins: no Keberos: no