ADO.NET SqlClient 连接字符串 - 数据源语法
有没有官方的文章说明数据源字段在sql server连接字符串中可以采用什么形式?我知道以下表格:
SERVER
SERVER\Instance
tcp:SERVER,port
nb:SERVER
nb:SERVER\Instance
还有更多表格吗?
编辑:本练习的本质不是构造连接字符串。我正在尝试解析现有的连接字符串,并且我想知道它可能采用的所有形式。我感谢所有向我指出 www.connectionstrings.com 的人,这个网站足够有用,但它显然没有没有所有的信息。例如,它不会指定可以使用“Data Source=tcp:SERVER,10000”之类的构造来指定 TCP 必须用于端口 10000 上的该数据源。
Is there any official write-up what forms can Data Source field take in sql server connection string? I'm aware of following forms:
SERVER
SERVER\Instance
tcp:SERVER,port
nb:SERVER
nb:SERVER\Instance
are there more forms?
EDIT: The essence of this exercise is not to construct a connection string. I am trying to parse existing connection string, and I want to know all the forms it could take. I appreciate everybody who pointed me to www.connectionstrings.com, and this site is useful enough, but it clearly does not have all the information. For example, it will not specify that it is possible to use construct like "Data Source=tcp:SERVER,10000" to specify that TCP must be used for this datasource on port 10000.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查此网站以了解所有连接字符串问题:http://www.connectionstrings.com
check this website for all connection string questions: http://www.connectionstrings.com
该网站提供的有关 SQL Server 和许多其他数据库的连接字符串的信息超出您的想象:
SQL Server 2005 的连接字符串
This website has more than you could possibly ever want to know about connection strings for SQL Server and many other databases:
Connection strings for SQL Server 2005