Tag: sql

  • How to shrink Microsoft SQL log files

    When having Microsoft SQL databases, its log files can grow quite a bit, potentially slow down the database server and eat up disk space. To shrink a database, one can run the following line: EXEC D_ShrinkDBLogs 0,100,1000,’with truncate_only’,’DB_NAME’ (change DB_NAME with the database’s name) To shrink all databases, one can use “sp_MSforeachdb” which is an…