清除数据库日志

--先查询出日志名:

use [VTS_ReckoningCounterV5.0]
select name,size from sys.database_files
alter database [VTS_ReckoningCounterV5.0] set recovery simple with NO_WAIT
alter database [VTS_ReckoningCounterV5.0] set recovery simple
--清除日志
use [VTS_ReckoningCounterV5.0]
dbcc shrinkfile ('VTS_ReckoningCounter_log',0,truncateonly)
alter database [VTS_ReckoningCounterV5.0] set recovery full with NO_WAIT
alter database [VTS_ReckoningCounterV5.0] set recovery full

posted on 2013-01-14 13:52  伊伦  阅读(243)  评论(0编辑  收藏  举报

导航