I’ve had SQL Server 2005 Express Edition installed for a while just to play around with, but I recently decided to try to develop a ColdFusion application that uses it as the backend - for fun. It turned out not to be fun, but with a little searching and tinkering with some settings, I was able to get ColdFusion 7 to successfully connect to it.

These instructions assume that you have the Microsoft SQL Server Management Studio Express installed to manage these tasks.

1. Open the SQL Server Studio

2. Click on the Registered Servers button in the toolbar

RegisteredServers-709855-png.jpg

3. Open the Configuration Manager
ConfigManager-764825-png.jpg

4. If needed, enable the TCP/IP protocol under SQL Server Configuration Manager > SQL Server 2005 Network Configurations > Protocols for SQLEXPRESS
EnableTCPIP-714206-png.jpg

5. Now double-click the TCP/IP protocol to view the properties. Click on the IP Addresses tab and make sure that the TCP Port is set to 1433 for every IP type.
TCPIPProperties-704436-png.jpg

6. Open the Properties page for your server instance
ServerProperties-739292-png.jpg

7. Go to the Security item and make sure that you have Mixed Mode enabled. After making sure all of the these settings are in place, you should now restart your server.
MixedMode-700059-png.jpg

8. Once the server restarts, create a new login to be used by ColdFusion, give it a SQL Server Authentication password, and set the default database to the one you’re setting up.
ColdFusionUser-735879-png.jpg

9. Now it’s time to set up the ColdFusion datasource. Download the Microsoft SQL Server 2005 JDBC Driver and place the resultant sqljdbc.jar file in the WEB-INF\cfusion\lib directory, or wherever your cfusion\lib directory is located.

10. Log in to your ColdFusion Administrator and create a new datasource with the same name as the database you want to connect to. Make the datasource type ‘other’.

11. Fill in the fields with the following properties
JDBC URL: jdbc:sqlserver://{server name}\sqlexpress:1433
Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver Name: SQL Server 2005 JDBC

Then enter in the username and password you created in step 8 into the appropriate fields. This should get you a successful ColdFusion datasource using SQL Server Express.

Reference Articles
Login failed … not associated with a trusted SQL server connection
SQL Server Express 2005, Finally Installed