我有一个连接到SQL Server 2005默认实例的脚本。但是我正在连接,却得到了下面的消息
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.脚本的内容是:
osql -E -S <servername> -i D:\scripts\script1.sql -o D:\scripts\script1.txt我从SQL Server配置管理器查看了网络连接。TCP/IP已启用,但命名管道已禁用。
我的问题是,这个错误的可能原因和解决方案是什么?
发布于 2009-05-05 11:25:36
尝试使用osql -E -S (本地)或osql -E -S。我不明白为什么它有时能工作,有时不能。
https://stackoverflow.com/questions/824315
复制相似问题