3

I'm not sure how I ended up with this situation: I seem to have two SQL Server instances with the same name, in one machine.

Screenshot here

When I connect through SQL Management Studio I have access to the database of my application, but it is empty, tables have no rows. However when my application connects through the next connection string it has all the rows it had inserted, I mean, the application works fine.

Data Source=DESKTOP-D5BH4BP;Initial Catalog=AppDB;User ID=AppUsr;Password=pass;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False

So I guess each instance points to its own files.

The question is: How can I get rid of the empty instance??

Alexis
  • 43
  • 2
  • 6
  • And I'm not able to connect to the same instance as the application through Management Studio – Alexis Jul 28 '18 at 00:19
  • If I were you, check for if there are indeed 2 physical sets of database files to make sure there are really two instances. Look for your `.mdf` and `.ldf` files. – sniperd Jul 28 '18 at 00:27
  • You cannot have two instances with the same name on SQL Server, it is impossible. – M.Ali Jul 28 '18 at 00:29
  • check the admin tools - services, how many SQL Server instance you see there – Squirrel Jul 28 '18 at 02:45

2 Answers2

1

You cannot have two instances with the same name on SQL Server, it is not possible at all.

The drop down you have shared in your screenshot is only showing the server names you have connected to in past using SSMS, you can type anything there but whether that server exists or not is something different.

To get rid of these names from the drop down list, just select the name and press Delete key.

M.Ali
  • 67,945
  • 13
  • 101
  • 127
0

Click on < Browse for more...> and you'll see the single instance

enter image description here

If you want to remove the duplicate entry from the drop down, just mouse hover on the entry and hit delete on the keyboard.

sacse
  • 3,634
  • 2
  • 15
  • 24