rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
606 stars 190 forks source link

Getting error Sequel::DatabaseConnectionError: TinyTds::Error: Login failed for user 'username'. #489

Closed poorna441 closed 3 years ago

poorna441 commented 3 years ago

Before submitting an issue please check these first!

If none of these help. Please fill out the following:

Environment

Windows Operating System

TinyTDS Version and Information

Ruby 2.5.8 Successfully installed tiny_tds (2.1.3 x64-mingw32, 2.1.2 x64-mingw32)

FreeTDS Version

Please provide your system's FreeTDS version. If you are using the pre-compiled windows gem you may omit this section.

I was running this code snippet

   Sequel.connect({adapter: 'tinytds',
                    host: db_info['HOST'],
                    port: db_info['PORT'],
                    database: db_info['DATABASE'],
                    user: user_info['USERNAME'],
                    password: user_info['PASSWORD']})

and getting an error Sequel::DatabaseConnectionError: TinyTds::Error: Login failed for user 'username'.

Also ran TinyTds::Client.new(:username => 'xxxxx', :password => 'xxxx', :host => 'xxxxx', :port => 'xxxx') in IRB console, and getting the same error: TinyTds::Error (Login failed for user 'xxxxx'.)

Can someone look into this issue and help with the solution???

wpolicarpo commented 3 years ago

Hi, it looks like you are using Sequel. TinyTDS is what Sequel uses behind the scenes to talk to SQL Server and you should probably file a bug here instead.

Did you double check the credentials to make sure they are correct? Have you made sure to enable SQL Server authentication?