Wednesday, March 28, 2012

Problem with large transactionfile.

Hello
We have a problem with a large transactionfile.
How can I manage this?
I have tried this command:
dbcc shrinkfile (2, truncateonly)
but I get this errormessage:
Cannot shrink log file 2 (UX2LOG1) because all logical log
files are in use.
Can anyone help.
Thanks
Best regards
Carsten Holm.R5Carsten
Have you tried to BACKUP LOG ? (I assume you don't have database set simple
recovery mode)
Also ,DBCC LOGINFO(dbid) command will show what transactions are running?
(status=2 at the end of the list)
"Carsten Holm" <cah@.r5.com> wrote in message
news:1958b01c44d53$dccf1640$a601280a@.phx
.gbl...
> Hello
> We have a problem with a large transactionfile.
> How can I manage this?
> I have tried this command:
> dbcc shrinkfile (2, truncateonly)
> but I get this errormessage:
> Cannot shrink log file 2 (UX2LOG1) because all logical log
> files are in use.
> Can anyone help.
> Thanks
> Best regards
> Carsten Holm.R5|||Carsten
Have a look at these links. They should help you.
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/defaul...kb;en-us;256650
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/defaul...kb;en-us;272318
http://www.mssqlserver.com/faq/logs-shrinklog.asp
Regards
John|||Hi
Thanks for your answer
I have runned the DBCC LOGINFO(dbid) and it returned many
rows, and all is with status 2, exept this:
2 253952 9903669248 0 0 0
2366000000052200021
It is in the middel of the rows.
We have tried a full backup, but the transactionlog was
not deleted.
Thanks.
Best regards
Carsten Holm
>--Original Message--
>Carsten
>Have you tried to BACKUP LOG ? (I assume you don't have
database set simple
>recovery mode)
>Also ,DBCC LOGINFO(dbid) command will show what
transactions are running?
>(status=2 at the end of the list)
>
>"Carsten Holm" <cah@.r5.com> wrote in message
> news:1958b01c44d53$dccf1640$a601280a@.phx
.gbl...
log[vbcol=seagreen]
>
>.
>|||Hi
Full backup of the database does not truncate log file. I suggest you to
backup log file and then to shrink it or to remove.
If you see transactions with status=2 at the end of the list you will need
to perfom dummy INSERTION to move them at the top.
<anonymous@.discussions.microsoft.com> wrote in message
news:19cca01c44d56$53146bf0$a001280a@.phx
.gbl...[vbcol=seagreen]
> Hi
> Thanks for your answer
> I have runned the DBCC LOGINFO(dbid) and it returned many
> rows, and all is with status 2, exept this:
> 2 253952 9903669248 0 0 0
> 2366000000052200021
> It is in the middel of the rows.
> We have tried a full backup, but the transactionlog was
> not deleted.
> Thanks.
> Best regards
> Carsten Holm
> database set simple
> transactions are running?
> log

No comments:

Post a Comment