SQL Server truncate log and shrink file


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. backup log somedb WITH truncate_only
  2. USE somedb
  3. sp_helpfile --this provides a list of files used by current db
  4. dbcc shrinkfile('somedb_log', 3)

Report this snippet


Comments


You need to login to view comments.