Solved

sql LDB (log) is groing to several Gb

Posted on 2004-09-15
4
509 Views
Last Modified: 2008-02-01

Hi everyone,

I've got a application working with SQL MSDE an four databases.
OS is 2003 small Business server
I've four workstations

My problem is thar the LDB (log) files in 8 working days as gone from several Kb to 17 Gb that's right GigaBytes.

What can be causing this ?????????

Can someone help, please.

Thank you,

Carlos
0
Comment
Question by:Carlos-jm
4 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 300 total points
Comment Utility
Disable the Autogrow option from the Transaction log file(s), and/or set the Max Size for the transaction log file(s).
Additionally, if your database contains non-critical data, if there is no backup or data can be easily recreated, then set the database RECOVERY MODEL to simple.
Otherwise, have the recovery model to full (or bulk-logged if needed), and perform full and transaction log backups regulary (full once per day/week, transaction log every 1,4 or 12 hours ) depending on the size and disaster recovery plan you implement.
To reduce your explosed log file, please search EE for the same problem SHRINK TRANSACTION LOG FILE, you will get tons of same requests.
Cheers
0
 
LVL 30

Assisted Solution

by:nmcdermaid
nmcdermaid earned 200 total points
Comment Utility
The log file records all the transactions that take place in your database. If there are a lot of inserts/deletes/updates going on, or for example you are importing lots of data, the log file will grow.

It usually shrinks automatically again over time, (under various circumstances).

A couple of database options that effects this file are the recovery model and the auto shrink setting

to find out what this is, issue this SQL to the database (or scratch around in Enterprise Manager and use that):

SELECT DATABASEPROPERTYEX('<your database name>','recovery')

(You would expect to see it return 'SIMPLE' as this is the default setting for MSDE)

SELECT DATABASEPROPERTYEX('<your database name>','IsAutoShrink')

(You would expect to see it return 1 as this is the default setting)


If these setting are at their default, then we need to look elsewhere for the reason.


To summarise, lots of data alterations make the log grow, various complicated things make the log automatically shrink again... we can get into the complicated things after you reteive those settings.


There are lots of questions about log files on this newsgroup so if you have the capability, you should search the newsgroup too.
0
 
LVL 34

Expert Comment

by:arbert
Comment Utility
Personally, I wouldn't set the log file to not "Auto Grow".  You could find yourself out of logspace one day and your database "suspect"....

Other than that, I agree with what angellIII has said above....Put a good backup strategy in place and schedule DBCC SHRINKFILE on your logs...
0
 

Author Comment

by:Carlos-jm
Comment Utility
Thank you
I'll try your sugestions.
I'll post results after.

Carlos
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL Bulk load data error 5 30
Microsoft SQL query 7 37
SQL 2012 and SQL 2014 always on 9 23
Report Builder 9 22
Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now