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

Solution 1:

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.

Solution 2:

Your "SQL Server Browser" service has to be started too.

Browse to Computer Management > Services. how to browse to computer management

Find find "SQL Server Browser"

  1. set it to Automatic
  2. and also Manually start it (2)

how to edit sql server browser properties and start it

Hope it helps.

Solution 3:

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 ...

Solution 4:

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:

enter image description here

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

enter image description here

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.