Re: transaction logfile very large, how to truncate?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Brian Moran (brian_at_solidqualitylearning.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 08:17:45 -0400

It sounds like you might be new to SQL Server. That's great, welcome aboard.
I hope these forums are useful to you.

I'd encouage you to spend a bit of time in Books Online reading about
transaction log managment issues. I found 22 entires in BOL by searching
'transaction log' for just the title only. You might want to start with the
entry called 'Transaction Log Backup'

Some of your questions raise complex issues and it's imperative that your
transaction logs are being managed appropriately to ensure you don't lose
data. The short answer for now is that you need to backup your transaction
log. Please take a look at BACKUP LOG to ensure you pick the strategy that
works for you.

-- 
Brian
"David Lindgren" <david.lindgren@hogia.se.REMOVE!> wrote in message
news:%23KUOfUGrEHA.452@TK2MSFTNGP09.phx.gbl...
> Hello!
>
> I have a database on ms sql server 2000. Today a noticed that the logfile
> had grown enormously. The database data file is about 5 megs and the
logfile
> is 3000 megs. I also noticed that I didn't have autoshrink on, so I turned
> it on. Now, how do truncate the file so that it will take less diskspace?
> I've tried runing commands like "dbcc shrinkfile" and "dbcc
shrinkdatabase"
> but without any progress.
>
> when running "DBCC SQLPERF (LOGSPACE)" it gives me this result in return:
>
> Filesize: 3089.8672                Spaced used (%): 91.850677
>
> To me it seems that the amount of space used is enormously. My main
> questions are 1) How did it become so large in first, 2) how can I free
the
> diskspace?
>
> The database has only been up for 1-2 months and is not very trafficated.
>
> Thank you all for helping out.
>
> Regards,
> David
>
>


Relevant Pages

  • Re: Transaction Log Size
    ... listed in my article has detailed info on shrinking of the transaction log. ... Tibor Karaszi, SQL Server MVP ... > (database + transaction log) with fake appended to the name. ... >> CommVault to backup the backup files. ...
    (microsoft.public.sqlserver.server)
  • Transaction log problems
    ... We are using SQL Server 2000 on Windows Server 2003 Standard Edition, ... transaction log and it is causing us some problems. ... Because the database is used by the third party software, ... transaction log file and I would not have to monitor it so closely. ...
    (microsoft.public.sqlserver.server)
  • Re: Transaction Log Size
    ... Backup database does not empty the transaction log files. ... How to Shrink the SQL Server 7.0 Transaction Log ...
    (microsoft.public.sqlserver.server)
  • Re: 1105 - log file getting full - SQL Server 6.5
    ... Follow Hari's instructions, backup the transaction log on a regular basis, ... Wayne Snyder, MCDBA, SQL Server MVP ... > Can't allocate space for object 'Syslogs' in database ''corp'' because ...
    (microsoft.public.sqlserver.server)
  • Re: Large content database keeps growing
    ... It made our Transaction log smaller but ... the database continues to grow. ... Your recovery model is Full in WSS_Content DB. ... DBCC SHRINKFILE ...
    (microsoft.public.sharepoint.windowsservices)