Create ODBC connection to SQL 2012 Express

Posted on 2014-01-28
Last Modified: 2014-02-02

I setup SQL Express 2012 onto a Windows Server 2008 R2 system. When I installed SQL Server, I installed it in Mixed Mode, and I added a few network users to be admin. I also created an sa account and password. The install completed and I can create a database.

From a Windows 7 workstation, I am trying to create a ODBC connection and filedsn to the server. The server is found. But, it will not let me connect. When I try to connect, I get the following error:

 Connection failed
SQLState: 01000
SQL Server Error: 10060
SQL State 08001
SQL Error 17
Server does not exist or access denied.

I thought this might be a firewall issue so I turned off the firewall. The server is part of a workgroup so I enabled the following ports: 1433 and 1434 and 443.

What else could be causing me from not being able to create an ODBC DSN connection to the SQL 2012 Express server?

Question by:jhieb
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
LVL 83

Accepted Solution

Dave Baldwin earned 500 total points
ID: 39816937
Did you download the SQL Native Client for SQL Server 2012 on the Windows 7 machine?  It is listed about the middle of the page here under Install Instructions:

Author Comment

ID: 39817033
That helped and I was able to make it further. For some reason when I was creating the DSN file I was not able to choose my database to be the default., or even see it to choose it as the default.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39817093
Try using the IP address as the host name and see if it shows up.  If it doesn't then maybe it's not 'exposed' to external connections.
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

LVL 38

Expert Comment

by:Jim P.
ID: 39817704
Is the SQL Browser Service running?

If it isn't then you probably have to go into the SQL Configuration manager and configure for remote access.

Author Comment

ID: 39817872
The Sql configuration manager shows that the SQL SErver and SQL Server Browser is running. But, the SQL Server Agent is not running even though it is set to automatic. When I try to run the service, it returns:

"The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details."

The application log shows: OpenSQLServerInstanceRegKey:GetRegKeyAccessMask failed (reason: 2).

Searching for this error, it seems that I may need to use a different account to start this service other than the built in Network Service account. So, I tried a network account that I created for the SQL service (an account with domain admin rights), and the service still will not startup. when I tried to use a different account, such as a domain administrator to start the service, I received an error that says:

"The process terminated unexpectedly." [0x8007042b]"

Is this SQL Sever Agent not running a problem?

At the workstation where I am trying to make a connection to this server, I am walking through the ODBC Data Source Administrator. I can choose the server using an IP address and the named instance and press next. When I get to the "Change the default database to" screen choice, I can select (default) or press the down arrow to choose a database. When I press the down arrow to choose a database it spins for a few moments and returns with the following error:

Connection failed:
SQLState: 08001
SQL Server Error: 10060
[Microsoft][ODBC Driver 11 for SQL Server] TCP Provider: A connection attempt failed because the connected party did not respond after a period of time, or established connection failed because connected host has failed to respond.

Connection failed:
SQLState: HYT00
SQL Server Error: 0
[Microsoft][ODBC Driver 11 for SQL Server] Login timeout expired.

Here is another
LVL 38

Expert Comment

by:Jim P.
ID: 39817913
The SQL Server Express agent is a specialized engine that is designed to fire up and do some basic stuff during the SQL Service statup. But it automatically shuts off afterward.

As for the service accounts: DO NOT use a domain admin account. It should be a regular domain account and then the easiest way is a server local admin account. Even that has issues but is closer to a secure setup.

In the configuration manager make sure that the TCP has priority. Preferably turn off Named Pipes.
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39819758
When I try to connect, I get the following error:
SQL Server installed as named instance, so you need to connect to YourComputername\SQLExpress or .\SQLExpress

But, the SQL Server Agent is not running even though it is set to automatic.
SQL Server Express does not support SQL Server Agent.

Author Comment

ID: 39819937
I decided to install SQL Server 2012 and it works better. On the server, I am able to connect via ODBC and also view the tables with management Studio.

From the workstation, however, I still cannot connect via ODBC or even with the management studio loaded. I am not sure why and thought it might be the firewall.

I disabled the firewall service but it did not make a difference. For now, I might have to give this a rest until I have more time to test it. I was able to get done what I needed to get done locally on the server.
LVL 35

Expert Comment

by:David Todd
ID: 39819953

Have you checked via Configuration Manager that tcp is enabled. Some editions such as early editions of SQL Express install with only shared memory network protocol enabled. That is, can connect on the machine, but can't connect from other machines.


Author Closing Comment

ID: 39828753
The bizarre resolution to this is that I had to create a server alias and then I was able to get in.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question