Monday 13 August 2012

ColdFusion 10 and MS SQL Server 2012 Express

How to set up ColdFusion 10 with MS SQL Server 2012 Express

These are the steps I followed to set it up. I found I had to use SQL server's "sa" account in order to get it working properly, but I would not recommend doing this on anything which requires security.

  1. Install MS SQL Server, choose the option to install a 'New SQL stand-alone installation...'
  2. Choose the option to customise each feature and select the features as shown below.

  1. In the Database Engine Configuration page, choose Mixed Mode and create a password as well as adding the current Windows user account (to easily allow access with SQL Server Management Studio).

  1. Complete the installation and then open the SQL Server Configuration Manager.
  2. On the side panel, expand SQL Server Network Configuration, and select Protocols for SQLEXPRESS. Enable TCP/IP and click properties.
  3. In the properties tab, set the port number for each field in the IP Addresses tab, I used port 3306.
  4. Again on the side panel, select SQL Server Services and restart SQL Server (SQLEXPRESS).
  5. Open MS SQL Server Management Studio and login using Windows authentication.
  6. Expand security > logins, right click properties on "sa". Set the password.
  7. Open ColdFusion Administrator and select the Data Sources tab.
  8. Enter the name you wish to use to refer to the data source, and select MS SQL Server for the driver.
  9. Enter the database name, server IP address and port set in step 6, and username "sa" with the password set in step 9 and submit. If all is well, ColdFusion should display a confirmation message in green text.

I hope you found this helpful. Please leave me a comment.

6 comments:

  1. You have to use the instance name on the server parameter, normally that would be:
    192.168.0.10\sqlexpress for your example. Then you can use security and db user as usual.

    ReplyDelete
  2. I can confirm that changing the server (I have both CF and SQL on the same box) to 127.0.0.1\sqlexpress did the trick for me.

    thanks.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Detailed and descriptive articles written in this blog is really very helpful for me as well as for other who seeking such kind of knowledge. It is definitely going to become useful in coming future.
    vSan 6 for Remote Office Branch Office

    ReplyDelete