[Microsoft][ODBC SQL Server Driver]通信链接失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5013584/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
[Microsoft][ODBC SQL Server Driver]Communication link failure
提问by Musikero31
I need your help on this guys!!!!
我需要你帮助这些家伙!!!!
During the upload of the files to a database, this error occurs. [Microsoft][ODBC SQL Server Driver]Communication link failure
在将文件上传到数据库的过程中,会发生此错误。[Microsoft][ODBC SQL Server Driver]通信链接失败
Now here's what I did so far based on the articles which I've been reading. 1. I restarted the servers that are involved. 2. I've added a new DNS connection to pattern to what they are using to connect to the database.
现在这是我根据我一直在阅读的文章所做的。1. 我重新启动了涉及的服务器。2. 我已经添加了一个新的 DNS 连接来模式到他们用来连接到数据库的内容。
But all of these failed. I don't know what to do because this is now critical and it's been a week now.
但所有这些都失败了。我不知道该怎么办,因为这现在很关键,而且已经一周了。
Please help me...
请帮我...
采纳答案by anton
try this one, it work for me......
试试这个,它对我有用......
Set Cnn = New ADODB.Connection
Cnn.Open "Provider=SQLNCLI10;Server=" & txtServer & ";Database=" & cmbDatabase.Text & ";MARS Connection=True;DataTypeCompatibility=80;UID=" & txtUser & ";PWD=" & txtPassword & ";"
回答by rsc
have you tried solutions proposed here:
您是否尝试过此处提出的解决方案:
--[Microsoft][ODBC SQL Server Driver]Communication Link Failure http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/b7a4c6f2-0d1b-44ba-bb55-0e7848d64198/
--[Microsoft][ODBC SQL Server 驱动程序]通信链接失败 http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/b7a4c6f2-0d1b-44ba-bb55-0e7848d64198/
and here:
和这里:
--Error message when an application connects to SQL Server on a server that is running Windows Server 2003: "General Network error," "Communication link failure," or "A transport-level error" http://support.microsoft.com/kb/942861
-- 应用程序连接到运行 Windows Server 2003 的服务器上的 SQL Server 时的错误消息:“一般网络错误”、“通信链接失败”或“传输级错误” http://support.microsoft.com /kb/942861
Maybe you should look into logs, on whether there are no problems with SQL Server's service.
也许您应该查看日志,了解 SQL Server 的服务是否没有问题。
回答by Doug
If you receive the following error messages in one form or another in a job or SSIS package:
如果您在作业或 SSIS 包中以一种或另一种形式收到以下错误消息:
"Communication link failure", "TCP Provider: The specified network name is no longer available."
“通信链接失败”、“TCP 提供程序:指定的网络名称不再可用。”
A very likely cause is the code being run was created in BIDS which uses Visual Studio 2008 as its SDK base and the package or job was moved to a SQL Server 2012 server which is Visual Studio 2012 based.
一个很可能的原因是正在运行的代码是在 BIDS 中创建的,它使用 Visual Studio 2008 作为其 SDK 基础,并且包或作业被移动到基于 Visual Studio 2012 的 SQL Server 2012 服务器。
You cannot simply go into the package and change a connections server name in this case. BIDS (aka VS 2008) uses SQL Server connection Provider=SQLNCLI10.1
. TFS (aka VS 2012) uses SQL Server connection Provider=SQLNCLI11.1
. If you are refactoring a package that was originally created in VS 2008 please do so in VS 2012 and drop and recreate the connections using the 2012 provider, it is backward compatible.The 2008 provider is not forward compatible. If you are creating a new package please do so in VS 2012. This, most often, will solve the problem.
在这种情况下,您不能简单地进入包并更改连接服务器名称。BIDS(又名 VS 2008)使用SQL Server connection Provider=SQLNCLI10.1
. TFS(又名 VS 2012)使用SQL Server connection Provider=SQLNCLI11.1
. 如果您要重构最初在 VS 2008 中创建的包,请在 VS 2012 中执行此操作,并使用 2012 提供程序删除并重新创建连接,它向后兼容。2008 提供程序不向前兼容。如果您要创建新包,请在 VS 2012 中创建。这通常会解决问题。