Solved

SQL Server 2005. transaction log file grows. Doesn't shrink even using backup in full recovery mode and backup of trn logs

Posted on 2008-10-23
4
816 Views
Last Modified: 2012-05-05
SQL Server 2005

Have a maintenance plan that doesn't "shrink" the trn files.

The DB is approx 3 GB in size. The trn file is approx 12 GB in size.

Recovery mode is Full

Have just created another maintenance plan that takes full backup of the DB and backup of the transaction log. and do a shrink databases.

BUT the trn file is still 12 GB in size????????
0
Comment
Question by:TANGLAD
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 500 total points
ID: 22783931
well,
is it possible that you have a transaction that has been running for a really long time and did not commit / rollback yet?
try checking it using sp_who2 according to the last_batchcolumn
maybe that is what causing the problem

did you try to stop and start the sql server instance?
0
 
LVL 1

Author Comment

by:TANGLAD
ID: 22783962
I will try to restart the SQL service tonight.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22784021
run DBCC OPENTRAN to see if there is such a open transaction.

otherwise, your transaction log backup needs to be regulary, not only "once".
the shrink operation will then work, but not on the first run.
0
 
LVL 1

Author Closing Comment

by:TANGLAD
ID: 31509110
Solved. Ran the plan again and then the trn files was shrinked.

So the first time I run a trans-log backup it does not shrink the trn file, but the second time  it is shrinked.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

707 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

18 Experts available now in Live!

Get 1:1 Help Now