/**
* 授权
*/
EXEC sp_configure 'show advanced options',1;
go
reconfigure;
go
exec sp_configure 'xp_cmdshell',1;
go
reconfigure;
go
/**导入指定表的文本文件*/
EXEC master..xp_cmdshell 'bcp dbname..tablename in d:\DT.txt -c -Sservername -Usa -Ppassword'
exec maste