You can use Windows authentication with JDBC. In the Advanced Settings > Connection String box, enter in:
AuthenticationMethod=Type2 Then, clear any username/password from that DSN. (Just to be sure.) Confirm that your CF service account can access SQL Server's databases. Then, Bob's your uncle! (This was confirmed with Windows Server 2003, SQL Server 2005, CF 8 Standard/Enterprise and the JDBC drivers that came with CF.) Mike -----Original Message----- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2008 12:47 PM To: cf-talk Subject: Re: Microsoft SQL Server JDBC Driver and Authentication > I'm using Coldfusion MX7.0.2 on Windows 2003 SP1. I've installed and > set up the Microsoft SQL Server 2005 JDBC driver, and have > successfully set up a datasource using Windows Authentication (I have > no user/password assigned in the datasource configuration; it's passing the ColdFusion service login which is an Active Directory account). > > I'm trying to run a cfquery passing a specific user's credentials to > the query, like this (I've changed username and password to protect the innocent ;>) ): > > <cfquery datasource="MyDSN" name="testQuery" > username="MyDomain\UserName" password="MyPassword"> > > I have the SQL Server Profiler open running a trace on the target > database. When I run the CFM page and execute the query, the trace > shows that ColdFusion is still using the ColdFusion service login to run the query, instead of the user I passed to CFQUERY. > > Is there something else I need to do to make this work? I don't think CF will pass the username and password attributes to the database if you're using Windows authentication via JDBC. I don't think you can specify a user account other than the service account when using Windows authentication via JDBC. I think that the only way you can do this is to set up an ODBC datasource that uses Windows authentication, then use CF to connect to that using the SequeLink JDBC-ODBC bridg ("ODBC Socket" in the CF Administrator). All that said, even if you can pass user credentials to the database, that may cause a serious degradation in performance, as database connections can no longer be shared across requests unless those requests come from the same user. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316287 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

