Alexis
Alexis

Reputation: 63

Two SQL Server instances with the same name?

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

Upvotes: 5

Views: 3774

Answers (2)

sacse
sacse

Reputation: 3744

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.

Upvotes: 2

M.Ali
M.Ali

Reputation: 69494

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.

Upvotes: 2

Related Questions