windows authentication to sql server with coldfusion 7/8

The past two days have been a blur for me. I have been upgrading from ColdFusion 7 to ColdFusion 8, in multi-server install, and then redeploying ColdFusion 7 (under CF8 and JRun) via an .ear file. It all went pretty smoothly with the help of Jason Betz one of my team members. We have to have both versions of CF running until we have our December code push, because I am still developing applications on CF 7 but am on the team to bring in CF 8.

When I was done deploying CF8 for one of my instances (let's call it ins1 for simplicity) and car filed all my settings over (yes a car file from the CF7 administrator works in the CF8 administrator) I tried to validate my data sources. We use Windows authentication for our data sources. We do this so we know who is doing what to the database, albeit our DEV database. We set it up through the Services Manager and have ColdFusion run as "me" instead of "system". This allows kind of a pass-through authentication to happen between ColdFusion and the database server. This worked for my CF8 instance. No problem. This is because the new macromedia_drivers.jar and the DDJDBCAuth04.dll is included with CF8. In a multi-instance install, these files are found in [JRun4 root]\servers\[server]\cfusion.ear\cfusion.war\WEB-INF\cfusion\lib .

Now, I went to validate my data sources on my CF7 instance. I had it set up the same as my CF8 instance. Service runs as "me" and my car file and settings were correct. All my data sources failed! W00t! Well, they failed because I did not spawn this instance as a CF8 instance. It came from a CF7 ear file. So it was using the old drivers and did not have the needed DLL file for SQL authentication. I needed to download the new macromedia_drivers.jar and get the DDJDBCAuth03.dll and put it [JRun4 root]\servers\[cf7 server]\cfusion.ear\cfusion.war\WEB-INF\cfusion\lib. There is an Adobe tech note on this here http://www.adobe.com/go/42dcb10a. So just a little tip for those developers out there that need to deploy CF7 off of CF8.

Comments
hoodwinkle's Gravatar Thanks for this
# Posted By hoodwinkle | 12/13/07 3:15 PM
Mike's Gravatar I was wondering if you could go into more detail on the CF setup. We have multiserver instances and
single instances of Coldfusion, all version 7. While I am investigating the impact of upgrading to CF8
I don't see it happening for a while. I now have a need to use integrated security within SQL Server,
in a Microsoft 2003 Domain.

The CF instance I am working with is not a multiserver install. All of the CF services are running under
a domain account that has the ability to log on to SQL Server and to access the desired databases.
However, I cannot get the Coldfusion datasource to work. I have upgraded to the 3.5 macromedia
drivers and followed their instructions to create an 'other' datasource with a URL as such:
jdbc:macromedia:sqlserver://MyDatabaseServer:1433;databaseName=DBName; SelectMethod=direct;sendStringParametersAsUnicode=false; MaxPooledStatements=0;AuthenticationMethod=Type2;

(Of course the database server is not really MyDatabaseServer and the database is not really DBName).
# Posted By Mike | 7/3/08 12:02 PM
youtube's Gravatar good . thanks.nice..
# Posted By youtube | 8/14/08 5:20 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.7.002.