Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have SQL Server 2008 R2 SP1. I am using connection string to connect to SQL Server.

In connection string I am passing the driver path, server name, TCP port number, user name with which I want to connect, password , DSN name, TDS driver version number, db name.

  • I am using Free TDS driver for connecting from Mac OS machine.
  • On SQL server side I am having Windows authentication mode.
  • When I tried to connect by entering the user name and password of the user who has installed the SQL server or admin of the SQL server, it works fine.

But if I try with normal domain user, I am getting the SQL Server connection failed error.

After searching about it I found that some authentication is failing. Can anyone help me in resolving this issue?

I believe that some settings need to be changed or there should be some modification on connection string.

Please help me in it.

Thanks, Tausif.

share|improve this question
Are you passing the domain name as well? Is kerberos running in your environment? Can you use the tsql command to run queries, as discussed here->freetds.schemamania.org/userguide/domains.htm – darin strait Feb 14 at 15:37
I am passing the domain name as well.For more information please find the connection string. Driver=/usr/lib/libtdsodbc.so;Server=DB_SERVER_MACHINE_ID;TDS_Version=8.0;Port=2‌​1;uid=DOMAINNAME_USERNAME;pwd=USER_PASSWORD;DATABASE=DBNAME; Kerberos authentication is running in our environment. – Tausif Feb 15 at 6:54
If you are specifying a username and a password in the connection string then you are not using AD/Kerberos security. Those fields in a connection string are used for SQL authentication. You need to run the process under the domain account, which I have no idea how you would do on a mac. – Jason Cumberland Feb 15 at 15:43
Can you give me an example where I can connect to the SQL server without specifying the user name and password in the connection string at lease on windows side? It will be good if you can share some link. – Tausif Feb 17 at 8:27
Use connectionstrings.com (connectionstrings.com/sql-server-2008) to show you different connection string configurations, specifcally around Integrated Security. The problem with doing it from a Mac is that it doesn't tie into Active Directory that I know of so it is not likely to work and you will need to use standard (SQL) security where you specify the username and password. – Jason Cumberland Feb 21 at 18:05
show 1 more commentadd comment (requires an account with 50 reputation)

migrated from stackoverflow.com Feb 14 at 9:51

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.