2

HI, folks,

Previously, I had a SQL Server 2008 installed, but then I deleted it, and installed SQL Server 2008 Express Management Studio. And now I can't connect to local computer. I get error :

A network-related or instance-specific error occured while establishing a connection to SQL server. The server was not found or was not accesible.Verify that the instance name is correct and that SQl Server is configured to allow remote connections.(provide: Named Pipes Provider, error:40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2).

But I can create DB via VS2010.

3
  • 8
    I believe express editions run a named instance. You are specifying it in your connection string, right? Something like, (local)\SQLEXPRESS or 127.0.0.1\SQLEXPRESS?
    – Mark
    Jul 3, 2010 at 21:54
  • 3
    Thank, this helped. Only i need specify (local)\SQLEXPRESS
    – Dzmitry
    Jul 4, 2010 at 13:14
  • Had the same problem and Mark's comment was the solution as well. Probably should be made into an full answer.
    – Brian
    Jun 27, 2011 at 1:53

3 Answers 3

2

Courtesy of Mark's comment:

I believe express editions run a named instance. You are specifying it in your connection string, right? Something like, (local)\SQLEXPRESS or 127.0.0.1\SQLEXPRESS?

From Microsoft http://technet.microsoft.com/en-us/library/ms165679(v=sql.90).aspx:

SQL Server Express is typically installed as a named instance. The default name of the instance is SQLExpress.

0

SQL Server Express editions install by default without TCP/IP connectivity. If your database service is running on one compute and the management studio is on another, you will need to enable TCP/IP using the SQL Server Configuration Manager.

0

Have a look in:

File - Connect Object Explorer - Server name: - Network Servers - Database Engine - here would be your database name/database instance(use this or select it)

enter image description here

In my case it was different from computer name, therefore there wasn't any result with Windows Authentication, when I've tried to see the list of databases.

Not the answer you're looking for? Browse other questions tagged or ask your own question.