SQLState = 08001, NativeError = 17 Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server
在sqlserver里面,执行这句话报错EXECmaster..xp_cmdshell'bcp"SELECTau_id,au_lnamefrompubs..authors...
在sql server里面,执行这句话报错
EXEC master..xp_cmdshell 'bcp "SELECT au_id ,au_lname from pubs..authors" queryout "c:\temp1.xls" -c -Swufy-Usa -P'
报错信息
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server 不存在或拒绝存取。
SQLState = 01000, NativeError = 53
Warning = [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
NULL
但是执行下面的这句话,就能成功
EXEC master..xp_cmdshell 'bcp pubs..authors out c:\temp1.xls -c -q -Swufy -Usa -P' 展开
EXEC master..xp_cmdshell 'bcp "SELECT au_id ,au_lname from pubs..authors" queryout "c:\temp1.xls" -c -Swufy-Usa -P'
报错信息
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server 不存在或拒绝存取。
SQLState = 01000, NativeError = 53
Warning = [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
NULL
但是执行下面的这句话,就能成功
EXEC master..xp_cmdshell 'bcp pubs..authors out c:\temp1.xls -c -q -Swufy -Usa -P' 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |