Solved

Transaction log keeps growing in SQL Server 2005

Posted on 2008-10-21
3
356 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
[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
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
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.

740 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