LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2009, 02:55 PM   #1
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Rep: Reputation: 15
odbc with ms sql server


Hi,

I try to connect using odbc to a microsoft sql server but when I try to connect it says me:
Code:
isql -v prueba usser password
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[08S01][unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist
[ISQL]ERROR: Could not SQLConnect
david@david-desktop:/etc$
I have this configuration files:

Code:
/etc/odbc.ini
[prueba]

Description        = Coeenxion para microsoft sql server
Driver          = ms-sql                                
Servername      = ms-sql                                
#Servername      = defekas62                            
UID =           emuser                                  
Port    =               1433   


/etc/freetds/freetds.conf  
....
....
[ms-sql]                    
     # Version 8.0 para SQL Server 2000
     # Version 7.0 para SQL Server 7   
     # Version 6.0 para SQL Server 6   
     host = defekas62                  
     port = 1433                       
     tds version = 7.0



/etc/odbcinst.ini
[ms-sql]
Description             =  Conexiona microsoft sql server
Driver          = /usr/lib/odbc/libtdsodbc.so
Setup           = /usr/lib/odbc/libtdsS.so
UsageCount      = 1
FileUsage       = 1



Could you help me?
Many thanks and sorry for my english!
 
Old 08-27-2009, 09:28 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Hi,

Lets just start with the basic tests, can you ping 'defekas62' by name from the david-desktop pc ?
If that succeeds, can you telnet to port 1433 on 'defekas62' from david-desktop ?

thanks,

kbp
 
Old 08-27-2009, 02:50 PM   #3
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kbp View Post
Hi,

Lets just start with the basic tests, can you ping 'defekas62' by name from the david-desktop pc ?
If that succeeds, can you telnet to port 1433 on 'defekas62' from david-desktop ?

thanks,

kbp
Many thanks, finally it works! But it's something strange when I try to make a select two times, the second time it gives me an error:

Code:
isql prueba user passwd
+---------------------------------------+                    
| Connected!                            |                    
|                                       |                    
| sql-statement                         |                    
| help [tablename]                      |                    
| quit                                  |                    
|                                       |                    
+---------------------------------------+                    
SQL> select * from JOBACTIONS    
+---------------------------------+------------+------------+
| USERNAME                        | ISGROUP    | ACTIONTYPE |
+---------------------------------+------------+------------+
| AdminGroup                      | 1          | 0          |
| AdminGroup                      | 1          | 1          |
| AdminGroup                      | 1          | 2          |
| AdminGroup                      | 1          | 3          |
............
............
Everithing ok but the second and the third one:

Code:
SQL> select * from JOBACTIONS
+------------+
|            |
+------------+
+------------+
SQLRowCount returns 0
SQL> select * from JOBACTIONS
[ISQL]ERROR: Could not SQLExecute
SQL> select * from JOBACTIONS
Any help?
Many thanks and sorry for my english
 
Old 06-25-2011, 07:26 AM   #4
cse.navneet
LQ Newbie
 
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source [08S01][unixODBC][FreeTDS][S

I am also facing the same problem, please suggest me how you have resolved this problem.

Thanks in advance.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem accessing Windows SQL server from Red Hat Web Server mariap Linux - General 0 12-28-2008 05:46 PM
Ubuntu Server: MySql ODBC Driver and string johnty01 Linux - Server 0 08-01-2008 06:53 PM
Using ODBC to MS SQL ejennings_98 Linux - Software 7 08-05-2005 12:10 PM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
ODBC sql.h question javakid Programming 0 11-16-2004 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration