代码改变世界

最快的csv文件入到数据库的方法

2013-12-06 20:59  hongjiumu  阅读(515)  评论(8编辑  收藏  举报
最快的csv文件入到数据库的方法:
EXEC master.sys.sp_configure 'show advanced options', 1 ; RECONFIGURE ; EXEC master.sys.sp_configure 'xp_cmdshell', 1 ; RECONFIGURE;
EXEC master..xp_cmdshell 'bcp SmartRNO_RF_1127_RF.[prj].[D2_Request_NBR] in D:\work\1204\store\99_Aktueller_DS_cw40.cdn -S (LOCAL)\SMARTRNO_EXPRESS -U sa -P huawei123, -c -t, -F 2';
EXEC master.sys.sp_configure 'xp_cmdshell', 0 ; RECONFIGURE ; EXEC master.sys.sp_configure 'show advanced options', 0 ; RECONFIGURE;