Omer
Omer

Reputation: 10174

How to find out SQL Server default instance name?

I have three SQL server instances on my computer. How can I find out which is the default one?

var conn = new SqlConnection("Data Source=.;Initial Catalog=SampleDb;Integrated Security=True")

I want to learn when I use '.' as above which database I will use.

Upvotes: 2

Views: 225

Answers (1)

usr
usr

Reputation: 171168

You can only have more than one instance per OS installation if all of them have different instance names. The data source property has the format

HOST\INSTANCENAME

You are connecting to the default instance (of which there can only be one).

Upvotes: 2

Related Questions