EXEC master..xp_cmdshell ‘bcp FH2_SJH.dbo.dCurrent in c:\tt.txt -c -t -S"SMARTSENCER\SQL2008" -U"sa" -P"password"‘
EXEC master..xp_cmdshell ‘bcp FH2_SJH.dbo.band out c:\band.txt -c -t -S"SMARTSENCER\SQL2008" -U"sa" -P"passwor"‘
原文地址:http://www.cnblogs.com/smartsensor/p/3806920.html