Link to home
Start Free TrialLog in
Avatar of Eprs_Admin
Eprs_AdminFlag for Austria

asked on

SQL Logfiles over 80GB

Hi Experts,

I have some SQL logfiles which are very big. over 80GB.
With a command I checked the log and just 1% is used.
Under options of this DB I found the feature autoshrink file.

When I use autoshrink, is this a problem ?
Or do I have some disadvantages ?
Avatar of mike706
mike706

From SSMS run Task -> Shrink -> Files and shrink the Log file.
Mark the option "Reorganize pages Before releasing unused space" and set "Shrink file to".

Make sure that the Log file is not shrink to 0% available space after shrink.
This file size is depending on the amount of transactions made to the database.

Then setup a backup job with option FULL to make a backup of the database. If the Recovery Model is set to FULL on the database also make a log backup between the FULL backups.
Typically a log backup is set to every hour during the day when the transactions is made to the database. This will help to have the transaction log in shape.
Avatar of Eprs_Admin

ASKER

I cannot find this option :
 "Reorganize pages Before releasing unused space"
ASKER CERTIFIED SOLUTION
Avatar of mike706
mike706

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks my friend