最快的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:work1204store99_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;
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:work1204store99_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;