truncate table acp80100
truncate table acp80115
delete   from  acp80110
truncate table acp80130
delete   from  acp80120
truncate table acp80161
delete   from  acp80160truncate table acr80100
truncate table acr80115
delete   from  acr80110
truncate table acr80130
delete   from  acr80120truncate table bom10101
truncate table bom10102
truncate table bom10110
truncate table bom10300
truncate table bom10400truncate table cac10150
truncate table cac10200
truncate table cac10210
truncate table cac10800
truncate table cac10301
truncate table cac10311
truncate table cac10501
truncate table cac10711
truncate table cac10721
truncate table cac10911
truncate table cac20101
truncate table cac20301
truncate table cac20801
delete   from  cac10300
delete   from  cac10310
delete   from  cac10500
delete   from  cac10710
delete   from  cac10720
delete   from  cac10910
delete   from  cac20100
delete   from  cac20300
delete   from  cac20800truncate table cas10111
truncate table cas10121
truncate table cas10210
delete   from  cas10110
delete   from  cas10120truncate table cst10101
truncate table cst10102
truncate table cst10121
truncate table cst10141
truncate table cst10150
truncate table cst10160
delete   from  cst10120
delete   from  cst10140truncate table fix10510
truncate table fix10520
truncate table fix10315
truncate table fix10711
delete   from  fix10710
delete   from  fix10310
delete   from  fix10320
delete   from  fix10330truncate table inv80201
truncate table inv80101
truncate table inv80207
truncate table inv80210
truncate table inv20220
truncate table inv10200
truncate table inv10161
truncate table inv10115
truncate table inv10110
truncate table inv10109
truncate table inv10108
truncate table inv10107
truncate table inv10106
truncate table inv10105
truncate table inv10103
truncate table inv10102
truncate table inv10000
delete   from  inv10160
delete   from  inv30102
delete   from  inv30101
delete   from  inv30100
delete   from  inv10104
delete   from  inv10101truncate table lot10200
truncate table mom10310
truncate table mom10320
truncate table mom10331
truncate table mom10335
truncate table mom10336
truncate table mom10325
delete   from  mom10100
delete   from  mom10110
delete   from  mom10200
delete   from  mom10330
delete   from  lot10100truncate table mps20100
truncate table mrp20150truncate table nms20111
truncate table nms10301
truncate table nms10110
truncate table nms10130
truncate table nms10110
truncate table nms80100
truncate table nms10100
delete   from  nms20110
delete   from  nms10300
delete   from  nms10120truncate table ord20112
truncate table ord20113
truncate table ord20114
truncate table ord20115
truncate table ord20670
truncate table ord80111
truncate table ord80112
truncate table ord80113
truncate table ord80114
truncate table ord80115
truncate table ord80670truncate table pur10111
truncate table pur10115
truncate table pur10141
truncate table pur10151
truncate table pur10152
truncate table rec10100
delete   from  pur10100
delete   from  pur10140
delete   from  pur10150truncate table sfc10220
truncate table sfc10450
truncate table sfc10420
truncate table sfc10413
truncate table sfc10412
truncate table sfc10411
truncate table sfc10410
delete   from  sfc10400
truncate table sfc10550
truncate table sfc10530
truncate table sfc10520
truncate table sfc10511
truncate table sfc10510
delete   from  sfc10500
truncate table sfc20125
truncate table sfc20130
truncate table sfc20140
truncate table sfc20160
truncate table sfc20230
truncate table sfc20250
truncate table sfc20530
truncate table sfc20540
truncate table sfc20550truncate table sub20400
truncate table sub10171
truncate table sub10180
truncate table sub10120
truncate table sub10115
truncate table sub10100
delete   from  sub10110
delete   from  sub10170truncate table sys10180
truncate table sys10180
truncate table sys10501
truncate table sys10500
truncate table sys10516
truncate table sys10517
truncate table sys10518
truncate table sys10524
truncate table sys10523
truncate table sys10522
truncate table sys10521
truncate table sys10520
truncate table trd10105
truncate table trd10100
truncate table trd10145
truncate table trd10150
truncate table trd10171
truncate table trd10181
truncate table trd10182
truncate table trd10183
truncate table trd10184
truncate table trd10185
truncate table trd10180
delete   from  trd10170
truncate table trd10200
truncate table trd10220
truncate table trd10250
truncate table trd10270
truncate table trd10290
truncate table trd10300
truncate table trd10310
truncate table trd10320
truncate table trd10350
truncate table trd10370
truncate table trd10405
truncate table trd10407
truncate table trd20241
truncate table trd20670
truncate table trd50100
truncate table trd80181
truncate table trd80182
truncate table trd80183
truncate table trd80184
truncate table trd80185
truncate table trd80220
delete   from  trd10400
delete   from  trd10340
delete   from  trd10240
delete   from  trd10260
delete   from  trd20240
delete   from  trd80210
truncate table ven10101
truncate table ven10111
truncate table ven10120
truncate table ven10130
truncate table ven10142
truncate table ven10141
truncate table ven10170
delete   from  ven10140
delete   from  ven10110
delete from sys10190 where type='2'
delete   from  ord20111
delete   from  ord20110
delete   from  ord20211
delete   from  ord20210
delete   from  cst10100
delete   from  inv10100
delete   from  sys10110
delete   from  sys10240
delete   from  ven10100將以上表中的數據全部清空,執行後發現原來是12GB的兩個文件(appla.mdf 和appla_log.ldf)變了,主要是appla_log.ldf文件從幾KB變到5GB了,不知是何原因,請各位大蝦幫忙看看!

解决方案 »

  1.   

    2、截断日志,收缩数据库
    backup log 数据库名 with no_log
    godbcc shrinkdatabase(数据库名)
    go
      

  2.   

    現在已經把我的一個硬盤的20G分區占滿了,而SQL指令還沒有執行完,該如何處理?
      

  3.   

    現在已經把我的一個硬盤的20G分區占滿了,而SQL指令還沒有執行完,該如何處理?
    ----------------------
    首先在执行指令之前,你须考虑将服务器重启等工作,断开所有用户对资源的占用,其次,尽可能释放系统资源,然后再执行,由于数据库比较大,执行时间是比较漫长的,请耐心等待...
      

  4.   

    先用上面提到過的方法截斷日志。
    然後在數據庫-->屬性-->選項-->恢復模型:改為簡單。
    再執行這些刪除操作。原因可能是你現在的數據庫恢復模型是“完全”。
    因此刪除數據的操作會把記錄全部記錄到ldf文件中,導致文件增長過大~