SQL Server-提供了无效的参数 [英] SQL Server - Invalid Argument Supplied

查看:103
本文介绍了SQL Server-提供了无效的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我们有在本地服务器上运行的SQL Server 2008 R2 Express,并且同一LAN上的许多计算机都使用我用C#编写的程序访问该服务器.

So we have SQL Server 2008 R2 Express running on a local server, and a bunch of machines on the same LAN use a program I wrote in C# to access said server.

该建筑物中除一台之外的所有机器都可以很开心地连接.

All the machines in the building except one can connect quite happily.

连接字符串为:

数据源= [此处的IP地址],53535 \ SQLEXPRESS;初始目录= EMS_Main ;;用户ID = EMSUser;密码= [此处密码];

确切的错误消息是:

建立与SQL Server的连接时发生与网络有关或特定于实例的错误.找不到服务器或无法访问该服务器.请验证实例名称正确并且将SQL Server配置为允许远程连接.(提供者:TCP提供程序,错误:0-提供了无效的参数.)"

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - An invalid argument was supplied.)"

鉴于所有其他计算机都非常愉快地连接,因此努力相信无效参数"位.

Struggling to believe the 'invalid argument' bit, given that all other machines connect quite happily.

SQSL绝对配置为接受远程连接,实例名称绝对正确.

SQSL is definitely configured to accept remote connections, instance name is definitely correct.

问题机器可以使用SQLSMS进行连接,但不能通过C#进行连接.

The problem machine can connect using SQLSMS, but not via C#.

在有问题的计算机上禁用防火墙没有影响.

Disabling firewall on the problem machine makes no difference.

直到几天前Windows 10更新之前,一切似乎都可以在问题机器上正常运行.

Everything seems to have been working fine on the problem machine up until a Windows 10 update a couple of days ago.

对此进行更新:我现在有两台机器都遇到此问题,并且它们似乎都只在Windows 10更新到版本1803之后才开发出来.所有1803之前的机器仍然可以正常工作.

An update on this: I now have two machines with this issue, and they both seem to have only developed it after Windows 10 updated to version 1803. All the pre-1803 machines still work fine.

请问有人可以进一步阐明这一点吗?

Can anyone shed any more light on this please?

推荐答案

对于其他遇到此问题的人,我发现这是因为客户端应用程序是从共享驱动器运行的,并且Windows 10更新1803必须包含导致此问题的安全更新(仅影响运行1803的计算机).

For anyone else hitting this issue, I discovered that this was happening because the client application was being run from a shared drive, and Windows 10 update 1803 must have some security update in it that causes this problem (only machines running 1803 were affected).

从计算机的硬盘驱动器运行应用程序解决了该问题.

Running the application from the machine's hard drive solved the problem.

即使问题已解决,我仍然想知道对此的技术解释.

I'd still like to know a technical explanation for this, even though the problem is solved.

这篇关于SQL Server-提供了无效的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆