' SQLCMD'实用程序无法登录数据库

时间:2015-06-03 16:14:39

标签: sql sqlcmd

我有一个大的.sql数据文件(4.3 GB),我想在SQL Server上执行此文件。做了一些研究,我发现我可以使用以下命令执行此文件:

sqlcmd -U username -P password -S rs-reporting-v1 -d NSTest  -i D:NetSuiteDataFiles\Transactions.sql -o D:\NetSuiteDataFiles\Transactions_output_file.txt

执行上述命令时,出现以下错误:

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Named Pipes Provider: Could not open a connection to SQL Server [53]. .
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.
Sqlcmd: Error: Microsoft SQL Server Native Client 11.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..

我已尝试将username更改为domain\username,但它根本没有帮助。我已多次检查usernamepassword的拼写,我确定它们是正确的。

修改

我将命令更改为以下内容:

sqlcmd -E -S rs-reporting-v2 -d NSTest  -i D:NetSuiteDataFil
es\Transactions.sql -o D:\NetSuiteDataFiles\Transactions_output_file.txt

现在我收到以下错误:

enter image description here

请有人能让我知道我在这里做错了什么吗?任何帮助将不胜感激。

我还想指出.sql文件正在创建一个表,然后插入值。

0 个答案:

没有答案