Adobe Solution Partner

November 13, 2009

Connecting to SQL Server 2008 (Express) from OS X

Filed under: ColdFusion, Databases, Macintosh — Perry Woodin @ 1:26 pm

This is for anyone having trouble connecting to SQL Server on Parallels from ColdFusion on Mac OS X.

Each time I’ve installed a new version of SQL server — be it 2005 or 2008 — it took me a bit a random clicking to get a ColdFusion datasource connected to SQL Server.

Here are some tips.

  1. Make sure the service is running. Well duh… but this has tripped me up before, so just check and save yourself the headache.
  2. Make sure that TCP/IP is enabled.  To do this, open Start => All Programs => Microsoft SQL Server 2008 => Configuration Tools => SQL Server Configuration Manager. In the left column, expand SQL Server Network Configuration. Select your SQL Server instance (note the instance name e.g. SQLEXPRESS) and then double-click TCP/IP in the right column to open the TCP/IP Properties. Under the Protocol tab, make sure Enabled is Yes.
    TCP/IP Properties
  3. While you’ve go the TCP/IP Properties window open, click the IP Addresses tab. From this tab, you can see what IP address SQL server is running on. Equally important, you will see the Port Number. The default port number is 1433, but I’ve got three versions of SQL Server running and each one uses a different port number.
    IP Addresses
  4. Login to your ColdFusion administrator and create a new SQL Server Datasource. The Server will be the IP Address (e.g. followed by a colon (:), followed by the instance name (e.g. SQLEXPRESS). You get the port number from the IP Properties window in step 3 above (e.g. 1094).
    ColdFusion Datasource

That’s it. If you’ve got Windows Firewall running, make sure you can accept traffic over the port being used by SQL Server.

Share and Enjoy:
  • Digg
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Technorati
  • TwitThis

1 Comment »

  1. Hello Perry,

    You can also set up the static TCP port on tab IPAll. This way, you use one instance for each port you would like to use. Better not to use dynamic port as this is too random. Or use the instance name.

    Comment by Clement Huge — December 28, 2010 @ 12:34 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment


Server Down?

Maximize Web application uptime by drawing upon Webapper's years of experience tuning and stabilizing many of the world's largest ColdFusion Web applications. Contact us today!