Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect when upgrade to Rials 6 #518

Open
weijenlarryli opened this issue Jul 25, 2022 · 3 comments
Open

Unable to connect when upgrade to Rials 6 #518

weijenlarryli opened this issue Jul 25, 2022 · 3 comments

Comments

@weijenlarryli
Copy link

weijenlarryli commented Jul 25, 2022

Environment

Operating System
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"

TinyTDS Version and Information
tiny_tds (2.1.2)
I also tried 2.1.5

FreeTDS Version
MS db-lib source compatibility: no
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes

Description

I have used Rails 5 with TinyTds gem to connect to many servers. (hundreds of them)
I recently upgrated to Rails 6. My system can connect to most of the servers, but cannot connect to some.
When I start a client side, I get this error:

TinyTds::Error: Unable to connect: Adaptive Server is unavailable or does not exist (some.server.address:1433)
from ....gems/tiny_tds-2.1.2/lib/tiny_tds/client.rb:60:in `connect'

Is there any way to figure out why I cannot connect?
I can connect when I switch back to Rails 5.

Thanks.

@aharpervc
Copy link
Contributor

TinyTDS can't really tell you anything that FreeTDS isn't already saying; ie, it can't connect for some reason. The diagnostics are up to you. Here's some ideas to get you started:

  1. Is the FreeTDS info otherwise identical?
  2. Is the TDS version the same (4.2 is very old)
  3. Can you connect to from this web server to that SQL Server instance using other tools (eg, tsql)
  4. Does the SQL Server log show anything interesting when you try to connect?

@weijenlarryli
Copy link
Author

  1. Yes they are identical.
  2. The version seems old. Are the versions backward compatible?
  3. Yes, I can connect using command like tsql -S [hostname] -U [user] -P [password]
    But unable to connect using TinyTds::Client from rails_console.
  4. Have not been able to see the SQL server logs. I will try this.

@weijenlarryli
Copy link
Author

Adding a follow up to this.
Here are discussions and solutions:
FreeTDS/freetds#336
FreeTDS/freetds#299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants