Hi,
Am using SQL Server option
Can any1 tell me why the *.ldf file is so enormous, and wat i can do to prevent it from becoming so big??
COMPANY_PROD_Log.ldf -- 89 000 000 ko
COMPANY_PROD_Data.mdf --40 000 ko
COMPANY_PROD_1_Data.ndf -- 8 000 000 ko
thankx
0
Comments
The best way to keep it small is to make regular transaction-backups (e.g. 1 backup each few hours and extra a full backup once a day).
To decrease the size you first must make a full backup and then do a shrink of the transaction-log file.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
If you do not have a backup plan in place, and you do not intend to ever use the log for restoring your database in case of a catastrophe, you can set the recovery model to simple, and it will only log active transactions. Go to File, Database, Alter. On the Options tab select Simple as the recovery model. Do this while nobody is connected to the database, and make a backup of the database before you do it.
If you DO intend to use the TL for restoring databases, then you will need to include a transaction log backup in your backup schedule. Read Books Online for more details as to how to do that.
RIS Plus, LLC
RIS Plus, LLC
Avoid shrinking the file too small. This can cause SQL to auto-grow the file which will impact system performance.
Avoid constantly shrinking and expanding the log file. This will result in a file that is fragmented on the drive and hurt performance. The best approach is to reformat the drive (should be dedicated to log) and recreate the transaction log of the correct size. The correct size would be large enough to hold transaction between backups without auto-growing.
Setting recovery method to simple (trunctate on checkpoint) does not disable the transaction log. A large transaction (i.e. Navision restore or table optimize) can stll cause the log to grow in size.