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

Posted At : November 14, 2006 11:51 AM | Posted By : Mark Drew
Related Categories: coldfusion, microsoft, reference, apple

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!

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Aaron West's Gravatar Hey Mark! We loaded sp 4 on our dev servers as well as production boxes and we've had no problems.
# Posted By Aaron West | 11/14/06 1:45 PM
Cliff Pearson's Gravatar Great news Mark! As my MBP is being delivered this week, this couldn't have come at a better time.

Cheers

</cliff>
# Posted By Cliff Pearson | 11/14/06 1:54 PM
Mark Drew's Gravatar 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
# Posted By Mark Drew | 11/14/06 2:22 PM
Tony Petruzzi's Gravatar 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.
# Posted By Tony Petruzzi | 11/14/06 2:28 PM
Al Davidson's Gravatar 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! ;)
# Posted By Al Davidson | 11/14/06 2:34 PM
Mark Drew's Gravatar 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
# Posted By Mark Drew | 11/14/06 2:44 PM
Steve House's Gravatar 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.
# Posted By Steve House | 11/15/06 1:09 PM
Mark Drew's Gravatar I connect via the IP, as I mentioned it changes depends which network I am on (home or office) so thats the only PITA.
# Posted By Mark Drew | 11/15/06 1:52 PM
kendall's Gravatar 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.
# Posted By kendall | 12/22/06 5:28 AM
Mark Drew's Gravatar 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.
# Posted By Mark Drew | 12/22/06 9:28 AM
Mark Drew's Gravatar @ Kendall: check out my latest post on how to do this: http://www.markdrew.co.uk/blog/index.cfm/2006/12/2...-

Hope that helps!
# Posted By Mark Drew | 12/22/06 9:44 AM
Dave Gault's Gravatar 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.
# Posted By Dave Gault | 3/26/07 6:29 AM