bcp資料表匯出

2021-05-24 07:16:19 字數 973 閱讀 5658

select 'bcp nmdb..'+name+' out '+name+'.txt   -c -r "123!@#$%^&*"  -t "*&^%$#@!321"  -unb -pningbo -sbdw_nb' from sysobjects where type='u' and (name not like 'tra%'  or name in('tratypeinfo','tradataexplain')) and name not like 'nor%' and name not like 'tb/_tmp/_%'  escape '/'

and name not like 'z/_%' escape '/' and name  like '[^v][^w]%' and name like '%[^tt][^ee][^ss][^tt]%' and name  like '%[^hh][^ii][^ss]' and name like '%[^h][^w]' and name not in ('alarm','alarmhis','balk','balkhis','balkdeal','dealbook','dealbookhis','dealevent','departbalkform','departbalkformhis','detailcommand','specialcommand','eventinfo','report','softupgrade','softup_tra','softup_config','softup_config','onloginhis','operation') order by name

bcp nmdb..syscolumns out syscolumns.txt   -c -r "123!@#$%^&*"  -t "*&^%$#@!321"  -unb -pningbo -sbdw_nb     

bcp nmdb..sysobjects out sysobjects.txt   -c -r "123!@#$%^&*"  -t "*&^%$#@!321"  -unb -pningbo -sbdw_nb

使用BCP匯出匯入資料

bcp 實用工具可以在 microsoft sql server 例項和使用者指定格式的資料檔案間大容量複製資料。使用 bcp 實用工具可以將大量新行匯入 sql server 表,或將表資料匯出到資料檔案。除非與 queryout 選項一起使用,否則使用該實用工具不需要了解 transact sq...

使用BCP匯出匯入資料

bcp實用工具可以在 microsoft sql server 例項和使用者指定格式的資料檔案間大容量複製資料。使用bcp實用工具可以將大量新行匯入 sql server 表,或將表資料匯出到資料檔案。除非與queryout選項一起使用,否則使用該實用工具不需要了解 transact sql 知識。...

BCP大資料匯入匯出

bcp命令列匯出匯入大資料 首先看匯出 要點 確保你安裝了microsoft command line utilities 15 for sql server x64 msi這個包 進入command視窗,這個不用說了吧,都會的win r,cmd 下面 為匯出資料,我的機器大概每秒10000多行,相...