gpt4 book ai didi

SQL 网络接口(interface),错误 : 25 - Connection string is not valid in Powershell

转载 作者:行者123 更新时间:2023-12-04 23:26:21 24 4
gpt4 key购买 nike

$SQLconnection = New-Object System.Data.SqlClient.SqlConnection
$SQLconnection.ConnectionString = "Server = MySQLservername\MSSQLSERVER; Database = "MYSQLDB"; Integrated Security = True"
$SQLconnection.open()

在 MSSQL 2012 中,有效。
在 MSSQL 2005 中,得到 SQL 网络接口(interface),错误:25 - 连接字符串无效。

如果仅在连接字符串中使用“Server = MySQLServername”,则有效。
我确定实例名称是正确的。它是 SQL 2005 的错误吗?

最佳答案

根据 MS ,您无法按名称连接到默认实例 MSSQLSERVER。您必须省略实例名称。我已经在 MS SQL 2008R2 和 2014 SP2 中验证了这个相同的“功能”。

您在 2012 年配置的某些东西可能启用了它,但我的默认设置不适用于它。

关于SQL 网络接口(interface),错误 : 25 - Connection string is not valid in Powershell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12336613/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com