数据库 · 2014-11-04

mssql log clear and shrink file

1
2
3
4
ALTER DATABASE testdb SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(testdb, 1)
DBCC SHRINKFILE(testdb_log, 1)
ALTER DATABASE testdb SET RECOVERY FULL WITH NO_WAIT