Solved

Transaction log keeps growing in SQL Server 2005

Posted on 2008-10-21
3
354 Views
Last Modified: 2013-11-30
Hi all,

My SQL server 2005 .mdb contains 500MB and log .ldf contains 15GB. The log .ldf keeps growing everyday. How can i add a scedule to do the full backup and shrink the log file at the same time?

Kindly advise. Thank...
0
Comment
Question by:ian_khoo_sc
3 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 22772679
You have 2 choices:
1. Since you are using Full Recovery Model you must back up the Transaction Log or
2. Change to Simple Recovery Model (Just understand that you will lose point in time recovery)

Good luck.
0
 

Author Comment

by:ian_khoo_sc
ID: 22773006
Hi
Thank for your reply.

This's the step that I how to backup and shrink the database by manually.
1. Task -> Backup -> Backup Type : Tranaction Log. OK
2. Task -> Shrink -> Files -> File Type : Log. OK
 
I try to set the schedule to backup & shrink it. but it doesnt work. Any idea?
0
 
LVL 22

Accepted Solution

by:
dportas earned 500 total points
ID: 22773775
Shrinking should NOT be scheduled. Shrinking should be needed for exceptional circumstances only. As acperkins said, you need to select the right recovery model and/or backup your log. If you do that you won't need to keep shrinking the log.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

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.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

679 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