如何清理LDF文件

LDF文件太大了,在网上找一下,有很多方法,但好多在SQL 2005下,没有成功。

最后用这个SQL搞定了。

脚本如下: 

declare @db nvarchar(20)

set @db='KLims'

dump transaction @db with no_log
backup log @db with no_log

dbcc shrinkdatabase(@db) 

相关文章:

  • 2021-11-23
  • 2021-10-21
  • 2021-12-06
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2021-12-16
  • 2021-12-06
相关资源
相似解决方案