Quantcast
Channel: transaction-log – Tech ABC to XYZ
Viewing all articles
Browse latest Browse all 9

How to truncate and shrink log files? [ANSWERED]

$
0
0

How to truncate and shrink log files?

Asked By: Samiksha
Originally Asked On: 2008-12-18 13:29:11
Asked Via: stackoverflow

How to truncate and shrink large log files in SQL Server 2005? How to apply truncation at regular intervals?

Is there any difference between truncation and shrinking?

Thanks in advance

He received 4 answers
eventually accepting:

NYSystemsAnalyst’s answer to

How to truncate and shrink log files?

Use DBCC SHRINKFILE and schedule it as a job that runs regularly (preferably during off-hours).

Just be aware that there is a performance hit from regularly growing and shrinking the log file. If you have the space, you may want to set the file size to the maximum that it normally grows to and just leave it.

The answer with the highest score with 1 points was:

Mehrdad Afshari’s answer to

How to truncate and shrink log files?

Use the DBCC SHRINKFILE statement.

If the selected answer did not help you out, the other answers might!

All Answers For: How to truncate and shrink log files?

Mehrdad Afshari’s answer to

How to truncate and shrink log files?

Use the DBCC SHRINKFILE statement.

NYSystemsAnalyst’s answer to

How to truncate and shrink log files?

Use DBCC SHRINKFILE and schedule it as a job that runs regularly (preferably during off-hours).

Just be aware that there is a performance hit from regularly growing and shrinking the log file. If you have the space, you may want to set the file size to the maximum that it normally grows to and just leave it.

Ed Guiness’s answer to

How to truncate and shrink log files?

Reliable shrinking is achieved by

  • Backup (can be truncate only)
  • Checkpoint
  • Shrink

aref’s answer to

How to truncate and shrink log files?

first you should change your database recovery mode on
Properties – > Option -> Recovery Model
and change it to simple and then shrink log file from
Right Click -> Tasks -> Shrink -> Files
and choose file type ‘Log’ and click ok

Of course, you should really check out the original question.

The post How to truncate and shrink log files? [ANSWERED] appeared first on Tech ABC to XYZ.


Viewing all articles
Browse latest Browse all 9

Trending Articles