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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

I have a large data set and a SSIS package. How can I load this file in multi threading?
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
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.
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.

770 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