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
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.
I had this problem. My solution is: change same password of other in windowns. Restart Service (check logon in tab Service SQL).
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".
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 ...
I also received this error when the service stopped. Here's another path to start your service...
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.
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!