Enable remote connections for SQL Server Express 2012

前端 未结 17 834
栀梦
栀梦 2020-11-22 03:33

I just installed SQL Server Express 2012 on my home server. I\'m trying to connect to it from Visual Studio 2012 from my desktop PC, and repeatedly getting the well-known e

17条回答
  •  攒了一身酷
    2020-11-22 04:35

    I had a different problem from what all of the answers so far mentioned!

    I should start off by saying that I had it in Visual Studio, and not SQL Server Express but the solution should be exactly the same.

    Well, god, it's actually really simple and maybe a bit foolish. When I tried to create a database and Visual Studio suggested the name of the SQL Server it gave me my Windows username and since it's actually the name of the server I went for it.

    In reality it actually was my Windows username + \SQLEXPRESS. If you didn't change any settings this is probably yours too. If it works, stop reading; this is my answer. If it doesn't work maybe the name is different.

    If, like me, you only had this problem in Visual Studio to check what is yours follow these steps:

    1. Open SQL Server Management Studioicon.
    2. If you don't see your server (docked to the left by default) press F8 or go to View -> Object Explorer.
    3. Right click on the name of the server and choose Properties (The last item)
    4. At the bottom left you can see your server's actual name under "Server" (not Connection, but above it).

    This is the name of the server and this is what you should attempt to connect to! not what Visual Studio suggests!

提交回复
热议问题