?
Solved

sql LDB (log) is groing to several Gb

Posted on 2004-09-15
4
Medium Priority
?
555 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1200 total points
ID: 12062820
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 800 total points
ID: 12062849
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
ID: 12066332
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
ID: 12070059
Thank you
I'll try your sugestions.
I'll post results after.

Carlos
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

762 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