Ooops.  I missed a critical part of your message.  You said you "did"
get Windows Authentication to work, but you want to specify individual
credentials, per query.

Sorry for the confusion.

However, one thing you may try is create a domain group, then grant
database access to that group.  In that group, add your users.

Then, try to connect using your method.  If "domain\user" doesn't work,
try the userPrincipalName ([EMAIL PROTECTED]).

Also, if you are saying the DSN is still using the CF service's
credentials, you should break it so that it never works, such as
specifying an incorrect username/password, in the DSN settings.

Then, your CF code should override, if it works.

Mike 

-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 04, 2008 1:03 PM
To: cf-talk
Subject: RE: Microsoft SQL Server JDBC Driver and Authentication

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?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:316288
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to