ColdFusion and SQL Server talk to each other very well, except when they don't. In a development environment, like, say, your laptop, they don't talk at all by design: CF wants to connect via TCP/IP and SQL Server ships with TCP/IP disabled by default.
So, thanks to Adobe help, Ben Forta's post, and Marc Esher's post, I got it working ...
- Follow the instructions in Esher's post above to open TCP/IP services in your SQL Server instance (enable TCP/IP, click on Properties, IP Addresses, delete all Dynamic Port values, and enter 1433 as the TCP Port, assuming you do have it running on 1433).
- Follow the instructions in Forta's post as well (enable Windows and SQL Server authentication, create a SQL Server account for ColdFusion[1], and give it access to the database in question).
- In the CF Administrator, enter the username and password for the SQL Server account you just created[2], leave the server name blank, and enter the name of the database to which you want to connect.
That's everything, I think, although I probably skipped over some of the painful details. Anyway, it's more complicated than it should be, and it's not all on Microsoft: there are plenty of JDBC connectors that don't have this issue. Adobe just hasn't improved their built-in connector.
[1] Unless, of course, you already have ColdFusion running under a separate user account, which is good, in which case you simply let CF log in using Windows Authentication. (return)
[2] Username and password are required only for SQL Server authentication; for Windows authentication, neither are required (because the user is already logged in). (return)
No comments:
Post a Comment