简体   繁体   English

如何找出 SQL 服务器默认实例名称?

[英]How to find out SQL Server default instance name?

I have three SQL server instances on my computer.我的计算机上有三个 SQL 服务器实例。 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.如上所述,我将使用哪个数据库。

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).您正在连接到默认实例(其中只能有一个)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM