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

Cannot connect to Azure using tiny_tds #90

Closed
taniasupagirl opened this issue Aug 11, 2012 · 2 comments
Closed

Cannot connect to Azure using tiny_tds #90

taniasupagirl opened this issue Aug 11, 2012 · 2 comments

Comments

@taniasupagirl
Copy link

Hi,

I can not get tiny_tds to connect to Azure. 2 of us have been working for hours to try and resolve this without any luck. I machine is Mac, 1 is Linux.

I am testing the connection via irb.

I have the following installed gems:
activerecord-sqlserver-adapter (3.2.8)
tiny_tds (0.5.1)

I have freetds 0.91 installed.

Here is my connection string to azure: client=TinyTds::Client.new(:username =>'user@server.database.windows.net', :password => 'pass', :host => 'server.database.windows.net', :port => 1433, :database => 'blah', :azure=>true)
SystemStackError: stack level too deep
from /Users/taniavanwykdevries/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80

If I remove the user@server.database.windows.net and only use 'user' then I get the following error.

client=TinyTds::Client.new(:username =>'user', :password => 'pass', :host => 'server.database.windows.net', :port => 1433, :database => 'db', :azure=>true)
TinyTds::Error: Server name cannot be determined. It must appear as the first segment of the server's dns name (servername.database.windows.net). Some libraries do not send the server name, in which case the server name must be included as part of the user name (username@servername). In addition, if both formats are used, the server names must match.
from /Users/taniavanwykdevries/.rvm/gems/ruby-1.9.3-p194/gems/tiny_tds-0.5.1/lib/tiny_tds/client.rb:68:in connect' from /Users/taniavanwykdevries/.rvm/gems/ruby-1.9.3-p194/gems/tiny_tds-0.5.1/lib/tiny_tds/client.rb:68:ininitialize'
from (irb):3:in new' from (irb):3 from /Users/taniavanwykdevries/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in

'

@metaskills
Copy link
Contributor

Please answer all these questions.

  1. What version of FreeTDS do you have installed?

  2. Show me the output of tsql -C on your system where tsql is the one installed by FreeTDS and which TinyTDS is compiled against.

  3. Have you tried using just user@server?

@taniasupagirl
Copy link
Author

I tried user@server (just that) and it worked! Tx for your super fast response.

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