Rehan Hussain
Rehan Hussain

Reputation: 3

How to reduce MS Sql 2008 R2 Log File

I had very large data in database(log) after deleting all the records in the database tables but the database size is not reduced , specially Log File(s) Ldf

ROWS      56274.125000   55306.625000
LOG       179705.437500  179567.046875

how i reduce the size ?

Upvotes: 0

Views: 126

Answers (1)

SchmitzIT
SchmitzIT

Reputation: 9552

Is the database in Full Recovery Model? If so, you will need to implement Transaction log backups before you can shrink the log-file size.

If you do not need transaction log backups (in case your full backup is taken often enough that the business is okay with losing the amount of data since the previous backup), you can switch the database to run in Simple recovery model.

You can find out which recovery model a database is in by right-clicking the database, selecting "Properties", and then checking the "Options" tab.

enter image description here

You can change the recovery model at that location, too. However, before you do, I highly recommend you to read up on the different recovery models, and the implications of changing them.

When you are ready to change the recovery model, you might want to read this first.

Upvotes: 1

Related Questions