清除SQL Server日志

来源:互联网 发布:存货管理数据分析 编辑:程序博客网 时间:2024/06/05 02:24

1.截断事务日志
Backup Log 数据库名 with no_log
2.清空日志
dump transaction 数据库名 with no_log
3.收缩数据库文件
DBCC SHRINKFILE (2)
收缩指定数据文件,2是文件号,可以通过这个语句查询到:
use test
select * from sysfiles

go--test为数据库Backup Log test with no_loggodump transaction test with no_loggoUSE test DBCC SHRINKFILE (2)
0 0
原创粉丝点击