SQL Server 2008 R2 can't connect to local database in Management Studio

后端 未结 9 1342
既然无缘
既然无缘 2020-12-25 11:22

I am using SQL Server 2008 R2 Express.

I first installed SQL Server 2008 R2 Express Management Studio and then I installed SQL Server 2008 R2 Express. I have the ins

相关标签:
9条回答
  • 2020-12-25 11:27

    If your instance is called SQLEXPRESS, then you need to use .\SQLEXPRESS or (local)\SQLEXPRESS or yourMachineName\SQLEXPRESS as your server name - if you have a named instance, you need to specify that name of the instance in your server name.

    0 讨论(0)
  • 2020-12-25 11:32

    I had this problem. My solution is: change same password of other in windowns. Restart Service (check logon in tab Service SQL).

    0 讨论(0)
  • 2020-12-25 11:33

    I have the same error but with different case. Let me quote the solution from here:

    Luckly I also have the same set up on my desktop. I have installed first default instance and then Sql Express. Everything is fine for me for several days. Then I tried connecting the way you trying, i.e with MachineName\MsSqlServer to default instance and I got exctaly the same error.

    So the solution is when you trying to connect to default instance you don't need to provide instance name.(well this is something puzzled me, why it is failing when we are giving instance name when it is a default instance? Is it some bug, don't know)

    Just try with - PC-NAME and everything will be fine. PC-NAME is the MSSQLServer instance.

    Edit : Well after reading your question again I realized that you are not aware of the fact that MSSQLSERVER is the default instance of Sql Server. And for connecting to default instance (MSSQLSERVER) you don't need to provide the instance name in connection string. The "MachineName" is itself means "MachineName\MSSQLSERVER".

    0 讨论(0)
  • 2020-12-25 11:35

    Follow these steps to connect with SQL Server 2008 r2 (windows authentication)

    Step 1: Goto Control Panel --> Administrator Tools --> Services select SQL SERVER (MSSQLSERVER) and double click on it

    Step 2: Click on start Service

    Step 3: Now login to SQL server with Windows authentication and use user name : (local)

    Enjoy ...

    0 讨论(0)
  • 2020-12-25 11:39

    I also received this error when the service stopped. Here's another path to start your service...

    1. Search for "Services" in you start menu like so and click on it:

    1. Find the service for the instance you need started and select it (shown below)
    2. Click start (shown below)

    Note: As Kenan stated, if your services Startup Type is not set to Automatic, then you probably want to double click on the service and set it to Automatic.

    0 讨论(0)
  • 2020-12-25 11:42

    Lots of the above helped for me, plus the accepted answer, but since I was on an EC2 instance, I had no idea what my instance name was. Finally, I opened SQLServer Configuration Manager and in the Name column, use whatever is there as your connection server, so in my case, .\EC2SQLEXPRESS and worked great!

    0 讨论(0)
提交回复
热议问题