Friday, February 24, 2012

cannot shrink transaction log

I have problems with shrinking the transaction log. I have first backup the
transactionlog and then I try to shrink de transaction log with the shrink
file command but the log wil not shrink. When I use the DBCC loginfo I see
that the status is 2 for the VLF's and they never change to 0.
How can I shrink my transaction log file.A quick way to achieve this is by:
1)Backup your db
2)Detach db
3)rename the relevant log file
4)Attach db - the reattach will automatically create a new log file
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"cas" <cas@.discussions.microsoft.com> wrote in message
news:62EB1A28-DC4C-4A6D-A5DB-D293B8B00E0C@.microsoft.com...

> I have problems with shrinking the transaction log. I have first backup
the
> transactionlog and then I try to shrink de transaction log with the shrink
> file command but the log wil not shrink. When I use the DBCC loginfo I see
> that the status is 2 for the VLF's and they never change to 0.
> How can I shrink my transaction log file.|||After taking the backup make sure there is no open transaction run DBCC
OpenTran to get the open transaction.
"Jack Vamvas" wrote:

> A quick way to achieve this is by:
> 1)Backup your db
> 2)Detach db
> 3)rename the relevant log file
> 4)Attach db - the reattach will automatically create a new log file
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
>
> "cas" <cas@.discussions.microsoft.com> wrote in message
> news:62EB1A28-DC4C-4A6D-A5DB-D293B8B00E0C@.microsoft.com...
>
> the
>
>

No comments:

Post a Comment