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


RSS Icon Subscribe to comments

You need to login to post a comment.