我们进入SQL Server 2008R2 我收到了以下erorr:
SQLState = 08001, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Client unable to establish connection due to prelogin failure.
使用以下脚本:
DECLARE @cmd VARCHAR(200)
BEGIN
set @cmd = 'bcp.exe "' + 'SELECT 1111' + '" queryout ' + '"' + 'C:\ePay\test.txt' + '"' + ' -S ' + 'HOEXDB01\XPDBPRD1\' + ' -c -q -C1252 -t , -U ' + 'usr_apps_tst' + ' -P ' + 'test1234$$'
print @cmd
execute xp_cmdshell @cmd
end
感谢并感谢任何帮助 埃尔默
答案 0 :(得分:1)
尝试更改
+ 'HOEXDB01\XPDBPRD1\' +
要
+ 'HOEXDB01\XPDBPRD1' +