Mark Drew (Redux)- cf_etc...

a compendium of railo, cfml, cfeclipse and technology topics

Mark Drew (Redux)- cf_etc...

Solving MS SQL "connection refused" Errors and running MS SQL on a MacBook Pro

November 14, 2006 ·

I did a fresh install of Windows with ColdFusion 7.02 and MS SQL 2000 (SP2?) under Parallels on my MacBook Pro the other day. After I had installed everything I tried to set up a DSN in ColdFusion but I kept getting "connection refused" errors, no matter what I did. I did a lot of googling to find a solution and found lots of work arounds including setting up a ODBC data-source. None of these were satisfying, I mean, you SHOULD be able to connect to a database right? That's the whole point! So that I don't do the same mistake again I thought I would blog it. The solution is actually rather simple, you just have to install Microsoft SQL Server 2000 Service Pack 3a. That totally solves the problem. (I haven't checked with upgrading to Service Pack 4 yet.) On a related note, I was able to connect to the Microsoft SQL Server running under Parallels from OS X. Pretty neat!

Tags: apple · coldfusion · microsoft · reference

13 responses

  • 1 Dave Gault // Sep 22, 2008 at 4:12 PM

    Mark, you are a rock star. I've been seeing many of the same solutions you probably ran into while tackling this and none of them worked. A beer on me if you ever find your way to Anchorage, AK.
  • 2 kendall // Sep 22, 2008 at 4:12 PM

    Mark,
    what do you know about SQL Server 2005? I'm having the same issue and was wondering if you or anyone else had a solution. I'm also running SQL Server on my MBP.
  • 3 Mark Drew // Sep 22, 2008 at 4:12 PM

    I did find a solution. I recently re-installed windows on Parallels and If you can wait I shall do a blog post about it with images! (bet you cant wait)

    Basically by default you the TCP/IP stack is not enabled so you have to enable it

    Will get to that now.
  • 4 Mark Drew // Sep 22, 2008 at 4:12 PM

    @ Kendall: check out my latest post on how to do this: http://www.markdrew.co.uk/blog/index.cfm/2006/12/22/Getting-MS-SQL-2005-running-on-OS-X-

    Hope that helps!
  • 5 Aaron West // Sep 22, 2008 at 4:13 PM

    Hey Mark! We loaded sp 4 on our dev servers as well as production boxes and we've had no problems.
  • 6 Cliff Pearson // Sep 22, 2008 at 4:13 PM

    Great news Mark! As my MBP is being delivered this week, this couldn't have come at a better time.

    Cheers

    </cliff>
  • 7 Mark Drew // Sep 22, 2008 at 4:13 PM

    I shall try SP4 too, the main thing was to get the connection refused error removed (so I could connect to the damn server!)

    I am sure you are looking forward to it Cliff! One thing to note, is that I am connecting via the IP, so basically I am connecting via the network to the Parallels "machine", so if the IP changes, then you won't be able to connect (as it happens every day when I go from work -> home)

    MD
  • 8 Tony Petruzzi // Sep 22, 2008 at 4:13 PM

    Mark,

    What you ran into is actually a common problem. I don't know the exact cause for it, so I couldn't give you the steps to recreate it. Just as a rule of thumb, you should ALWAYS make sure that SQL Server is at the latest service pack. Actually just install the service pack right after you install MSSQL and you should never have these weird problems.
  • 9 Al Davidson // Sep 22, 2008 at 4:13 PM

    Hi Mark

    I had all sorts of similar hair-tearing frustrations setting up MS SQL on a XP laptop recently - turned out that it was that blimmin' Windows Firewall, and all I needed to do was change the TCP connection binding from the default port (1433) to a higher port (eg 11433). Can't say anything about MacBooks though - apart from that we've gone through 3 in the last week here, with total hard disk failures. Good luck! ;)
  • 10 Mark Drew // Sep 22, 2008 at 4:13 PM

    Man, that sucks! I have had my MBP since March with not a single problem.... I love it.. I think at one point I had an uptime of about 30 days (I didnt bother doing any updates during that time)

    They are normally a lot sturdier than any windows based laptop that I have encountered (please, no flames, I like my Mac, I wont turn back)

    MD
  • 11 Steve House // Sep 22, 2008 at 4:13 PM

    Mark, when you connect to SQL from the OSX side, what network setting do you have for the VM in Parallels? Does it come up under localhost or another address?

    I am abandoning CF on the Mac side for now mainly because I am giving up on MySQL and will need Parallels running MS SQL anyway.
  • 12 Mark Drew // Sep 22, 2008 at 4:13 PM

    I connect via the IP, as I mentioned it changes depends which network I am on (home or office) so thats the only PITA.
  • 13 sean // Jan 8, 2009 at 9:08 PM

    On your link for making this work in 2005 (http://www.markdrew.co.uk/blog/index.cfm/2006/12/22/Getting-MS-SQL-2005-running-on-OS-X-) I don't see the relevant content