2

I am new to SQL Server and am following some tutorials.

I have not yet created any databases. In SQL Server 2012 Management Studio I click on "connect" -> "Database Engine". I noticed that, using the server name field, I can type localhost and then connect or localhost\sqlexpress and it also connects successfully.

I don't understand what the difference is, and practically what the impact would be to using one over the other. Could somebody please provide an explanation?

In the image below you can see I am connected to both at the same time. One has databases and one does not. What is the difference between these two instances? Why does one have the databases I created and the other does not?

screenshot

3

Hypothesis one: You have installed a named instance called SQLExpress. This instance was configured to listen on the default SQL Server port 1433. Therefore wether you connect to 'localhost' or to 'localhost\SQLExpress', you are connecting to the same instance.

Hypothesis two: You have installed two different SQL Server instances, one named SQLExpress and one default, unnamed. Both connections succeed, but you are not connecting to the same instance.

|improve this answer|||||
  • Thanks. I'm guessing its hypothesis 2 based on the screenshsot I have now put in my question. – k29 Nov 20 '14 at 13:13
1

The default install of SQL Express installs a named instance, SQLExpress. To have more than one instance, you'd have to have done more than one install. You probably just need to refresh the one that is missing the databases in your image. If you think you have more than one instance of SQL Express installed, you can verify this by opening the SQL Server Configuration Manager and looking at the services. You should see one named SQL Server (SQLExpress), if there is another named SQL Server (MSSQLSERVER) then you do indeed have two instances installed, but I don't believe this is the case.

|improve this answer|||||
  • Thanks that was really helpful. I had a look and I did in fact have 2 instances installed. – k29 Nov 24 '14 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.