?
Solved

Transaction log keeps growing in SQL Server 2005

Posted on 2008-10-21
3
Medium Priority
?
358 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 1500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Suggested Courses

764 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