Skip to main content
Participating Frequently
January 26, 2011
Question

CF Datasource question

  • January 26, 2011
  • 3 replies
  • 4747 views

I am trying to set up a CF datasource connection to MS SQL server using an AD Windows account while still using the SQL driver, I don't want to use ODBC and I don't want to run CF under the same windows account.  Is this possable?

Thanks

Shaun

    This topic has been closed for replies.

    3 replies

    Participating Frequently
    January 31, 2011

    Thanks for everyone who replied, one user said that he was able to get a windows account working without the CF service running as the same account, the SQL server was 2005, and the user said that he had a problemw with SQL 2008R2.  Another user said this could not be done without the CF service running as the same windows account and that user included the technical documentation to support it.  Manny thanks to everyone who replied and help, much appreciated!

    orangexception
    Participating Frequently
    January 31, 2011

    You can use AD user with CF to connect to a datasource.

    You'll need to use an alternate driver. The standard one doesn't work.

    I did a post on it last year.


    ColdFusion Datasources using Windows Integrated (Domain) Authentication and SQL Server

    http://orangexception.com/post/977395044/coldfusion-datasources-using-windows-integrated

    Specifically, I've done it with CF8 and SQL Server 2005.

    Community Expert
    January 27, 2011

    No, this is not possible. To use Windows authentication (trusted connection) with MS SQL Server, you have to run CF as the user whose credentials will be passed to the database server. I'm not sure why your organization won't allow you to do that, though.

    Dave Watts, CTO, Fig Leaf Software

    http://www.figleaf.com/

    http://training.figleaf.com/

    Dave Watts, Eidolon LLC
    Participating Frequently
    January 26, 2011

    Yes, just use the AD credentials in the Username / Password fields in the

    Datasource setup in CF Admin.

    Participating Frequently
    January 26, 2011

    I tried that, it didn't work (Login failed for user 'ou\or_cgtracking') OU is the domain.  When I look at the logs on the SQL server I see the failed authentication and SQL says it was using SQL authentication VS Windows authentication.  SQL accounts work just fine but I can't get a single Windows account to work.  In research the problem it appears that you need to use an ODBC driver, the performance hit was to high to use ODBC, the other method was to have CF run under the same windows account I am using to connect to the DB, company policy won't allow this.  Thoughts, am i missing something??

    Shaun

    Inspiring
    January 26, 2011

    Any reason to not just use a SQL Server login instead of trying to get an AD one to work?  This is very much just a question rather than a loosely veiled gab... I don't know if there are considerations that would mean using an AD login is preferable (esp. in a situation when you can't get it working).

    --

    Adam