Coder Social home page Coder Social logo

Comments (10)

meet-bhagdev avatar meet-bhagdev commented on September 26, 2024

+Andrea

On Thu, Apr 7, 2016 at 11:56 AM -0700, "Brena Monteiro" <[email protected]mailto:[email protected]> wrote:

I'm trying to configure my Rails project with SQL on Azure. I'm using Mac OS X 10.11. But when I run rake db:migrate I receive this error TinyTds::Error: Adaptive Server connection failed.

I'm looking for answer in Stackoverflow, too.

http://stackoverflow.com/questions/36484700/rails-and-azure-tinytdserror-adaptive-server-connection-failedhttps://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fstackoverflow.com%2fquestions%2f36484700%2frails-and-azure-tinytdserror-adaptive-server-connection-failed&data=01%7c01%7cmeetb%40microsoft.com%7c75104fd7e99f44f0c86d08d35f165411%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=9XjWh7%2f%2bTigSIczghqFKgLaWgyjugCrhzkMXoe28CqQ%3d

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/12

from azure-sql-database-samples.

ajlam avatar ajlam commented on September 26, 2024

@monteirobrena Are you able to connect to your Azure SQL Database any tools outside of your Rails app? What happens when you run rake db::setup?

from azure-sql-database-samples.

monteirobrena avatar monteirobrena commented on September 26, 2024

I fixed it, but I need change my config/database.yml.

staging:
  adapter: sqlserver
  username: 'username@database'
  password: 'password'
  host: 'db-staging.database.windows.net'
  port: 1433
  database: 'db-staging'
  azure: true

from azure-sql-database-samples.

monteirobrena avatar monteirobrena commented on September 26, 2024

@ajlam actually works fine in localhost but now when I move to staging (Ubuntu VM Azure) the same error occurred.

TinyTds::Error: Adaptive Server connection failed

from azure-sql-database-samples.

monteirobrena avatar monteirobrena commented on September 26, 2024

That's so weird! If I setup this configuration as development database, all work correctly. I can connect and save in my database on Azure. But when I try to deploy to staging VM with Capistrano I receive this error

$ cd /var/www/homepage/releases/20160408035644 && ( export RAILS_ENV="staging" ; ~/.rvm/bin/rvm default do bundle exec rake db:migrate )

rake stdout: rake aborted!
TinyTds::Error: Adaptive Server connection failed
/var/www/homepage/shared/bundle/ruby/2.2.0/gems/tiny_tds-0.7.0/lib/tiny_tds/client.rb:74:in `connect'
/var/www/homepage/shared/bundle/ruby/2.2.0/gems/tiny_tds-0.7.0/lib/tiny_tds/client.rb:74:in `initialize'

from azure-sql-database-samples.

ajlam avatar ajlam commented on September 26, 2024

@monteirobrena Let me test with staging on my end to see if I run into a similar error.

from azure-sql-database-samples.

monteirobrena avatar monteirobrena commented on September 26, 2024

@ajlam any news?

I put my project in my staging server and if I run rails s inside this folder I can connect with my database. But, if I run my project with Puma and Nginx, I receive this error:

TinyTds::Error (Adaptive Server connection failed):

from azure-sql-database-samples.

ajlam avatar ajlam commented on September 26, 2024

@monteirobrena sorry for the delay. Still working on trying to repro the issue. I'll try to get back to you asap.

from azure-sql-database-samples.

ajlam avatar ajlam commented on September 26, 2024

@monteirobrena were you able to figure out what the problem was?

from azure-sql-database-samples.

monteirobrena avatar monteirobrena commented on September 26, 2024

@ajlam not yet.

I'm receiving this error:

[TinyTds][v1.0.2][tsql]: /usr/local/bin/tsql locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Setting db-api-staging as default database in login packet 2Error 20002 (severity 9): Adaptive Server connection failed OS error 60, "Operation timed out" There was a problem connecting to the server

from azure-sql-database-samples.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.