Problem while connecting MS Sql 2000 from linux

Hi ,

I did all steps given in below link

http://wiki.rubyonrails.org/database-support/ms-sql#dsn-less_connection

And when I connect SQL 200 from my ubuntu 7.10 through SQSH it is
connecting.

when I try to connect through my rails application it giving error.

DBI::DatabaseError: IM002 (0) [unixODBC][Driver Manager]Data source name
not found, and no default driver specified
from
/usr/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.5/lib/dbd/odbc/driver.rb:36:in
connect' from /usr/local/lib/site_ruby/1.8/dbi/handles/driver.rb:33:inconnect’
from /usr/local/lib/site_ruby/1.8/dbi.rb:148:in connect' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/sqlserver_adapter.rb:46:insqlserver_connection’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in
send' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:inconnection_without_query_cache=’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in
connection=' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:inretrieve_connection’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection’
from (irb):1

my database.yml
development:
adapter: sqlserver
mode: ODBC
dsn: connectsql
username: sa
password: process

freetds.conf
[connectsql]
host = 10.100.13.11
port = 1433
tds version = 8.0

/etc/odbc.ini

[connectsql]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
Trace = No
Servername = connectsql
Database = test

/etc/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

my rails version 1.2.3 and ruby 1.8.6

Thanks in advance
jK

m. jk wrote:

Hi ,

I did all steps given in below link

http://wiki.rubyonrails.org/database-support/ms-sql#dsn-less_connection

And when I connect SQL 200 from my ubuntu 7.10 through SQSH it is
connecting.

when I try to connect through my rails application it giving error.

DBI::DatabaseError: IM002 (0) [unixODBC][Driver Manager]Data source name
not found, and no default driver specified

$ping -c3 connectsql

?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs