Question

How Do I Connect My Local MS SQL Server 9.0.1399 as a Data Source via my ColdFusion MX 7 Administrator?

Asked by: dbabbitt

Hi Guys!

I have installed MS SQL Express on my machine with a Server Administrator ("sa") password. I have also installed ColdFusion MX 7 Developers Edition server on my machine. When I go to the "Data & Services > Datasources" section to the ColdFusion Administrator and try to add a new data source using "Microsoft SQL Server" as the driver, "master" as the database, "127.0.0.1" as the server, "1433" as the port, "sa" as the Username, and the Server Administrator ("sa") password as the password, and click the Submit button, I get this error:

Connection verification failed for data source: master
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

What should my settings be?

Dave

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-01-19 at 10:19:51ID21702855
Tags

sql

,

server

,

connect

,

local

Topics

ColdFusion Application Server

,

ColdFusion Studio

Participating Experts
3
Points
500
Comments
20

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. DataSource????
    Hi guys!!! I have a question regarding the datasource in jdbc. If i used datasource to connect to database(mysql) should i still need a driver?Can u give me some code on how to conenction using datasource?? thanks...
  2. Coldfusion MX ? ? ?
    Hi there, I've been using CFServer 4.5 for a while and is now testing the Coldfusion MX Enterprise server - on a MS SQL Server 7.0 ! However I'm a bit worried about potential performance issues regarding W2000, CF MX and MS SQL 7.0/2000 ! Any comments on that ? Here is pi...
  3. Macromedia Flash MX.
    I need links to step -by- step guides. I want to make movies with Macromedia Flash MX.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: digicidalPosted on 2006-01-19 at 10:54:44ID: 15741530

Your problem is most likely either with the name of the database - this causes same error, or because you do not have SQL set up to use TCP/IP yet (I believe that the desktop version just installs named pipes initially) not sure because I've never used the 'Express' version, but those are the only two times I've gotten the error you mentioned is when the port is not available because SQL wasn't using TCP or because I had a typo in the name of my database or an incorrect login.

 

by: digicidalPosted on 2006-01-19 at 10:56:38ID: 15741549

Side note... depending on what software you have on your system your firewall might be blocking the port as well or perhaps filtering the loopback for some reason.  Try using localhost instead of 127.0.0.1 and see if that works for you... or try using the actual physical address of your NIC... (ipconfig will tell you what that is if you are unsure).

 

by: dbabbittPosted on 2006-01-19 at 12:25:20ID: 15742449

Launching SQL Server Configuration Manager and enabling the TCP/IP protocol for SQLEXPRESS and restarting the SQL Server (SQLEXPRESS) has no effect, or gets what looks like the same error:

Connection verification failed for data source: master
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

 

by: dbabbittPosted on 2006-01-19 at 12:28:05ID: 15742480

Renaming the C F Data Source Name to CFDataSourceName has no effect or gets what looks like the same error:

Connection verification failed for data source: CFDataSourceName
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

 

by: dbabbittPosted on 2006-01-19 at 12:30:36ID: 15742502

Changing the Server to localhost has no effect or gets the same error:

Connection verification failed for data source: CFDataSourceName
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

 

by: mmc98dl1Posted on 2006-01-19 at 12:34:10ID: 15742541

dbabbitt

try disabling your firewall and trying again. If you are using XP then your built in firewall could be blocking the 1433 port.

 

by: dbabbittPosted on 2006-01-19 at 12:37:59ID: 15742573

Typing "ipconfig /all" in the Command Prompt and getting:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Compaq_Owner>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : The-Big-Mistake
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Hybrid
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : hsd1.ma.comcast.net.
        Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Eth
ernet NIC
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.1.106
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.1
        DHCP Server . . . . . . . . . . . : 192.168.1.1
        DNS Servers . . . . . . . . . . . : 68.87.71.226
                                            68.87.73.242
        Lease Obtained. . . . . . . . . . : Thursday, January 19, 2006 12:14:05
PM
        Lease Expires . . . . . . . . . . : Friday, January 20, 2006 12:14:05 PM


And plugging the "192.168.1.106" into the Server input field of the  Data & Services > Datasources > Microsoft SQL Server :  CFDataSourceName form has no effect or produces the same error:

Connection verification failed for data source: CFDataSourceName
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

 

by: dbabbittPosted on 2006-01-19 at 12:40:30ID: 15742598

Disabling Norton Internet Security and Antivirus auto-protect and resubmitting has no effect are produces the same error:

Connection verification failed for data source: CFDataSourceName
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

 

by: mrichmonPosted on 2006-01-19 at 13:46:17ID: 15743351

Try creating a test database with a test table inside.

Then create a login + user (note those are two different things) in SQL for the new database.  Then give it permission to the table.

Try connecting with that.

Often there is difficulty getting permissions correct with the sa account and master database (and since you n ever really want that anyway, why test with that)

 

by: dbabbittPosted on 2006-01-19 at 17:00:13ID: 15745258

Connecting to THE-BIG-MISTAKE\SQLEXPRESS in the Micorsoft SQL Server Management Studio Express using Windows Authentication using TCP/IP for the Network Protocol gets this error:


Cannot connect to THE-BIG-MISTAKE\SQLEXPRESS.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setting SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error locating Server/Instance specified) (Microsoft SQL Server)

 

by: dbabbittPosted on 2006-01-19 at 17:01:30ID: 15745266

Connecting to THE-BIG-MISTAKE\SQLEXPRESS in the Microsoft SQL Server Management Studio Express using Windows Authentication using Named Pipes for the Network Protocol gets this error:


Cannot connect to THE-BIG-MISTAKE\SQLEXPRESS.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setting SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error locating Server/Instance specified) (Microsoft SQL Server)

 

by: dbabbittPosted on 2006-01-19 at 17:11:59ID: 15745341

These are the current connection properties:

Authentication Method: Windows Authentication
User Name: THE-BIG-MISTAKE\Compaq_Owner

Database: model
SPID: 52
Network Protocol: SharedMemory
Network Packet Size: 4096
Connection Timeout: 15
Execution Timeout: 0
Encrypted: No

Product Name: Microsoft SQL Server Express Edition
Product Version: 9.0.1399 RTM
Server Name: THE-BIG-MISTAKE\SQLEXPRESS
Instance Name: SQLEXPRESS
Language: English (United States)
Collation: SQL_Latin1_General_CP1_CI_AS

Computer Name: THE-BIG-MISTAKE
Platform: NT INTEL X86
Operating System: 5.1 (2600)
Processors: 1
Operating System Memory: 1470

 

by: dbabbittPosted on 2006-01-19 at 18:50:05ID: 15745867

Following these directions:
1) Launch the User Accounts Control Panel
2) Click "Create a new account" in the "Pick a task..." section
3) Type in test_login for the new account name and click the "Next >" button
4) Make sure the "Computer administrator" radio box is checked and click the "Create Account" button
5) Click the test_login link in the "or pick an account to change" section
6) Click the "Create a password" link
7) Use test_login as a password and click the "Create Password" button
8) Close the User Accounts Control Panel
9) Launch Microsoft SQL Server Management Studio Express
10) Set the Authentication Method to Windows Authentication
11) Set the Network Protocol to Shared Memory
12) Connect to THE-BIG-MISTAKE\SQLEXPRESS
13) Create a test database called Test_Database
14) Create a new table called Test_Table
15) Bring up the Login - New dialog box by right-clicking Logins in the Security Branch of THE-BIG-MISTAKE\SQLEXPRESS(SQL Server 9.0.1399 - THE-BIG-MISTAKE\Compaq_Owner)
16) Set the Login name to THE-BIG-MISTAKE\test_login
17) Make sure the Windows Authentication radio box is checked
18) Change the Default database to Test_database
19) Click the OK button
20) Bring up the Database User - New dialog box by right-clicking Users in the Security Branch of Test_Database and selecting the "New User..." menu item
21) Set the User name to test_user
22) Set the Login name to THE-BIG-MISTAKE\test_login
23) In the Securables section, add Test_Table
24) Check all Grants in the Explicit Permissions for dbo.Test_table
25) Click the OK button
26) Launch a web browser to http://127.0.0.1:8500/CFIDE/administrator/index.cfm
27) Log in and navigate to the "Data & Services > Datasources" section
28) Click on the CFDataSourceName link to bring up the edit form
29) Change the Database to Test_Database
30) Change the server to 127.0.0.1
31) Change the Username and Password to test_login
32) Click on the Submit buttons

Get this error:
Connection verification failed for data source: CFDataSourceName
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

 

by: dbabbittPosted on 2006-01-19 at 19:11:10ID: 15745981

Following these directions:
1) Launch the ODBC Data Source Administrator Control Panel
2) Make sure the User DSN tab is clicked
3) Click on the Add... button
4) Select "SQL Server" and click the Finish button
5) Type in test_ODBC for the Name and (local) for the Server
6) Click the "Next >" button
7) Click the "With SQL Server authentication using a login ID and password entered by the user." radio button
8) Check the "Connect to SQL Server to obtain default settings for the additional configuration options." checkbox
9) Type in test_login to the Login ID and Password fields
10) Click the "Next >" button

Gets this error:
Connection failed:
SQLState: '01000'
SQL Server Error: 2
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.

 

by: digicidalPosted on 2006-01-20 at 04:00:38ID: 15748016

This is very obviously a connectivity problem and not anything with your account (at least it doesn't appear so from the errors... that *might* be a secondary problem).  The key is that you are still not getting outside access to your database (SQL is not allowing outside connections).

I found a few tips here: http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx

First, apparently (at least on some, but not on other installations) SQL Express appears to listen on port 1106 NOT 1433 as it should. Apparently this might be due to something holding that port, but at least one person claims that SQL picked the port in error. (Who knows what Microsoft was thinking, but that's EvilEmpireSoftware for ya).  So you will want to check your SQL Server log to verify which port it's listening on.

Secondly - [QUOTE]The default install for SQL Express installs Express as a named instance(called SQLExpress), with no network listening and with Windows Authentication support only.[/QUOTE]  You can see in your post from above that only 'Shared Memory' is indicated.  Unless you didn't provide the output for the other protocols it appears that you are neither running TCP or NP as connectivity options.  At the link above there is a detailed walkthrough of testing your connectivity and making sure that you have everything opened properly.

If that fails... try here: http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sseoverview.asp

It would appear that you do not have networking enabled... follow the instructions above (under Networking Support):
[Quote]Use the Surface Area Configuration tool to enable networking and enable and start the SQLBROWSER service.
Use SQL Server Configuration Manager to enable relevant protocols and start SQL Browser. Figure 2 shows the usage of this tool to enable the networking protocols.
Use DISABLENETWORKPROTOCOLS=0 in the setup command line, if you know in advance that networking support is needed.
Use SMO-based scripting to enable the protocols.[/Quote]

 

by: dbabbittPosted on 2006-01-23 at 02:47:08ID: 15764846

Typing this at the command prompt:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\dbabbitt>sqlcmd -S.\sqlexpress
1> Exit

C:\Documents and Settings\dbabbitt>net start sqlbrowser



Gets this error:
System error 1058 has occurred.

The service cannot be started, either because it is disabled or because it has n
o enabled devices associated with it.


C:\Documents and Settings\dbabbitt>

 

by: dbabbittPosted on 2006-01-23 at 03:42:04ID: 15765134

How do I use DISABLENETWORKPROTOCOLS=0 in the setup command line?

 

by: dbabbittPosted on 2006-01-23 at 03:46:27ID: 15765164

How do I use SMO-based scripting to enable the protocols?

 

by: dbabbittPosted on 2006-01-31 at 04:02:25ID: 15832579

Following these directions:
1) Uninstall Norton Internet Security (what a piece of crap!) and replace it with ZoneAlarm
2) Launch SQL Server Configuration Manager
3) Expand the SQL Server 2005 Network Configuration section
4) Select Protocols for SQLEXPRESS
5) Right-click on TCP/IP and choose Properties
6) Click on the IP Addresses tab
7) Expand the IPAll section
8) Copy the port number in TCP Dynamic Ports (it seams to pick a random number)
9) Go to the "Data & Services > Datasources" section to the ColdFusion Administrator
10) Add a new data source using "Microsoft SQL Server" as the driver, "master" as the database, "127.0.0.1" as the server, the copied port number as the port, "sa" as the Username, and the Server Administrator ("sa") password as the password
11) Click the Submit button

Gets this result:

datasource updated successfully.

Yay! :-)

 

by: digicidalPosted on 2006-01-31 at 13:05:41ID: 15837675

Congratulations!  I haven't worked with SQL2005 yet but from your situation it seems obvious that some of the 'enhancements' that MS has built into the new version are not actual 'improvements'.  I'm guessing that by the second odd number service pack they'll have it right.  At least that's how their track record has been going in recent years.  That dynamic port issue is what I figured was the problem - but who knows why they even left that as a default is anyone's guess.  You'd think that trying 1433 first and then prompting the user for a custom port if 1433 is occupied would be a much better solution than merely picking one at random and then forcing the user to parse a log file to figure out what port the install chose is definitely NOT a user-friendly support.

I'm sure your question will be helpful for many other users in the future.  Glad I could help you, but you should give yourself a pat on the back for doing all the legwork!

Cheers!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...