2

我正在尝试使用 sqlcmd(在我的客户端计算机上)使远程 SQL 服务器执行一个小的 .sql 文件(现在。稍后,我将尝试一个巨大的 200 mb.sql 文件)。我可以通过管理工作室轻松连接到我的服务器。但是,当我尝试通过 sqlcmd.exe 连接时出现错误。我可以使用 sqlcmd 访问服务器 - 我得到 > 命令提示符。

我的命令的形式是-

sqlcmd -S .\MYSQLSERVER2008 -U MyUsername -P MyPassword -i C:\Database\hugescript.sql

这会导致错误 -

HResult 0xFFFFFFFF, Level 16, State 1
SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

Sqlcmd : error : Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd : error : Microsoft SQL Server Native Client 10.0 : Login timeout expired

无效的解决方案 -

如何将Sqlcmd连接到服务器?

http://blogs.msdn.com/b/spike/archive/2010/06/21/quot-error-locating-server-instance-specified-xffffffff-quot-sqlsrv32-to-the-rescue.aspx

我试过他添加一个odbc dsn的东西。但是,我仍然得到同样的错误。我将尝试更多的谷歌搜索。但是,如果有人知道如何解决这个问题,请帮助我。谢谢。

4

0 回答 0