Peter Fitzgibbons
2006-Jun-19 21:13 UTC
[Rails] [OT] HowtoConnectToMicrosoftSQLServerFromRailsOnLinux from Ubuntu
Hello all, I am trying to connect to my remote MS SQL server from Ubuntu. I have followed HowtoConnectToMicrosoftSQLServerFromRailsOnLinux<http://http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnLinux>as best that I can. TSQL is working, example below. My configs are found below. When I run isql :> isql -v pubs name password[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect Does someone have a correctly running configuration that I can review to correct my own? Thanks!! tsql works : root@vmrailsdev:~# tsql -S remote_server -U name -P password locale is "en_US.UTF-8" locale charset is "UTF-8" 1> use pubs 2> go 1> select count(*) from authors 2> go 23 1> cat .odbc.ini [pubs] Description = pubs database Driver = remote_server Servername = TDS Database = pubs UID = name PWD = password Port = 1433 cat .odbcinst.ini [TDS] Description = FreeTDS Driver = /usr/local/lib/libtdsodbc.so UsageCount = 1 cat /usr/local/etc/freetds.conf [remote_server] host = 90.0.0.73 port = 1433 tds version = 8.0 -- ------------------------------ Apple MacBook. Black. It''s the new White! ------------------------------ Peter Fitzgibbons -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060619/50a06e36/attachment-0001.html
Peter Fitzgibbons
2006-Jun-19 21:37 UTC
[Rails] Re: [OT] HowtoConnectToMicrosoftSQLServerFromRailsOnLinux from Ubuntu
Well, as usual, I answered this with further research. For those of you who are struggling with this : 1. use Synaptic, install freetds-dev, tdsodbc, unixodbc, unixodbc-dev, unixodbc-bin. 2. configure files with ODBCConfig (executable found in /usr/bin) 3. verify connection with gui DataManager (executable found in /usr/bin) 4. test isql with cmd line as in HowtoConnectToMicrosoftSQLServerFromRailsOnLinux<http://http//wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnLinux>and continue. -- ------------------------------ Apple MacBook. Black. It''s the new White! ------------------------------ Peter Fitzgibbons On 6/19/06, Peter Fitzgibbons <peter.fitzgibbons@gmail.com> wrote:> > Hello all, > > I am trying to connect to my remote MS SQL server from Ubuntu. > I have followed HowtoConnectToMicrosoftSQLServerFromRailsOnLinux > <http://http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnLinux>as best that I can. > TSQL is working, example below. > My configs are found below. > > When I run isql : > > isql -v pubs name password > [IM002][unixODBC][Driver Manager]Data source name not found, and no > default driver specified > [ISQL]ERROR: Could not SQLConnect > > Does someone have a correctly running configuration that I can review to > correct my own? > > Thanks!! > > tsql works : > root@vmrailsdev:~# tsql -S remote_server -U name -P password > locale is "en_US.UTF-8" > locale charset is "UTF-8" > 1> use pubs > 2> go > 1> select count(*) from authors > 2> go > > 23 > 1> > > cat .odbc.ini > [pubs] > Description = pubs database > Driver = remote_server > Servername = TDS > Database = pubs > UID = name > PWD = password > Port = 1433 > > cat .odbcinst.ini > [TDS] > Description = FreeTDS > Driver = /usr/local/lib/libtdsodbc.so > UsageCount = 1 > > cat /usr/local/etc/freetds.conf > [remote_server] > host = 90.0.0.73 > port = 1433 > tds version = 8.0 > > > > > -- > ------------------------------ > Apple MacBook. Black. It''s the new White! > ------------------------------ > Peter Fitzgibbons >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060619/748542bc/attachment.html