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
821 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
[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
  • 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 143

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
I have a large data set and a SSIS package. How can I load this file in multi threading?
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.
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.

730 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