Take the 2-minute tour ×
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

migrated from stackoverflow.com Feb 14 '13 at 9:51

This question came from our site for professional and enthusiast programmers.

    
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 '13 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 '13 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 '13 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 '13 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 '13 at 18:05

1 Answer 1

As Jason Cumberland mentioned in his comment connecting from a Mac is problematic since the Mac does not support Active Directory so is not likely to work with Integrated Security = yes or Trusted Connection = True. You will need to use standard SQL Server Authentication where you specify the username and password, and set Trusted Connection = False.

share|improve this answer
    
Microsoft supports adding Mac machines to a Active Directory domain. I believe Mac OS 10 or higher might be required (not positive) but Apple has slowly added more functionality to integrate the devices on an AD domain. –  Shawn Melton Oct 3 at 3:45

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.