isql runs just fine:
kobey:/etc# isql -v censored censored censored
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from Members;
+------------+
|            |
+------------+
| 1531       |
+------------+
SQLRowCount returns 1
1 rows fetched
SQL> quit
I have tested it with the Ruby ODBC driver:
irb(main):002:0> ODBC.connect('ANAME', 'censored', 'censored')
=> #<ODBC::Database:0x7fc95d428c80>
Here is my connection string for ActiveRecord:
Legacy::LegacyRecord.establish_connection({ :dsn => 'ANAME', :password => 'censored', :username => 'censored', :mode => 'odbc', :adapter => 'sqlserver', :encoding => 'utf8'})
Here is the error I receive:
>> Legacy::Member.first
/usr/lib/ruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.8/lib/active_record/connection_adapters/sqlserver_adapter.rb:970: [BUG] Segmentation fault
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
Aborted
Here are the versions of everything involved:
- Debian 5.0.4
- activerecord-sqlserver-adapter (2.3.8)
- freetds-common 0.82-4
- libct4 0.82-4
- libsybdb5 0.82-4
- freetds-dev 0.82-4
- libiodbc2 3.52.6-2
- libodbc-ruby1.8 0.9995-1
- libdbi-ruby1.8 0.2.2-1
- libdbd-odbc-ruby1.8 0.2.2-1
- libdbd-odbc-ruby 0.2.2-1
- odbcinst1debian1 2.2.11-16
- unixodbc 2.2.11-16
- libodbcinstq1c2 2.2.11-16
- tdsodbc 0.82-4
- unixodbc-dev 2.2.11-16
Configs:
odbcinst.ini:
[ODBC Drivers]
FreeTDS  = Installed
[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:
[ODBC]
Trace = No
[ODBC Data Sources]
LATA = FreeTDS
[LATA]
Driver      = /usr/lib/odbc/libtdsodbc.so
Description = MS SQL Server connection to ANAME legacy database
ServerName  = ANAME
Database    = aname
freetds.conf:
[global]
[ANAME]
  host = 10.0.0.5
  tds version = 7.0
  client charset = UTF-8
  text size = 262144
  port = 1433
Does anybody have any idea what might cause this?