Solved

SQL 2008 Connection Failed when connecting through ODBC

Posted on 2010-08-16
9
807 Views
Last Modified: 2012-05-10
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.

I'm at a loss. This is a named instance, not listening on port 1433.  I can connect to the database in the management studio with no problem. Any help would be appreciated.
0
Comment
Question by:ITGhost
[X]
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
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 1

Expert Comment

by:Wiebren
ID: 33450072
Have you tried turning off the firewall for minute to see if thats the issue ?
0
 
LVL 1

Author Comment

by:ITGhost
ID: 33450096
I have turned off the Firewall, but tried immediately afterward.  This is on a single server, however.
0
 
LVL 7

Expert Comment

by:lundnak
ID: 33450130
Please make sure that Shared Memory is turned on for the Client Protocols on your SQL Server.

1. Open SQL Server Configuration manager
2. Browse to SQL Native Client x.xx Configuration
3. Click on Client Protocols.

Are Shared Memory, TCP/IP, and Named Pipes enabled?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 1

Author Comment

by:ITGhost
ID: 33450139
All three are enabled.
0
 
LVL 8

Expert Comment

by:Julianva
ID: 33452236
when you create your odbc in servername dialog do this

servername/instance,portnumber - eg testserver/testdb,3306


you must specify port number when you have changed from default. Use the tcp protocol seems like you using named pipes, because named pipes uses shared memory.PLEASE MAKE SURE YOU  ARE USING THE CORRECT INSTANCE NAME - common mistake when using named instances. look in services for correct instance name if not sure



0
 
LVL 2

Accepted Solution

by:
dhlotter earned 500 total points
ID: 33453772
try connecting through odbc datasource by specifying your servername like this

servername\instancename   (note the backslash)

in the client configuration, make sure you have TCP/IP selected and that the server alias and server name are both the same as the format above. also have 'dynamically determine port' enabled.

this should do the trick.
0
 
LVL 8

Expert Comment

by:Julianva
ID: 33453870
dhlotter
the backslash is quite right, mistake in my comment.

0
 
LVL 1

Author Closing Comment

by:ITGhost
ID: 33455316
Thanks for this answer.
0
 
LVL 2

Expert Comment

by:dhlotter
ID: 33461566
pleased we could help
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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 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.

688 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