Solved

sql LDB (log) is groing to several Gb

Posted on 2004-09-15
4
521 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
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 200 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

920 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

15 Experts available now in Live!

Get 1:1 Help Now