Freetds Isql Error Could Not Sqlconnect
Contents |
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 [01000][unixodbc][freetds][sql server]unknown host machine name. about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users [01000][unixodbc][freetds][sql server]adaptive server connection failed Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping
Isql Could Not Sqlconnect
each other. Join them; it only takes a minute: Sign up FreeTDS - tsql connects, isql fails up vote 6 down vote favorite 2 I'm trying to connect to a database on my host machine (windows xp, sql
Unixodbc Unable To Connect To Data Source
server 05). My guest machine is Ubuntu 10.04. I can connect and execute commands with tsql, but isql fails. Below are my config files and error messages. freetds.conf text size = 64512 [SQLEXPRESS] host = 192.168.163.1 port = 1433 tds version = 7.0 odbcinst.ini [FreeTDS] Description = TDS driver (Sybase/MS SQL) Driver = /usr/lib/odbc/libtdsodbc.so Setup = /usr/lib/odbc/libtdsS.so CPTimeout = CPReuse = FileUsage = 1 odbc.ini [SQLEXPRESS] Driver = FreeTDS Description = ODBC connection via FreeTDS Trace = [im002][unixodbc][driver manager]data source name not found, and no default driver specified No Servername = 192.168.163.1 Database = SCOPE_Peel Port = 1433 UID = sa PWD = test1234 ReadOnly = No tsql: tsql -S SQLEXPRESS -U sa #success isql: isql SQLEXPRESS sa test1234 -v [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source [ISQL]ERROR: Could not SQLConnect sql-server ruby linux freetds isql share|improve this question asked Nov 4 '11 at 14:02 recursive_acronym 1,19922450 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted The issue was this line in odbc.ini Servername = 192.168.163.1 It should have been SQLEXPRESS which I think points to the name of the server configured in freetds.conf share|improve this answer edited Apr 15 '14 at 17:14 Thales Ceolin 583510 answered Nov 4 '11 at 14:17 recursive_acronym 1,19922450 Hello, i have set the same Servername as SQLEXPRESS but still i am getting the same error. –user1181940 Mar 17 '15 at 12:53 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged sql-server ruby linux freetds isql or ask your own question. asked 4 years ago viewed 15198
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
Tsql Unknown Host Machine Name
Stack Overflow the company Business Learn more about hiring developers or posting ads with unable to connect to data source (sql-08001) us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is pyodbc unable to connect to data source a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up [unixODBC][FreeTDS] isql Unable to connect to data source while instead tsql works up http://stackoverflow.com/questions/8010361/freetds-tsql-connects-isql-fails vote 0 down vote favorite while trying to connect via isql ms-sql sa@localhost ***** -v I get the following error. [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source [ISQL]ERROR: Could not SQLConnect Same with sa@192.168.2.96 or just sa. While when trying via tsql I succefully connect: root@srv-assistenza:/usr/lib# tsql -S ms-sql -U sa -P ***** locale is "en_US.UTF-8" locale charset is "UTF-8" 1> ^C root@srv-assistenza:/usr/lib# But unfortunatly this will not make available http://stackoverflow.com/questions/34858736/unixodbcfreetds-isql-unable-to-connect-to-data-source-while-instead-tsql-wor my connection via ODBC. This is my odbc.ini [ms-sql] Driver=FreeTDS Server=192.168.2.96 Servername=ms-sql Port=1433 User=sa Password=***** TDS_Version=8.0 Trace=No And my odbcinst.ini [FreeTDS] Description=FreeTDS Driver=/usr/lib/odbc/libtdsodbc.so Setup=/usr/lib/odbc/libtdsS.so FileUsage=1 UsageCount=2 And my freetds.conf # $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $ # # This file is installed by FreeTDS if no file by the same # name is found in the installation directory. # # For information about the layout of this file and its settings, # see the freetds.conf manpage "man freetds.conf". # Global settings are overridden by those in a database # server specific section [global] # TDS protocol version tds version = 7.1 # Whether to write a TDSDUMP file for diagnostic purposes # (setting this to /tmp is insecure on a multi-user system) ; dump file = /tmp/freetds.log ; debug flags = 0xffff # Command and connection timeouts ; timeout = 10 ; connect timeout = 10 # If you get out-of-memory errors, it may mean that your client # is trying to allocate a huge buffer for a TEXT field. # Try setting 'text size' to a more reasonable limit text size = 64512 [ms-sql] host = 192.168.2.96 port = 1433 tds version = 8.0 I am running on Debian Squeezy 6 sql-server debian odbc
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 http://serverfault.com/questions/682779/unknown-host-machine-name-on-freebsd-unixodbc-freetds more about Stack Overflow the company Business Learn more about hiring developers or posting http://mailman.unixodbc.org/pipermail/unixodbc-support/2011-May/002819.html ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a 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 are voted up and rise data source to the top “Unknown host machine name.” on FreeBSD + unixODBC + FreeTDS up vote 1 down vote favorite 1 I got some issues connecting to a Microsoft SQL Server 2012 from my FreeBSD 10.1 server. I installed FreeTDS and unixODBC via ports. I compiled FreeTDS with unixODBC support. This ist my freetds.conf: [server1] host = 192.168.100.147 port = 1433 tds version = 7.2 Invoking tsql works fine. But unable to connect when i try to connect via odbc with "osql" or "isql" the connection failes with the following error: checking shared odbc libraries linked to isql for default directories... trying /tOH ... no trying /tOH ... no trying /tmp/sqlH ... no trying /tmp/sqlH ... no trying /usr/locH ... no trying /usr/locH ... no trying /tmp/sql.log ... no trying /home ... no trying /.odbc.ini ... no trying /usr/local/etc ... OK checking odbc.ini files reading /root/.odbc.ini [server1] not found in /root/.odbc.ini reading /usr/local/etc/odbc.ini [server1] found in /usr/local/etc/odbc.ini found this section: [server1] Driver = FreeTDS Servername = server1 looking for driver for DSN [server1] in /usr/local/etc/odbc.ini found driver line: " Driver = FreeTDS" driver "FreeTDS" found for [server1] in odbc.ini found driver named "FreeTDS" "FreeTDS" is not an executable file looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini found driver line: " Driver = /usr/local/lib/libtdsodbc.so" found driver /usr/local/lib/libtdsodbc.so for [FreeTDS] in odbcinst.ini /usr/local/lib/libtdsodbc.so is an executable file Using ODBC-Combined strategy DSN [server1] has servername "server1" (from /usr/local/etc/odbc.ini) cannot read "/root/.freetds.conf" /usr/local/etc/freetds/freetds.conf is a readable file looking for [server1] in /usr/local/etc/freetds/freetds.conf found this section: [server1] host = 192.168.100.147 port = 1433 tds version = 7.2 looking up hostname for ip address 192.168.100.147 Configuration looks OK. Connection details: DSN: server1 odbc.ini: /usr/local/et
from the server Next message: [unixODBC-support] database type text Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] It turns out the problem was with my configuration of odbc.ini. In my odbc.ini, I was pointing to the Driver (FreeTDS) in my odbcinst.ini, but needed to refer to my server, in freetds.conf. Too many file references! In my current setup (below), I've changed this by eliminating odbcinst.ini and putting the Driver line directly in odbc.ini, while adding the necessary reference to Servername, which is in my freetds.conf. I've also added enable-msdlib to my configure statement, but don't think it made any difference. ./configure --prefix=/usr/local/freetds --with-unixodbc=/usr/local/ unixODBC --enable-msdblib cat freetds.conf # Global settings are overridden by those in a database # server specific section [global] # TDS protocol version ; tds version = 4.2 # Whether to write a TDSDUMP file for diagnostic purposes # (setting this to /tmp is insecure on a multi-user system) ; dump file = /tmp/freetds.log ; debug flags = 0xffff # Command and connection timeouts timeout = 10 connect timeout = 10 # If you get out-of-memory errors, it may mean that your client # is trying to allocate a huge buffer for a TEXT field. # Try setting 'text size' to a more reasonable limit text size = 64512 # My Microsoft server [freetds_dsn_myvista] host = dfd.present.bccampus.ca port = 1433 tds version = 8.0 $ cat odbc.ini [dsn_myvista] Servername=freetds_dsn_myvista Driver=/usr/local/freetds/lib/libtdsodbc.so Description=My local vista box containing ACP User=sa Password=1234 Database=ldap [Default] Driver=/usr/local/freetds/lib/libtdsodbc.so On 4-May-11, at 12:30 PM, Dave Dumaresq wrote: > Greetings, I have freeTDS and unixODBC installed on Ubuntu 10.10, > and I'm connecting to an SQL Server 2005 host on port 1433 running > on a vista box. > > tsql works fine; however, isql fails with a final error message > 'Unexpected EOF from the server' > > $ sudo isql -v dsn_myvista > [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source > [01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection > failed > [01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server > [ISQL]ERROR: Could not SQLConnect > > The logs (below) seem to show that during the connection to > [dsn_myvista] the User Name and Authentication are NULL. > Any suggests about what might be wrong? > > /etc/odbc.ini > [dsn_myvista] > Driver=FreeTDS > Server=my.server.org > Port