错误= [Microsoft] [SQL Server Native Client 11 [英] Error = [Microsoft][SQL Server Native Client 11

查看:1551
本文介绍了错误= [Microsoft] [SQL Server Native Client 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在sql server 2012中编写此代码时出现此错误:



This error appear when write this code in sql server 2012:

EXEC xp_cmdshell ''bcp "select [ProductID],[ProductName],[UnitPrice] from Northwind.dbo.Products" queryout "d:\bcptest2.txt" -T  -c -t, ''





错误= [Microsoft] [SQL Server Native Client 11.0]建立与SQL Server的连接时发生了与网络相关或特定于实例的错误。找不到服务器或无法访问服务器。检查实例名称是否正确以及SQL Server是否配置为允许远程连接。有关详细信息,请参阅SQL Server联机丛书。



如何解决?



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.

How to solve it?

推荐答案

我' m使用ss2k08,但这可能是ss2k12,出于同样的原因。
I''m using ss2k08 but this might go in ss2k12, for the same reason.
EXEC sp_configure ''xp_cmdshell'', 1
GO
RECONFIGURE



快速测试像你这样的命令行:


And a quick test of a commandline like yours:

EXEC xp_cmdshell ''dir /b /s c:\users\mb\my documents\sql server management studio\*.txt''



由于显而易见的原因,默认情况下禁用sql工具xp_cmdshell。 br />


如果这没有清除客户端的错误,请检查在compmgmt.msc控制台下的服务中运行的实例。甚至可能必须改变登录的方式。如果不这样做,请阅读BOL中使用ss的说明。


The sql facility "xp_cmdshell" is by default disabled for obvious reasons.

If this doesn''t clear up the error with the client, check the instance that''s running in the services under the compmgmt.msc console. Might even have to change the way the log on is happening. Failing that, read the directions for ss use in BOL.


这篇关于错误= [Microsoft] [SQL Server Native Client 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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