Error creating ODBC connection to SQL Server 2008 Express

odbcsql-server-2008

When creating a System DSN, I get the error:

Connection failed:  
SQLState: '08001'  
SQL Server Error: 2  
[Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could  
not open a connection to SQL Server [2].  
Connection failed:  
SQLState: 'HYT00'  
SQL Server Error: 0  
[Microsoft][SQL Server Native Client 10.0]Login timeout expired

I'm running Vista Home Premium 64-bit SP2, and installed SQL Server 2008 Express Advanced without errors. I'll be using the database locally for an app installed on the same PC.

I'm able to successfully connect with SQL Server Management Studio using Windows Authentication (my Windows account is a member of local Administrators), and I can successfully create a database with default ownership (defaults to my Windows account). I can also connect using SSMS with SQL auth and the SA account.

SQL Server Configuration Manager shows that Shared Memory, TCP/IP, and Named Pipes are enabled for SQL Native Client 10.0 Configuration, SQL Native Client 10.0 Configuration (32bit), and SQL Server Network Configuration (SQLEXPRESS).

The SQL Server (SQLEXPRESS) and SQL Server Reporting Services (SQLEXPRESS) services are running.

When I create a system DSN, my driver choices are SQL server (sqlsrv32.dll 4-10-09), which gives a generic wizard, and SQL Server Native Client 10.0 (sqlncli10.dll 7-10-08), which gives the SQL Server 2008 wizard. I choose the latter.

I enter name, description, and have tried both MyPCName and 127.0.0.1 for the server name (browsing turns up nothing). After clicking Next, I leave it at Integrated Windows authentication, and leave Connect to server for additional options checked. After clicking Next, I get the error above. I get the same error using SQL auth and the SA account.

I know it's probably a simple answer, (permission issue?) and I'm a SQL noob, so I appreciate anything that would point me in the right direction.
Thanks!

Best Answer

I figured it out. Instead of MyPCName, I needed to use MyPCName\SQLExpress. In the past, I always just used the computer name and never had a problem. Maybe 2008 is different.