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
  • 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.
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need to update TableA to TableB 6 33
SQL Server - Slabs 9 35
TSQL - IF ELSE? 3 25
SQL Server stored proc 2 10
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now