Unable to connect to sql server 2005 express

  • Hi, all.

    I installed SQL Server 2005 Express edition with Advanced Services about 4 months ago. I named instance GORAN-\SQLEXPRESS (GORAN- is a name of my machine) Then attached sample databases (AdventureWorks, Nothwind, pubs), and created some new for bussiness and personal data that I have.

    Later on I made some new instance to put business data away from personal (GORAN\SQLEXPRESS1), and one for Reports in Business Inteligence Studio.

    It worked fine until yesterday when I was unable to connect to my first instance (although I am an admin for my machine, and used Windows authentication before to connect).

    Error message is as follows:

    This is error message

    TITLE: Connect to Server

    ------------------------------

    Cannot connect to GORAN-\SQLEXPRESS.

    ------------------------------

    ADDITIONAL INFORMATION:

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    For online help error-table is:

    Item Name Value

    Product Name Microsoft SQL Server

    Message Source MSSQLServer

    MessageID 2

    LinkId 20476

  • SQL Server Express does not allow remote connections by default and when you connect using ServerName\InstanceName it assumes you are attempting to connect remotely. If you use localhost\InstanceName you should be able to connect. Check out this link http://support.microsoft.com/kb/914277 in order to enable Remote Connections.

  • I was able to connect previously like I described before.

    When I open SQL Management Studio, first window is Connect to Server.

    On Server type is Database Engine.

    On Server Name is name of the machine and name of instance.

    On Authentication is Windows Authentication

    Fields User Name, Password and Remember Password, showed bellowed are shadowed.

    Previously, for five months I just clicked on Connect, and was connected to SQL Server and specified instance.

  • Did you try what I suggested? Since you added an instance it may need to use localhost as the server name or have the Sql Server configured to allow remote connections.

    Have you verified that you installed a new instance an ddid not overwrite the existing instance? You can look in Administrative Tools -> Services and look for 2 instances of SQL Server Express running.

  • Hi,

    Check the below link, this may help you.

    error 40-could not open connection to sql server

  • Have you tried checking that the MSSQLSERVICE windows service is actually running on your machine (in Administrative Tools->Services ?

    Kind Regards,

    Noel Huxley

  • I have had a similar problem after loading an additional instance of SQL Express on my machine.

    This was resolved by re-applying protocol settings in SQL Configuration Manager, and restarting the instance services.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply