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
818 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

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

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.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

895 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

16 Experts available now in Live!

Get 1:1 Help Now